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

Couldn't start application badarg jose_jws #212

Open
rlopzc opened this issue Oct 31, 2021 · 3 comments
Open

Couldn't start application badarg jose_jws #212

rlopzc opened this issue Oct 31, 2021 · 3 comments

Comments

@rlopzc
Copy link

rlopzc commented Oct 31, 2021

Environment

  • Pigeon version: 2.0.0-rc.0
  • Elixir & Erlang/OTP versions (elixir --version): 1.12.3
  • Operating system: Alpine docker

Current behavior

Running my server in a Docker container reports this error:

{"Kernel pid terminated",application_controller,"{application_start_failure,okani,{{shutdown,{failed_to_start_child,'Elixir.Okani.FCM',{shutdown,{failed_to_start_child,1,{{badarg,[[],{jose_jws,{jose_jws_alg_rsa_pkcs1_v1_5,'RS256'},undefined,#{<<\"typ\">> => <<\"JWT\">>}},#{<<\"aud\">> => <<\"https://www.googleapis.com/oauth2/v4/token\">>,<<\"exp\">> => 1635692342,<<\"iat\">> => 1635688742,<<\"iss\">> => <<\"[email protected]">>,<<\"scope\">> => <<\"https://www.googleapis.com/auth/cloud-platform https://www.googleapis.com/auth/firebase.messaging\">>}]},[{jose_jwt,sign,3,[{file,\"src/jwt/jose_jwt.erl\"},{line,184}]},{'Elixir.Goth.Token',jwt_encode,2,[{file,\"lib/goth/token.ex\"},{line,214}]},{'Elixir.Goth.Token',request,1,[{file,\"lib/goth/token.ex\"},{line,133}]},{'Elixir.Pigeon.FCM',init,1,[{file,\"lib/pigeon/fcm.ex\"},{line,122}]},{'Elixir.Pigeon.DispatcherWorker',init,1,[{file,\"lib/pigeon/dispatcher_worker.ex\"},{line,12}]},{gen_server,init_it,2,[{file,\"gen_server.erl\"},{line,423}]},{gen_server,init_it,6,[{file,\"gen_server.erl\"},{line,390}]},{proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,226}]}]}}}}},{'Elixir.Okani.Application',start,[normal,[]]}}}"}

And crashes my whole application

I'm reading the service account json from an env variable, I confirmed that is read correctly

Expected behavior

App doesn't crash and everything works

@jollyjerr
Copy link

We are having this issue as well. Did you find a fix @rlopzc ?

@rlopzc
Copy link
Author

rlopzc commented Apr 27, 2023

Hey @jollyjerr! No, I downgraded to 1.x to make it work 😕

@jollyjerr
Copy link

Ah alright, thank you for letting me know!

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

No branches or pull requests

2 participants