Deploy Phoenix application in Heroku, but result in application error

Hello,

I’m deployed my application in Heroku, but although deploy ok, in browser show view: “Application Error” (Image)

In log show message:

at=error code=H10 desc=“App crashed” method=GET path=“/” host=boom-one.herokuapp.com request_id=90b53153-3cfc-4348-ae90-109e0b596e32 fwd=“191.178.6.99” dyno= connect= service= status=503 bytes= protocol=https

The Only clue of error is in log of application:

State changed from crashed to starting
2017-03-31T020 heroku[web.1]: Process exited with status 1
1]: Starting process with command MIX_ENV=prod mix phoenix.server

=INFO REPORT==== 31-Mar-2017::02:20:04 ===
application: boom_one
exited: {{shutdown,
{failed_to_start_child,‘Elixir.BoomOne.Endpoint’,
{shutdown,
{failed_to_start_child,‘Elixir.Phoenix.Endpoint.Server’,
{shutdown,
{failed_to_start_child,
{ranch_listener_sup,‘Elixir.BoomOne.Endpoint.HTTP’},
{‘EXIT’,
{noproc,
{gen_server,call,
[ranch_server,
{set_new_listener_opts,‘Elixir.BoomOne.Endpoint.HTTP’,
16384,
[{env,
[{‘‘,[],
[{[<<“socket”>>,<<“websocket”>>],
[{dispatch,
[],‘Elixir.Phoenix.Endpoint.CowboyWebSocket’,
{‘Elixir.Phoenix.Transports.WebSocket’,
{‘Elixir.BoomOne.Endpoint’,
‘Elixir.BoomOne.UserSocket’,websocket}}},
{‘Elixir.BoomOne.Endpoint’,
{’
’,,‘Elixir.Plug.Adapters.Cowboy.Handler’,
}}]}]}]}]}]}}}}}}}}},
{‘Elixir.BoomOne’,start,[normal,]}}
type: permanent
** (exit) exited in: GenServer.call(Mix.State, {:get, {Map, :get, [:debug, false]}}, 5000)
** (EXIT) no process
(mix) lib/mix/cli.ex:65: Mix.CLI.run_task/2
(elixir) lib/code.ex:363: Code.require_file/2
(elixir) lib/gen_server.ex:596: GenServer.call/3

{“init terminating in do_boot”,{noproc,{gen_server,call,[elixir_config,{get_and_put,at_exit,}]}}}

init terminating in do_boot ()
Crash dump is being written to: erl_crash.dump…done
1]: Process exited with status 1
1]: State changed from starting to crashed

I followed this phoenix page tutorial on heroku.

Thanks in advance!

1 Like

On a first glance the stack trace looks as if an dependent application hasn’t been started please show application function from mix.exs as well as your deps.

1 Like

application function from mix.exs :

def application do
[mod: {BoomOne, },
extra_applications: [:logger]]
end

deps:

defp deps do
[{:phoenix, “~> 1.0”},
{:phoenix_pubsub, “~> 1.0”},
{:phoenix_ecto, “~> 3.1-rc”},
{:postgrex, “>= 0.0.0”},
{:phoenix_html, “~> 2.6”},
{:phoenix_live_reload, “~> 1.0”, only: :dev},
{:gettext, “~> 0.11”},
{:cowboy, “~> 1.0”}]
end

Full application on github

1 Like

Your mix file is only understood by elixir 1.4 and newer, please specify this as minimum version and make sure 1.4 is used on heroku. Alternatively you can rewrite application to be 1.0 conforming. You basically need to specify all runtime deps as dependent apps then.

2 Likes

as @NobbZ said, you just need to alter your buildpack configuration to use Elixir > 1.4 and you should be all good.

1 Like

Really I’m changed version elixir and phoenix for verion 1.3 and the application run correctly

Thanks guys!