We are running a .NET 4.8 server application that is handling APN and FCMv1 registrations for our Android and iOS Client devices. This server application uses the Azure Notification Hubs Nuget-Package to do so, while we construct the necessary DeviceInstallation data in the Clients.
For some time (a few days) we suddenly can't register new installations or update existing installations on Azure anymore. We have been using the following function to do so:
public async Task<bool> CreateOrUpdateInstallationAsync(DeviceInstallation deviceInstallation)
{
// Error handling
Installation installation = new Installation
{
InstallationId = deviceInstallation.InstallationId,
PushChannel = deviceInstallation.PushChannel,
Tags = deviceInstallation.Tags,
ExpirationTime = DateTime.Now.AddDays(registrationTimeToLiveInDays)
};
if (installationPlatforms.TryGetValue(deviceInstallation.Platform, out NotificationPlatform platform))
{
installation.Platform = platform;
}
else
{
// Error handling
}
try
{
await hub.CreateOrUpdateInstallationAsync(installation);
return await DoesInstallationExistsAsync(installation.InstallationId);
}
catch (Exception e)
{
// Error handling
return false;
}
}
This function has worked as is for about a year.
We also tried registering the same installations using the Notification Hubs REST API directly, which yielded the same results. Using a test hub in the Azure portal we can see that the registrations seem to reach Azure according to the requests noted in the monitoring, but it doesn't show any devices as registered in the summary.
Are we doing something wrong or is Azure (West Europe) simply not working and we have to wait it out?
Many thanks in advance.
I also asked this on Microsoft Learn for full disclosure.
As of last week, we changed nothing and registrations just work again.
There was no notice from Microsoft or anything about an outage or any logs that would indicate what the error was.
The main takeaway from this is in my opinion: If you use Azure Notification Hubs they sometimes just don't work and there's nothing you can do about it.