Could not register for Push Notifications, please contact your system administrator.

0
Hi, I'm trying to implement web push notification using firebase. I followed all the steps in the below document https://docs.mendix.com/refguide/mobile/using-mobile-capabilities/push-notifications/   When I'm trying to register for web push notification I am receiving this below error in console. If anybody could help me to resolve this issue that would be grateful. Thanks in advance!   An error occured while registering for Push Notifications: Firebase API not available. Nanoflow stack: "Call JavaScript Action: PushNotifications.RegisterForPushNotificationsWeb" in nanoflow "PushNotifications.SUB_RegisterForPushNotificationsWeb"  "Call nanoflow: PushNotifications.SUB_RegisterForPushNotificationsWeb" in nanoflow "PushNotifications.ACT_RegisterForPushNotificationsWeb"
asked
2 answers
1

Hi, 

 

The issue I believe is coming up because of the fact that the FCM server is not running anywhere when it is trying to be used. I believe the solution is to check to see if the FCM is being initialized in the right way on app startup, following Push Notifications Docs or more specifically Push Notifications for PWAs. This should initialize the Firebase FCM and allow for calling API after run-time config!

answered
0

Hello!

 

Are you encountering this error when running locally?  If so, you are likely getting this error due to your transfer protocol.  FCM Web push notifications can only be successfully registered from an https domain but local host runs with an http protocol.

 

It is possible to get around this with the approach from this forum post.  However, I find that the simplest solution is just to deploy your changes to a testing environment if you have one available.

 

Hope this helps!

answered