Problem when starting Phoenix app under umbrella

I’m following this article https://medium.com/@brucepomeroy/create-an-elixir-umbrella-project-containing-a-phoenix-app-and-build-a-release-with-distillery-46371f2617df, step by step …

a) created umbrella app and switched to ‘apps’ directory
b) created phoenix app under umbrella
c) created mix app under umbrella

… all based on tutorial above. Now when I got back to umbrella root directory and run

iex -S mix phoenix.server

i’m getting error as below. Any idea whats wrong here? I tried these few steps several times with the same error. I’m using Elixir 1.6.2 and Phoenix 1.3.1

[error] GenServer Phoenix.CodeReloader.Server terminating                                                                                      
** (RuntimeError) trying to access Mix.Project.app_path for an umbrella project but umbrellas have no app                                      
    (mix) lib/mix/project.ex:486: Mix.Project.app_path/1                                                                                       
    (phoenix) lib/phoenix/code_reloader/server.ex:28: Phoenix.CodeReloader.Server.handle_call/3                                                
    (stdlib) gen_server.erl:636: :gen_server.try_handle_call/4                                                                                 
    (stdlib) gen_server.erl:665: :gen_server.handle_msg/6                                                                                      
    (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3                                                                                     
Last message (from ChatWeb.Endpoint): :check_symlinks                                                                                          
State: false                                                                                                                                   
Client ChatWeb.Endpoint is alive                                                                                                               
    (stdlib) gen.erl:169: :gen.do_call/4                                                                                                       
    (elixir) lib/gen_server.ex:831: GenServer.call/3                                                                                           
    (phoenix) lib/phoenix/endpoint/supervisor.ex:62: Phoenix.Endpoint.Supervisor.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                                                                                     
                                                                                                                                               
[info] Application chat_web exited: ChatWeb.start(:normal, []) returned an error: shutdown: failed to start child: ChatWeb.Endpoint            
    ** (EXIT) exited in: GenServer.call(Phoenix.CodeReloader.Server, :check_symlinks, :infinity)                                               
        ** (EXIT) an exception was raised:                                                                                                     
            ** (RuntimeError) trying to access Mix.Project.app_path for an umbrella project but umbrellas have no app                          
                (mix) lib/mix/project.ex:486: Mix.Project.app_path/1                                                                           
                (phoenix) lib/phoenix/code_reloader/server.ex:28: Phoenix.CodeReloader.Server.handle_call/3                                    
                (stdlib) gen_server.erl:636: :gen_server.try_handle_call/4                                                                     
                (stdlib) gen_server.erl:665: :gen_server.handle_msg/6                                                                          
                (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3                                                                         
** (Mix) Could not start application chat_web: ChatWeb.start(:normal, []) returned an error: shutdown: failed to start child: ChatWeb.Endpoint 
    ** (EXIT) exited in: GenServer.call(Phoenix.CodeReloader.Server, :check_symlinks, :infinity)                                               
        ** (EXIT) an exception was raised:                                                                                                     
            ** (RuntimeError) trying to access Mix.Project.app_path for an umbrella project but umbrellas have no app                          
                (mix) lib/mix/project.ex:486: Mix.Project.app_path/1                                                                           
                (phoenix) lib/phoenix/code_reloader/server.ex:28: Phoenix.CodeReloader.Server.handle_call/3                                    
                (stdlib) gen_server.erl:636: :gen_server.try_handle_call/4                                                                     
                (stdlib) gen_server.erl:665: :gen_server.handle_msg/6                                                                          
                (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3

That tutorial looks outdated, Phoenix comes with built in umbrella support now. Just mix phx.new some_path --umbrella

That’s a known issue on 1.3.1

3 Likes