So this is the error which happens when the app is starting (deploying) so this is what happens when I try and deploy using System.get_env/1
to accesss the environment variables in the config - I can only see the env vars with printenv if I statically set those values and then deploy.
This error happens locally for me too when those environments arn’t set for example when running iex -S mix phx.server
without those envs set - which is why I’m thinking those envs arn’t set because its the same error.
2023-09-02T16:45:48Z app[2874365a619dd8] lhr [info] ** (EXIT) an exception was raised:
2023-09-02T16:45:48Z app[2874365a619dd8] lhr [info] ** (Auth0Jwks.Config.MissingValueError) Auth0 config [:auth0_jwks, :iss] is not set
2023-09-02T16:45:48Z app[2874365a619dd8] lhr [info] (auth0_jwks 0.2.0) lib/config.ex:9: Auth0Jwks.Config.get_config_or_error/2
2023-09-02T16:45:48Z app[2874365a619dd8] lhr [info] (auth0_jwks 0.2.0) lib/config.ex:28: Auth0Jwks.Config.jwks_url/0
2023-09-02T16:45:48Z app[2874365a619dd8] lhr [info] (auth0_jwks 0.2.0) lib/strategy.ex:3: Auth0Jwks.Strategy.init_opts/1
2023-09-02T16:45:48Z app[2874365a619dd8] lhr [info] (auth0_jwks 0.2.0) lib/strategy.ex:2: Auth0Jwks.Strategy.start_link/1
2023-09-02T16:45:48Z app[2874365a619dd8] lhr [info] (stdlib 5.0.2) supervisor.erl:420: :supervisor.do_start_child_i/3
2023-09-02T16:45:48Z app[2874365a619dd8] lhr [info] (stdlib 5.0.2) supervisor.erl:406: :supervisor.do_start_child/2
2023-09-02T16:45:48Z app[2874365a619dd8] lhr [info] (stdlib 5.0.2) supervisor.erl:390: anonymous fn/3 in :supervisor.start_children/2
2023-09-02T16:45:48Z app[2874365a619dd8] lhr [info] (stdlib 5.0.2) supervisor.erl:1256: :supervisor.children_map/4
2023-09-02T16:45:49Z app[2874365a619dd8] lhr [info] WARN Reaped child process with pid: 314 and signal: SIGUSR1, core dumped? false
2023-09-02T16:45:49Z app[2874365a619dd8] lhr [info] WARN Reaped child process with pid: 316 and signal: SIGUSR1, core dumped? false
2023-09-02T16:45:50Z app[2874365a619dd8] lhr [info]Kernel pid terminated (application_controller) ({application_start_failure,rock_map,{{shutdown,{failed_to_start_child,'Elixir.Auth0Jwks.Strategy',{'EXIT',{#{message => <<"Auth0 config [:auth0_jwks, :iss] is not set">>,'__struct__' => 'Elixir.Auth0Jwks.Config.MissingValueError','__exception__' => true},[{'Elixir.Auth0Jwks.Config',get_config_or_error,2,[{file,"lib/config.ex"},{line,9}]},{'Elixir.Auth0Jwks.Config',jwks_url,0,[{file,"lib/config.ex"},{line,28}]},{'Elixir.Auth0Jwks.Strategy',init_opts,1,[{file,"lib/strategy.ex"},{line,3}]},{'Elixir.Auth0Jwks.Strategy',start_link,1,[{file,"lib/strategy.ex"},{line,2}]},{supervisor,do_start_child_i,3,[{file,"supervisor.erl"},{line,420}]},{supervisor,do_start_child,2,[{file,"supervisor.erl"},{line,406}]},{supervisor,'-start_children/2-fun-0-',3,[{file,"supervisor.erl"},{line,390}]},{supervisor,children_map,4,[{file,"supervisor.erl"},{line,1256}]}]}}}},{'Elixir.RockMap.Application',start,[normal,[]]}}})