Unable to create installation azure notification hub

JASAN Jakub (External) 1 Reputation point
2021-02-09T15:48:46.867+00:00

Hi all,
at Friday I implemented and made functioning notification hub on Azure by publishing my web api there.
Today I was trying to send notifications with tags, unfortunately, while registering with tag to hub was successful, my device while being registered to notification hub with tag did not receive any notification with related tag, so I checked my notification hub via server explorer in Visual Studio and I noticed there are 2 devices registered, one was mine with a tag, and I don't know what was the second one, but once I deleted the other device, I can no longer register any device on my notification hub. I even reverted my code to the version when I was receiving notifications, so I'm pretty sure it's not anything I changed in code recently.

I tried to send notification request via Postman and I can see that it came there, but nothing happened afterwards (meaning my device didn't get notified). So I also just copied the json request which I was sending to create installation which works, and nothing is added in Device Registrations when I look at the notification hub in server explorer.
Should I just create the notification hub again, or is there a way to fix this? I know I screwed up somewhere but I have no idea where to check.
I also noticed that the unknown entry in my Device Registration had very different InstallationId, as it was guid, while the InstallationId I was doing afterwards was 16 character long string and nothing was arriving to this installation and also it had Expiration Date, while all installations afterwards didn't (they had set date to 1/1/9999).

Is that first entry in registered devices some demo version? Now to think about it, the notifications I was receiving were coming with PushDemo name, although I never set this name anywhere, I feel like it never really worked at this point.
I was following this guide: https://learn.microsoft.com/en-us/azure/developer/mobile-apps/notification-hubs-backend-service-xamarin-forms#configure-the-native-android-project-for-push-notifications
I'm using free trial subscription on Azure Portal.
So any tip, which I could check to fix this will help, thanks.
To answer basic questions:
I'm getting status 200 OK when sending requests via Postman to azure app api
I checked Notification hub name and connection string
I also checked Firebase server key

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

1 answer

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 19,841 Reputation points
    2021-02-11T04:02:26.18+00:00

    Thanks for asking question! You can refer to Debugging Notification Hubs. There are tools that might be helpful when debugging your push notification configuration.
    • Azure Management Portal
    • Visual Studio Server Explorer
    • Service Bus Explorer
    Also if you are not receiving notifications on Android after starting or stopping a debug session Please ensure you register again after starting or stopping a debug session. The debugger will cause a new Firebase token to be generated and the notification hub installation must be updated as well.

    Incase issue persists please send an email to AzCommunity[at]Microsoft[dot]com referencing this thread, we would like to work closer with you on this matter.

    0 comments No comments