Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google push notifications - DOMException: Registration failed - push service error

I am trying to enable push notifications on my website using VAPID keys. When i include the gcm_sender_id and remove the applicationServerKey from the pushManager.subscribe method, it runs fine.

Only when i enable VAPID keys and remove the gcm_sender_id from manifest.json file. i get the foloowing error.

DOMException: Registration failed - push service error

I am using Chrome browser.

like image 339
Kaushik Wavhal Avatar asked Jan 05 '23 11:01

Kaushik Wavhal


1 Answers

I encountered this error in Brave browser. By default, Google Services for push messaging are disabled in Brave. To enable this, open the following URL in brave:

brave://settings/privacy

After this, enable the flag "Use Google services for push messaging":

Source: https://github.com/firebase/firebase-js-sdk/issues/3195#issuecomment-848036637

like image 161
Nicodemuz Avatar answered Jan 13 '23 13:01

Nicodemuz