Giter VIP home page Giter VIP logo

Comments (2)

theanhoo avatar theanhoo commented on September 22, 2024

Turns out it's missing the token.json file required for FCM.

from mongoosepush.

ironman512 avatar ironman512 commented on September 22, 2024

MongoosePush 2.1.0, local build

There was no error running mongooseim/mongoose-push:latest but the Docker image I built crashes at startup. Both were started using the same parameters.

Update: Are the token.p8 files mandatory?

Please advise.

Thank you.

Build

docker build . -t mpush:latest

Start

  docker run -v /opt/MongoosePush/priv:/opt/app/priv \
    --name MONGOOSEPUSH \
    -v /etc/localtime:/etc/localtime \
    -v /etc/timezone:/etc/timezone \
    -p 8443:8443 \
    -e PUSH_FCM_APP_KEY=$FCM_APP_KEY \
    -e PUSH_HTTPS_CERTFILE="/opt/app/priv/ssl/self_signed_cert.pem" \
    -e PUSH_HTTPS_KEYFILE="/opt/app/priv/ssl/self_signed_key.pem" \
    -e PUSH_FCM_ENABLED=true \
    -e PUSH_APNS_DEV_USE_2197=false \
    -e PUSH_APNS_DEV_CERT="priv/apns/development_cert.pem" \
    -e PUSH_APNS_DEV_KEY="priv/apns/development_key.pem" \
    -e PUSH_APNS_DEV_POOL_SIZE=5 \
    -e PUSH_APNS_ENABLED=true \
    -e PUSH_LOGLEVEL=debug \
    -it --rm mpush:latest

Error log

when=2020-07-21T19:31:57.304 severity=info what=init text="Starting PoolsWarden" at=Elixir.Sparrow.PoolsWarden.init/1:95 pid=#PID<0.1802.0> result=success worker=pools_warden file=lib/sparrow/pools_warden.ex application=sparrow
{"application":"mongoose_push","at":"Elixir.MongoosePush.Application.check_runtime_configuration_status/0:188","file":"lib/mongoose_push/application.ex","path":"var/config.toml","pid":"#PID<0.1856.0>","reason":"enoent","severity":"info","status":"skipped","text":"Skipping TOML configuration due to file not present","what":"toml_configuration","when":"2020-07-21T19:31:57.335"}
{"application":"mongoose_push","at":"Elixir.MongoosePush.Service.APNS.Supervisor.convert_token_pool_to_sparrow/2:150","file":"lib/mongoose_push/service/apns/supervisor.ex","mode":"dev","p8_file":"/opt/app/lib/mongoose_push-2.1.0/priv/apns/token.p8","pid":"#PID<0.1860.0>","reason":"bad_auth","result":"error","severity":"error","text":"Required configuration missing","what":"configuration","when":"2020-07-21T19:31:57.341"}
{"application":"mongoose_push","at":"Elixir.MongoosePush.Service.APNS.Supervisor.convert_token_pool_to_sparrow/2:150","file":"lib/mongoose_push/service/apns/supervisor.ex","mode":"prod","p8_file":"/opt/app/lib/mongoose_push-2.1.0/priv/apns/token.p8","pid":"#PID<0.1860.0>","reason":"bad_auth","result":"error","severity":"error","text":"Required configuration missing","what":"configuration","when":"2020-07-21T19:31:57.341"}
{"at":"application_controller.info_exited/3:1938","file":"application_controller.erl","pid":"#PID<0.1641.0>","severity":"info","text":"Application mongoose_push exited: MongoosePush.Application.start(:normal, []) returned an error: shutdown: failed to start child: :apns_supervisor\n    ** (EXIT) MongoosePush.Service.APNS.Supervisor.init/1 returned a bad value: {:stop, :bad_auth}","what":"","when":"2020-07-21T19:31:57.349"}
=SUPERVISOR REPORT==== 21-Jul-2020::19:31:57.404208 ===
    supervisor: {local,gr_counter_sup}
    errorContext: child_terminated
    reason: killed
    offender: [{pid,<0.1723.0>},
               {id,gr_lager_default_tracer_counters},
               {mfargs,{gr_counter,start_link,
                                   [gr_lager_default_tracer_counters]}},
               {restart_type,transient},
               {shutdown,brutal_kill},
               {child_type,worker}]
=SUPERVISOR REPORT==== 21-Jul-2020::19:31:57.405043 ===
    supervisor: {local,gr_param_sup}
    errorContext: child_terminated
    reason: killed
    offender: [{pid,<0.1722.0>},
               {id,gr_lager_default_tracer_params},
               {mfargs,{gr_param,start_link,[gr_lager_default_tracer_params]}},
               {restart_type,transient},
               {shutdown,brutal_kill},
               {child_type,worker}]
{"Kernel pid terminated",application_controller,"{application_start_failure,mongoose_push,{{shutdown,{failed_to_start_child,apns_supervisor,{bad_return,{'Elixir.MongoosePush.Service.APNS.Supervisor',init,{stop,bad_auth}}}}},{'Elixir.MongoosePush.Application',start,[normal,[]]}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,mongoose_push,{{shutdown,{failed_to_start_child,apns_supervisor,{bad_return,{'Elixir.MongoosePush.Service.APNS.Supervisor',in

Crash dump is being written to: erl_crash.dump...done

Build warnings

warning: function Poison.EncodeError.exception/1 is undefined (module Poison.EncodeError is not available)
  lib/jose/poison/lexical_encoder.ex:8

warning: String.strip/1 is deprecated. Use String.trim/1 instead
  /opt/app/deps/poison/mix.exs:4

warning: Integer.to_char_list/2 is deprecated. Use Integer.to_charlist/2 instead
  lib/poison/encoder.ex:173

warning: function Mix.Releases.Release.get/1 is undefined (module Mix.Releases.Release is not available)
  lib/mix_docker.ex:193

warning: function :"APNS-Topics".decode/2 is undefined (module :"APNS-Topics" is not available)
  lib/mongoose_push/service/apns/certificate.ex:45

Hey your docker build has done successfully? Kidnly help me my docker container have some build errors

from mongoosepush.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.