Hello,
I'm trying to catch firebase notification in odoo14,
I tried all possible path.
navigator.serviceWorker.register('firebase-messaging-sw.js')
getting below error,
Unable to get permission to notify. FirebaseError: Messaging: We are unable to register the default service worker. Failed to register a ServiceWorker for scope ('http://localhost:8069/firebase-cloud-messaging-push-scope') with script ('http://localhost:8069/firebase-messaging-sw.js'): A bad HTTP response code (404) was received when fetching the script. (messaging/failed-service-worker-registration).
at ot. (https://www.gstatic.com/firebasejs/8.2.4/firebase-messaging.js:1:36826)
at https://www.gstatic.com/firebasejs/8.2.4/firebase-messaging.js:1:1982
at Object.throw (https://www.gstatic.com/firebasejs/8.2.4/firebase-messaging.js:1:2087)
at i (https://www.gstatic.com/firebasejs/8.2.4/firebase-messaging.js:1:884)