JavaScript error in FCM when using https url - Failed to register ServiceWorker

I have implemented FCM for web using this fcm documentation: https://firebase.google.com/docs/cloud-messaging/js/client

Now everything will be fine, I get a normal notification on my web client if I give a URL like: "http" I have no error. But when I set url: "https" I get error after error:

"Failed to register ServiceWorker: SSL certificate error occurred while retrieving script." code: "messaging / failed-serviceworker-registration" "Messages: We cannot register the default service worker. Failed to register ServiceWorker: SSL certificate error occurred while retrieving script. (Messages / failed serviceworker registration)".

Can anyone show me how to fix this error?

+3
javascript http ssl https


source to share


No one has answered this question yet

Check out similar questions:

2853
Get the current url using JavaScript?
2366
Encode url in JavaScript?
1895
Open the url in a new tab (not a new window) using JavaScript
1854
When should you use double or single quotes in JavaScript?
867
Are URLs encrypted with HTTPS?
381
Solution javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed Error?
43
Can you use a service worker with a self-signed certificate?
2
SSL error when using https FCM
1
Serviceman over http: SSL certificate error occured while fetching script
0
FCM Web program startup notification cannot register the default service worker



All Articles
Loading...
X
Show
Funny
Dev
Pics