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

gen_stage not found on release build #18

Open
mkaravaev opened this issue Apr 13, 2018 · 3 comments
Open

gen_stage not found on release build #18

mkaravaev opened this issue Apr 13, 2018 · 3 comments

Comments

@mkaravaev
Copy link

mkaravaev commented Apr 13, 2018

For proper working on release built by distillery need to add gen_stage into application deps.
Without it application is failed with :failed_to_start_childern because it can't find GenStage module by Flowex.

{:error, {{:shutdown, {:failed_to_start_child, :"Flowex.Producer_Notifications.ProceedPipeline_#Reference<0.3448033567.1304952833.40974>", {:EXIT, {:undef, [{GenStage, :start_link, [Flowex.Producer, nil, [name: :"Flowex.Producer_Notifications.ProceedPipeline_#Reference<0.3448033567.1304952833.40974>"]], []},....
@mkaravaev mkaravaev changed the title gen_stage no found when build release gen_stage not found on release build Apr 13, 2018
@antonmi
Copy link
Owner

antonmi commented Apr 15, 2018

Hi @mkaravaev !
Flowex has gen_stage as runtime dependency, so (in theory) you needn't add it into the deps.
Is gen_stage installed when you run mix deps.get? Check your deps folder.

@Maples7
Copy link

Maples7 commented Sep 19, 2019

I met the same issue.
With MIX_ENV=prod mix release and _build/prod/rel/prod/bin/prod start, I got:

18:31:59.303 [info]  Application accio_downloader exited: exited in: AccioDownloader.Application.start(:normal, [])
    ** (EXIT) an exception was raised:
        ** (MatchError) no match of right hand side value: {:error, {{:shutdown, {:failed_to_start_child, :"Flowex.Producer_AccioDownloader.GFS.Pipeline_#Reference<0.1794704285.1749549059.253768>", {:EXIT, {:undef, [{GenStage, :start_link, [Flowex.Producer, nil, [name: :"Flowex.Producer_AccioDownloader.GFS.Pipeline_#Reference<0.1794704285.1749549059.253768>"]], []}, {:supervisor, :do_start_child_i, 3, [file: 'supervisor.erl', line: 379]}, {:supervisor, :do_start_child, 2, [file: 'supervisor.erl', line: 365]}, {:supervisor, :"-start_children/2-fun-0-", 3, [file: 'supervisor.erl', line: 349]}, {:supervisor, :children_map, 4, [file: 'supervisor.erl', line: 1157]}, {:supervisor, :init_children, 2, [file: 'supervisor.erl', line: 315]}, {:gen_server, :init_it, 2, [file: 'gen_server.erl', line: 374]}, {:gen_server, :init_it, 6, [file: 'gen_server.erl', line: 342]}]}}}}, {:child, :undefined, :"Flowex.Supervisor_AccioDownloader.GFS.Pipeline_#Reference<0.1794704285.1749549059.253773>", {Flowex.Supervisor, :start_link, [[{:"Flowex.Producer_AccioDownloader.GFS.Pipeline_#Reference<0.1794704285.1749549059.253768>", {Flowex.Producer, :start_link, [nil, [name: :"Flowex.Producer_AccioDownloader.GFS.Pipeline_#Reference<0.1794704285.1749549059.253768>"]]}, :permanent, 5000, :worker, [Flowex.Producer]}, {:"Flowex_Elixir.AccioDownloader.GFS.Pipeline.get_date_dir_list_#Reference<0.1794704285.1749549059.253769>", {Flowex.Stage, :start_link, [%Flowex.StageOpts{function: :get_date_dir_list, module: AccioDownloader.GFS.Pipeline, name: :"Flowex_Elixir.AccioDownloader.GFS.Pipeline.get_date_dir_list_#Reference<0.1794704285.1749549059.253769>", opts: %{}, producer_names: [:"Flowex.Producer_AccioDownloader.GFS.Pipeline_#Reference<0.1794704285.1749549059.253768>"], type: :pipe}, [name: :"Flowex_Elixir.AccioDownloader.GFS.Pipeline.get_date_dir_list_#Reference<0.1794704285.1749549059.253769>"]]}, :permanent, 5000, :worker, [Flowex.Stage]}, {:"Flowex_Elixir.AccioDownloader.GFS.Pipeline.download_data_#Reference<0.1794704285.1749549059.253770>", {Flowex.Stage, :start_link, [%Flowex.StageOpts{function: :download_data, module: AccioDownloader.GFS.Pipeline, name: :"Flowex_Elixir.AccioDownloader.GFS.Pipeline.download_data_#Reference<0.1794704285.1749549059.253770>", opts: %{}, producer_names: [:"Flowex_Elixir.AccioDownloader.GFS.Pipeline.get_date_dir_list_#Reference<0.1794704285.1749549059.253769>"], type: :pipe}, [name: :"Flowex_Elixir.AccioDownloader.GFS.Pipeline.download_data_#Reference<0.1794704285.1749549059.253770>"]]}, :permanent, 5000, :worker, [Flowex.Stage]}, {:"Flowex_Elixir.AccioDownloader.GFS.Pipeline.error_handler_#Reference<0.1794704285.1749549059.253771>", {Flowex.Stage, :start_link, [%Flowex.StageOpts{function: :error_handler, module: AccioDownloader.GFS.Pipeline, name: :"Flowex_Elixir.AccioDownloader.GFS.Pipeline.error_handler_#Reference<0.1794704285.1749549059.253771>", opts: %{}, producer_names: [:"Flowex_Elixir.AccioDownloader.GFS.Pipeline.download_data_#Reference<0.1794704285.1749549059.253770>"], type: :error_pipe}, [name: :"Flowex_Elixir.AccioDownloader.GFS.Pipeline.error_handler_#Reference<0.1794704285.1749549059.253771>"]]}, :permanent, 5000, :worker, [Flowex.Stage]}, {:"Flowex.Consumer_AccioDownloader.GFS.Pipeline_#Reference<0.1794704285.1749549059.253772>", {Flowex.Consumer, :start_link, [[:"Flowex_Elixir.AccioDownloader.GFS.Pipeline.error_handler_#Reference<0.1794704285.1749549059.253771>"], [name: :"Flowex.Consumer_AccioDownloader.GFS.Pipeline_#Reference<0.1794704285.1749549059.253772>"]]}, :permanent, 5000, :worker, [Flowex.Consumer]}], :"Flowex.Supervisor_AccioDownloader.GFS.Pipeline_#Reference<0.1794704285.1749549059.253773>"]}, :permanent, :infinity, :supervisor, [Flowex.Supervisor]}}}
            (flowex) lib/flowex/pipeline_builder.ex:20: Flowex.PipelineBuilder.supervised_start/3
            (accio_downloader) lib/accio_downloader/application.ex:27: anonymous fn/3 in AccioDownloader.Application.start/2
            (stdlib) maps.erl:257: :maps.fold_1/3
            (accio_downloader) lib/accio_downloader/application.ex:26: AccioDownloader.Application.start/2
            (kernel) application_master.erl:277: :application_master.start_it_old/4
{"Kernel pid terminated",application_controller,"{application_start_failure,accio_downloader,{bad_return,{{'Elixir.AccioDownloader.Application',start,[normal,[]]},{'EXIT',{{badmatch,{error,{{shutdown,{failed_to_start_child,'Flowex.Producer_AccioDownloader.GFS.Pipeline_#Reference<0.1794704285.1749549059.253768>',{'EXIT',{undef,[{'Elixir.GenStage',start_link,['Elixir.Flowex.Producer',nil,[{name,'Flowex.Producer_AccioDownloader.GFS.Pipeline_#Reference<0.1794704285.1749549059.253768>'}]],[]},{supervisor,do_start_child_i,3,[{file,\"supervisor.erl\"},{line,379}]},{supervisor,do_start_child,2,[{file,\"supervisor.erl\"},{line,365}]},{supervisor,'-start_children/2-fun-0-',3,[{file,\"supervisor.erl\"},{line,349}]},{supervisor,children_map,4,[{file,\"supervisor.erl\"},{line,1157}]},{supervisor,init_children,2,[{file,\"supervisor.erl\"},{line,315}]},{gen_server,init_it,2,[{file,\"gen_server.erl\"},{line,374}]},{gen_server,init_it,6,[{file,\"gen_server.erl\"},{line,342}]}]}}}},{child,undefined,'Flowex.Supervisor_AccioDownloader.GFS.Pipeline_#Reference<0.1794704285.1749549059.253773>',{'Elixir.Flowex.Supervisor',start_link,[[{'Flowex.Producer_AccioDownloader.GFS.Pipeline_#Reference<0.1794704285.1749549059.253768>',{'Elixir.Flowex.Producer',start_link,[nil,[{name,'Flowex.Producer_AccioDownloader.GFS.Pipeline_#Reference<0.1794704285.1749549059.253768>'}]]},permanent,5000,worker,['Elixir.Flowex.Producer']},{'Flowex_Elixir.AccioDownloader.GFS.Pipeline.get_date_dir_list_#Reference<0.1794704285.1749549059.253769>',{'Elixir.Flowex.Stage',start_link,[#{'__struct__' => 'Elixir.Flowex.StageOpts',function => get_date_dir_list,module => 'Elixir.AccioDownloader.GFS.Pipeline',name => 'Flowex_Elixir.AccioDownloader.GFS.Pipeline.get_date_dir_list_#Reference<0.1794704285.1749549059.253769>',opts => #{},producer_names => ['Flowex.Producer_AccioDownloader.GFS.Pipeline_#Reference<0.1794704285.1749549059.253768>'],type => pipe},[{name,'Flowex_Elixir.AccioDownloader.GFS.Pipeline.get_date_dir_list_#Reference<0.1794704285.1749549059.253769>'}]]},permanent,5000,worker,['Elixir.Flowex.Stage']},{'Flowex_Elixir.AccioDownloader.GFS.Pipeline.download_data_#Reference<0.1794704285.1749549059.253770>',{'Elixir.Flowex.Stage',start_link,[#{'__struct__' => 'Elixir.Flowex.StageOpts',function => download_data,module => 'Elixir.AccioDownloader.GFS.Pipeline',name => 'Flowex_Elixir.AccioDownloader.GFS.Pipeline.download_data_#Reference<0.1794704285.1749549059.253770>',opts => #{},producer_names => ['Flowex_Elixir.AccioDownloader.GFS.Pipeline.get_date_dir_list_#Reference<0.1794704285.1749549059.253769>'],type => pipe},[{name,'Flowex_Elixir.AccioDownloader.GFS.Pipeline.download_data_#Reference<0.1794704285.1749549059.253770>'}]]},permanent,5000,worker,['Elixir.Flowex.Stage']},{'Flowex_Elixir.AccioDownloader.GFS.Pipeline.error_handler_#Reference<0.1794704285.1749549059.253771>',{'Elixir.Flowex.Stage',start_link,[#{'__struct__' => 'Elixir.Flowex.StageOpts',function => error_handler,module => 'Elixir.AccioDownloader.GFS.Pipeline',name => 'Flowex_Elixir.AccioDownloader.GFS.Pipeline.error_handler_#Reference<0.1794704285.1749549059.253771>',opts => #{},producer_names => ['Flowex_Elixir.AccioDownloader.GFS.Pipeline.download_data_#Reference<0.1794704285.1749549059.253770>'],type => error_pipe},[{name,'Flowex_Elixir.AccioDownloader.GFS.Pipeline.error_handler_#Reference<0.1794704285.1749549059.253771>'}]]},permanent,5000,worker,['Elixir.Flowex.Stage']},{'Flowex.Consumer_AccioDownloader.GFS.Pipeline_#Reference<0.1794704285.1749549059.253772>',{'Elixir.Flowex.Consumer',start_link,[['Flowex_Elixir.AccioDownloader.GFS.Pipeline.error_handler_#Reference<0.1794704285.1749549059.253771>'],[{name,'Flowex.Consumer_AccioDownloader.GFS.Pipeline_#Reference<0.1794704285.1749549059.253772>'}]]},permanent,5000,worker,['Elixir.Flowex.Consumer']}],'Flowex.Supervisor_AccioDownloader.GFS.Pipeline_#Reference<0.1794704285.1749549059.253773>']},permanent,infinity,supervisor,['Elixir.Flowex.Supervisor']}}}},[{'Elixir.Flowex.PipelineBuilder',supervised_start,3,[{file,\"lib/flowex/pipeline_builder.ex\"},{line,20}]},{'Elixir.AccioDownloader.Application','-start/2-fun-0-',3,[{file,\"lib/accio_downloader/application.ex\"},{line,27}]},{maps,fold_1,3,[{file,\"maps.erl\"},{line,257}]},{'Elixir.AccioDownloader.Application',start,2,[{file,\"lib/accio_downloader/application.ex\"},{line,26}]},{application_master,start_it_old,4,[{file,\"application_master.erl\"},{line,277}]}]}}}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,accio_downloader,{bad_return,{{'Elixir.AccioDownloader.Application',start,[normal,[]]},{'EXIT',{{badmatch,{error,{{shutdown,{

Crash dump is being written to: erl_crash.dump...done

@Maples7
Copy link

Maples7 commented Sep 19, 2019

I fixed the issue by adding :gen_stage in my extra_applications settings.

# Run "mix help compile.app" to learn about applications.
def application do
  [
    extra_applications: [:logger, :gen_stage],
    mod: {AccioDownloader.Application, []}
  ]
end

But I think this should be done in mix.exs of flowex, I'd like to raise a Pull Request to fix it.

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

No branches or pull requests

3 participants