Phoenix: live_reload fails on umbrella app with multiple webs

Created on 21 Jul 2018  Â·  7Comments  Â·  Source: phoenixframework/phoenix

Jose just confirmed this bug

https://github.com/phoenixframework/phoenix_live_reload/issues/82

I have a phoenix 1.4-dev umbrella app that was working in live reload mode in dev until recently, maybe 4 weeks or so

the structure is thus

web_1
web_2
web_3
db

when live reload is turned off the entire umbrella app will run

when live reload is on and I run MIX_ENV=dev iex -S mix phx.server within web_x folder live reload works

I havent got a public demo codebase for this

(I think also Distillery is also broken in this config, havent checked it yet)

I thinking I am running all the latest packages

* (Mix) Could not start application website_com_web: WebsiteComWeb.Application.start(:normal, []) returned an error: shutdown: failed to start child: WebsiteComWeb.Endpoint
*
(EXIT) shutdown: failed to start child: Phoenix.LiveReloader.Socket
** (EXIT) already started: #PID<0.9478.0

Most helpful comment

wow, fast
yes, its working now I think !
great ecosystem, great code!

All 7 comments

commit doesn't fix for me

I run mix deps.clean --all && mix deps.get --all

and get the same error

live_reload works when running from web_x in the umbrella, but when I run from the root of the umbrella it fails

I am on Ubuntu 18 and am having problems with live reload when running from web_x ... I need to refresh the browser to trigger

will check from mac and ubuntu 16

“mix deps.get” does not update your dependencies. Do “mix deps.update
phoenix” instead and run “mix deps” later to confirm you are using a recent
git ref. I would expect at least the error message to change, as we no

longer name the socket trees.

José Valimwww.plataformatec.com.br
http://www.plataformatec.com.br/Founder and Director of R&D

thanks

on Xenial

 MIX_ENV=dev iex -S mix phx.server
Erlang/OTP 20 [erts-9.3] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:10] [kernel-poll:false]

** (Mix) Could not start application website_com_web: WebsiteComWeb.Application.start(:normal, []) returned an error: shutdown: failed to start child: WebsiteComWeb.Endpoint
    ** (EXIT) shutdown: failed to start child: Phoenix.LiveReloader.Socket
        ** (EXIT) an exception was raised:
            ** (ArgumentError) argument error
                (stdlib) :ets.new(Phoenix.LiveReloader.Socket, [:named_table, :public, {:read_concurrency, true}])
                (phoenix) lib/phoenix/socket/pool_supervisor.ex:32: Phoenix.Socket.PoolSupervisor.init/1
                (stdlib) supervisor.erl:294: :supervisor.init/1
                (stdlib) gen_server.erl:365: :gen_server.init_it/2
                (stdlib) gen_server.erl:333: :gen_server.init_it/6
                (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3

Great. It is a new error!

We need to remove :named_table from lib/phoenix/socket/pool_supervisor.ex:32

José Valimwww.plataformatec.com.br
http://www.plataformatec.com.br/Founder and Director of R&D

It should be good in master now.

wow, fast
yes, its working now I think !
great ecosystem, great code!

Was this page helpful?
0 / 5 - 0 ratings