Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No valid version ([]) of .app file found #21

Open
auror opened this issue Feb 26, 2021 · 8 comments
Open

No valid version ([]) of .app file found #21

auror opened this issue Feb 26, 2021 · 8 comments

Comments

@auror
Copy link

auror commented Feb 26, 2021

Hello guys,

OS: Mac OSX

Erlang/OTP 23 [erts-11.1.8] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [hipe] [dtrace]

IEx 1.11.3 (compiled with Erlang/OTP 23)

We're using rebar_mix to use Elixir dependencies inside our rebar3 project. There's a problem while generating a release

===> Compiling oauth
Consolidating 13 implementations of protocol Elixir.Jason.Encoder
===> [relup_helper] running gen_appups
===> Assembling release myapp...
===> Error generating release:
jason: No valid version ([]) of .app file found. Found file "/Users/YYYYYY/Programs/myapp/_build/myapp/rel/myapp/lib/jason-/ebin/jason.app" with version "1.2.2"


make: *** [myapp] Error 1

jason is the transitive dependency and added to the rebar.config deps

    {jason, {git, "[email protected]:michalmuskala/jason.git", {tag, "v1.2.2"}}}

Although, the next attempt seems to be solving it..

$ make
===> Compiling oauth
Consolidating 13 implementations of protocol Elixir.Jason.Encoder
===> [relup_helper] running gen_appups
===> Assembling release myapp...
===> Release successfully assembled: _build/myapp/rel/myapp

Not sure what's happening here.. Please let us know if you need more information !

Regards

@auror
Copy link
Author

auror commented Feb 28, 2021

Hello @Supersonido / @tsloughter , now i've been getting another crash while releasing...

Error: function_clause
[{filename,join1,
           [<<"1.2.2">>,[],
            "-nosaj/bil/ppaym/ler/ppaym/dliub_/ppaym/smargorP/YYYYYY/sresU/",
            unix],
           [{file,"filename.erl"},{line,472}]},
 {filename,join,1,[{file,"filename.erl"},{line,433}]},
 {rlx_assemble,copy_app,4,
               [{file,"/src/_build/default/lib/relx/src/rlx_assemble.erl"},
                {line,94}]},
 {rlx_assemble,'-copy_app_directories_to_output/3-lc$^0/1-1-',4,
               [{file,"/src/_build/default/lib/relx/src/rlx_assemble.erl"},
                {line,79}]},
 {rlx_assemble,copy_app_directories_to_output,3,
               [{file,"/src/_build/default/lib/relx/src/rlx_assemble.erl"},
                {line,79}]},
 {rlx_assemble,do,2,
               [{file,"/src/_build/default/lib/relx/src/rlx_assemble.erl"},
                {line,18}]},
 {relx,build_release_,3,
       [{file,"/src/_build/default/lib/relx/src/relx.erl"},{line,171}]},
 {relx,build_release,3,
       [{file,"/src/_build/default/lib/relx/src/relx.erl"},{line,77}]},
 {rebar_relx,do,2,[{file,"rebar_relx.erl"},{line,67}]},
 {rebar_core,do,2,[{file,"rebar_core.erl"},{line,155}]},
 {rebar_prv_do,do_task,5,[{file,"rebar_prv_do.erl"},{line,75}]},
 {rebar_core,do,2,[{file,"rebar_core.erl"},{line,155}]},
 {rebar3,run_aux,2,[{file,"rebar3.erl"},{line,181}]},
 {rebar3,main,1,[{file,"rebar3.erl"},{line,66}]},
 {escript,run,2,[{file,"escript.erl"},{line,758}]},
 {escript,start,1,[{file,"escript.erl"},{line,277}]},
 {init,start_em,1,[]},
 {init,do_boot,3,[]}]

Notice the name, which has been reversed ?

"-nosaj/bil/ppaym/ler/ppaym/dliub_/ppaym/smargorP/YYYYYY/sresU/"

What could be happening here ?

Regards

@ferd
Copy link
Contributor

ferd commented Feb 28, 2021

it's trying to add a version to the end of the filepath and failing because it's a binary instead of a list. I can't recall if that was patched in rebar3 (try a newer version) or judged to be a problem with the dep, or just not addressed yet

@auror
Copy link
Author

auror commented Feb 28, 2021

We're checking this on rebar3 3.14.3.

@tsloughter
Copy link
Collaborator

Can you check if the jason.app file has a binary for vsn.

@auror
Copy link
Author

auror commented Mar 1, 2021

@tsloughter Hmmm it's a string.

➜ cat _build/myapp/lib/jason/ebin/jason.app
{application,jason,
             [{applications,[kernel,stdlib,elixir]},
              {description,"A blazing fast JSON parser and generator in pure Elixir.\n"},
              {modules,['Elixir.Jason','Elixir.Jason.Codegen',
                        'Elixir.Jason.DecodeError','Elixir.Jason.Decoder',
                        'Elixir.Jason.Decoder.Unescape','Elixir.Jason.Encode',
                        'Elixir.Jason.EncodeError','Elixir.Jason.Encoder',
                        'Elixir.Jason.Encoder.Any',
                        'Elixir.Jason.Encoder.Atom',
                        'Elixir.Jason.Encoder.BitString',
                        'Elixir.Jason.Encoder.Date',
                        'Elixir.Jason.Encoder.DateTime',
                        'Elixir.Jason.Encoder.Decimal',
                        'Elixir.Jason.Encoder.Float',
                        'Elixir.Jason.Encoder.Integer',
                        'Elixir.Jason.Encoder.Jason.Fragment',
                        'Elixir.Jason.Encoder.List',
                        'Elixir.Jason.Encoder.Map',
                        'Elixir.Jason.Encoder.NaiveDateTime',
                        'Elixir.Jason.Encoder.Time','Elixir.Jason.Formatter',
                        'Elixir.Jason.Fragment','Elixir.Jason.Helpers']},
              {registered,[]},
              {vsn,"1.2.2"}]}.

The vsns for apps are usually UTF-8 strings i believe !

@zmstone
Copy link

zmstone commented Mar 17, 2021

the vsn suffix is appended correctly if we revert this commit:
erlang/rebar3@80671df

@zmstone
Copy link

zmstone commented Mar 17, 2021

and the workaround is to run rebar3 as profile do compile,release instead of rebar3 as profile release

@zmstone
Copy link

zmstone commented Mar 17, 2021

This does not seem to be an issue of rebar_mix.
Rather something to improve in rebar3 (maybe?)
so I created erlang/rebar3#2518

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants