Azure Notification Hub not sending notifications to Apple devices

afcec 21 Reputation points
2022-03-16T12:09:02.117+00:00

Hi,

I have a notification hub in Azure that is used by a Java service that handles the push notifications for an app developed for both, Android and iOS. Everything works just fine with Android but the behaviour with Apple is quite weird:

  1. I have configured the APNS for both, production and sandbox application modes, using certificates for authentication. The certificates are protected with a password.
  2. After finishing the configuration, if I go to Test Send --> Platform Apple and I try to send a notification with the default payload it typically fails with the following message: "The Notification could not be delivered due to an unknown error". However, sometimes, let´s say 1 out of 10 times it works

Is there anything I could check to know what can be happening? the error message is not very descriptive and the fact that it randomly works does not help either...

Thanks in advance

Azure Notification Hubs
Azure Notification Hubs
An Azure service that is used to send push notifications to all major platforms from the cloud or on-premises environments.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ajkuma 28,136 Reputation points Microsoft Employee Moderator
    2022-03-17T19:38:26.037+00:00

    @afcec , Thanks for the detailed question. Apologies you’re experiencing this issue.

    -As I understand the issue only affects iOS device, 1/10 times it works and also you mentioned about (1) configurating the APNS for both, production and sandbox application modes – just to clarify -
    (if you haven’t done this already)- You must upload the certificate you use in a sandbox environment to a separate hub than the certificate/hub you'll use in production. If you have uploaded different types of certificates to the same hub. It may cause notification failures.

    --If you inadvertently upload different types of certificates to the same hub, you should delete the hub and start fresh with a new hub. If for some reason you can't delete the hub, you must at least delete all the existing registrations from the hub. || Reference -APN configuration

    --If you're leveraging a lower tier, please try upgrading to an higher tier and perform a quick test.

    --Also, review Diagnose and solve problems blade to fetch some more details about the error -
    Navigate to your Notification Hub on Azure Portal and select ‘Diagnose and solve problems’

    Diagnose and solve problems blade


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.