pigeon
pigeon copied to clipboard
APNS with Certificate :missing_provider_token
Environment
Elixir 1.13.4 (compiled with Erlang/OTP 25)
macOS Monterey
{:pigeon, "~> 2.0.0-rc.0"}
Current behavior
Followed instructions here to populate files used below in config.exs
:
config :myapp, MyAppWeb.APNS,
adapter: Pigeon.APNS,
cert: File.read!("cert.pem"),
key: File.read!("key_unencrypted.pem"),
mode: :dev
Push fails with :missing_provider_token
iex(2)> Pigeon.APNS.Notification.new(msg, push_token, dev_bundle_id) |> MyApp.APNS.push()
%Pigeon.APNS.Notification{
__meta__: %Pigeon.Metadata{
on_response: #Function<1.17011949/1 in Pigeon.push_sync/3>
},
collapse_id: nil,
device_token: "c8ec24d1031bd6b6794cb443515cfc6448eccbb251b76695b74383ac920655bc",
expiration: nil,
id: nil,
payload: %{"aps" => %{"alert" => "Hi"}},
priority: nil,
push_type: "alert",
response: :missing_provider_token,
topic: "com.myappco.myapp.ios.dev"
}
Expected behavior
Push goes thru
How to debug ?
I have been facing this with latest elixir and OTP (1.13.4/25). Downgrading to elixir 1.11.X works. The certificated supplied does not get recognised looks like. I tried using Mint HTTP2 too and same behavior. So it does not looks like related to pigeon directly. But not sure what's causing it.
I have been facing this with latest elixir and OTP (1.13.4/25). Downgrading to elixir 1.11.X works. The certificated supplied does not get recognised looks like. I tried using Mint HTTP2 too and same behavior. So it does not looks like related to pigeon directly. But not sure what's causing it.
I can confirm it works with 1.11.x. Could this be a plug_cowboy
issue?
I have been facing this with latest elixir and OTP (1.13.4/25). Downgrading to elixir 1.11.X works. The certificated supplied does not get recognised looks like. I tried using Mint HTTP2 too and same behavior. So it does not looks like related to pigeon directly. But not sure what's causing it.
I can confirm it works with 1.11.x. Could this be a
plug_cowboy
issue?
I tried on pigeon 1.6. I think it is more of a lower level erlang SSL/TLS issue because I saw the same behavior with Mint too (Mint is just a wrapper over the erlang library).
seems like it's an OTP issue, OTP 24 works while 25 fails following works for me
elixir 1.13.4-otp-24
erlang 24.3.4.3
...
{:pigeon, "~> 2.0.0-rc.1"}
If I understand this correctly, pigeon currently does NOT work with OTP 25 as I just found out myself today. Why has this issue been closed?
This threw me for a loop. Going to reopen and take a look this week.
For the record I was able to fix this by updating to the latest version of Elixir and Erlang [25.2.1 and 1.14.3].
docker alpine + Elixir 1.14.0 + Erlang 25 = missing_provider_token docker alpine + Elixir 1.12.3 + Erlang 24 = OK mac + Elixir 1.14.3 + erlang 24.3.4.10 = OK