danhper / pushex

Push notifications for Elixir
https://hexdocs.pm/pushex
MIT License
104 stars 7 forks source link

Could not start application apns: exited in: APNS.start(:normal, []) #4

Open martinos opened 7 years ago

martinos commented 7 years ago

It seems that the documentation is incomplete.

I tried the config with my updated infos in the README example without success it seems that the apns config needs a pools section. Can you update the README.md ?

** (Mix) Could not start application apns: exited in: APNS.start(:normal, [])
    ** (EXIT) an exception was raised:
        ** (Protocol.UndefinedError) protocol Enumerable not implemented for nil
            (elixir) lib/enum.ex:1: Enumerable.impl_for!/1
            (elixir) lib/enum.ex:116: Enumerable.reduce/3
            (elixir) lib/enum.ex:1636: Enum.reduce/3
            (elixir) lib/enum.ex:1188: Enum.map/2
            (apns) lib/apns.ex:35: APNS.start/2
            (kernel) application_master.erl:273: :application_master.start_it_old/4
danhper commented 7 years ago

Hi, thanks for reporting. I just created an issue in the apns library to see if we can get around this without requiring the user to add any extra configuration. I will updated the README if I cannot get this patch merged.

I will keep this issue open until I get an answer, in the meanwhile, you can add

config :apns,
  pools: []

to your config.exs to fix the issue.