Results 2 comments of Ben

register Firebase service worker before getToken: ` navigator.serviceWorker.register("/firebase-messaging-sw.js", { scope: "/firebase-cloud-messaging-push-scope" }) `

1. Create a service worker 2. Register it 3. Then use serviceWorkerRegistration option to pass it to the getToken https://github.com/benixal/FCM-Web-Notify-Example/blob/main/index.html#L35 https://www.youtube.com/watch?v=iz5arafmatc&t=6m12s https://firebase.google.com/docs/reference/js/messaging_.gettokenoptions.md#gettokenoptionsserviceworkerregistration