Recently our Azure Notification Hub became a very mysterious entity. When Apple devices register we can see them in Service Bus Explorer and as soon as we try sending any no
We had this exact error, but it turned out we were accidently using a "distribution" provisioning profile with a "development"/ sandbox push notification certificate. After switching to a development provisioning profile, push notifications worked!
Turns out the front end guys were unsubscribing too eagerly. Removing the unsubscribe code sorted out the issue. Also there was a problem with the APNS certificate, in order to run the front end app in debug it requires a sandbox certificate, not a production one, for the messages to be delivered properly.
Notification hub cleans up registrations with invalid tokens during the send flow. Looks like for some reasons APNS rejects your tokens and NH just removes registrations. Make sure: