DEV Community

Dimitrios Desyllas
Dimitrios Desyllas

Posted on

Why I am unable to register service worker in my Firebase Vanilla JS app?

I am attempting to make a simple fcm listener as described upon:

https://stackoverflow.com/q/78477738/4706711

But I get the error:

Service worker registration failed, error: TypeError: ServiceWorker script at https://172.161.10.2:1234/firebase-messaging-sw.js?1715685024290 for scope https://172.161.10.2:1234/ threw an exception during script evaluation.
Enter fullscreen mode Exit fullscreen mode

I attempt to fix it but I have no idea how to debug this error. Thus I need your help for that.

Top comments (0)