I am testing my web app on localhost for firebase cloud messaging.
I am running it on a virtual host and I enabled SSL for it, I can see https but it is crossed in red. I searched and tried two methods but none of them are working
.\chrome.exe --ignore-certificate-errors --unsafely-treat-insecure-origin-as-secure=https://firebase_notification.test
Also,
chrome://flags/#allow-insecure-localhost
enable this flag
I am still getting the same error.
An SSL certificate error occurred when fetching the script. get-notifications:57 An error occurred while retrieving token. FirebaseError: Messaging: We are unable to register the default service worker. Failed to register a ServiceWorker: An SSL certificate error occurred when fetching the script. (messaging/failed-serviceworker-registration). at https://www.gstatic.com/firebasejs/6.3.4/firebase-messaging.js:1:30787