Why is my notification hub message not being send to APNS?

Davy Meybos 45 Reputation points
2023-01-27T09:34:11.03+00:00

When using the Visual Studio Server Explorer > Notification Hubs > Device Registrations, I can see my device is registered with some tags and is not expired.

However, when sending a test message to a recipient with a corresponding tag, it says there were no matching targets:

Message was successfully sent, but there were no matching targets.

How is this possible when I see the device correctly listed in the Device Registrations?

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.
265 questions
{count} votes

1 answer

Sort by: Most helpful
  1. VenkateshDodda-MSFT 18,696 Reputation points Microsoft Employee
    2023-02-17T11:03:52.7033333+00:00

    @Davy Meybos Thanks for your patience on this. Summarizing and adding the answer based on the investigations and solution share in support ticket for the benefit of other community members.

    We have suggested to update the installation with new push channel as the existing push channel might be expired. Notification Hub backend sets the channel as expired when a send operation returns "BadChannel" or “ExpiredChannel” and “InvalidTokenSize” from APNS binary.

    Notification Hub do not initiate deletion of registrations or installations unless the devices reach your customized Time To Live or if our service gets a “token expired” error from Platform Notification Systems on an attempted send.

    Reference documents:

    1. Update installation: Update an installation | Microsoft Learn
    2. Push channel status: Read an installation | Microsoft Learn
    0 comments No comments