esl / MongoosePush

MongoosePush is a simple Elixir RESTful service allowing to send push notification via FCM and/or APNS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

module Goth.Supervisor is not available

apathyzen opened this issue · comments

2019-10-16T12:37:35.639 [info] pid=<0.1472.0> Application mongoose_push exited: MongoosePush.Application.start(:normal, []) returned an error: shutdown: failed to start child: :fcm_pool_sup
ervisor
** (EXIT) shutdown: failed to start child: :fcm_sparrow_supervisor
** (EXIT) shutdown: failed to start child: Sparrow.FCM.V1.TokenBearer
** (EXIT) an exception was raised:
** (UndefinedFunctionError) function Goth.Supervisor.start_link/0 is undefined (module Goth.Supervisor is not available)
Goth.Supervisor.start_link()
(stdlib) supervisor.erl:379: :supervisor.do_start_child_i/3
(stdlib) supervisor.erl:365: :supervisor.do_start_child/2
(stdlib) supervisor.erl:349: anonymous fn/3 in :supervisor.start_children/2
(stdlib) supervisor.erl:1157: :supervisor.children_map/4
(stdlib) supervisor.erl:315: :supervisor.init_children/2
(stdlib) gen_server.erl:374: :gen_server.init_it/2
(stdlib) gen_server.erl:342: :gen_server.init_it

Hi @apathyzen. To get to the bottom of this I'd like to know:

  1. What version of MongoosePush are You running? (You can also check sparrow ref in mix.exs file)
  2. How do you run it (from docker or from source)?

docker pull mongooseim/mongoose-push

and then this:

docker run -v /opt/app/priv:/opt/app/priv -e PUSH_APNS_DEV_CERT="/priv/apns/dev_cert.pem" -e PUSH_APNS_DEV_KEY="/priv/apns/dev_key.pem" -e PUSH_APNS_PROD_CERT="/priv/apns/prod_cert.pem" -e PUSH_APNS_PROD_KEY="/priv/apns/prod_key.pem" -e PUSH_HTTPS_CERTFILE="/opt/app/priv/ssl/rest_cert.pem" -e PUSH_HTTPS_KEYFILE="/opt/app/priv/ssl/rest_key.pem" -it --rm mongooseim/mongoose-push:latest

It's the same with
MIX_ENV=prod mix do deps.get, compile, certs.dev, distillery.release
_build/prod/rel/mongoose_push/bin/mongoose_push foreground

Hi @apathyzen,

Indeed, there is an issue with MongoosePush 2.0.0-alpha1 startup. It should be fixed by #109 .
Please note, that current master points to Alpha version of MongoosePush. Unless you need to use its new features (FCMv1, APNS token auth etc.) I advice using tagged versions (latest is 1.0.5) at least till 2.0.0 beta is released.

Fix has been merged. Closing.