Description
Operating System
MacOS 14.5
Browser Version
Chrome 127.0.6533.89
Firebase SDK Version
10.12.5
Firebase SDK Product:
Messaging
Describe your project's tooling
NextJS App
Describe the problem
Chrome keeps logging the following error after updating to v10.12.5:
Uncaught DOMException: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'https://www.gstatic.com/firebasejs/10.12.5/firebase-app-compat.js' failed to load.
at https://.../firebase-messaging-sw.js:1:1
Steps and code to reproduce issue
Update to firebase sdk 10.12.5 and modify firebase-messaging-sw.js as follows:
importScripts( "https://www.gstatic.com/firebasejs/10.12.5/firebase-app-compat.js" ); importScripts( "https://www.gstatic.com/firebasejs/10.12.5/firebase-messaging-compat.js" ); firebase.initializeApp({ ... }); const messaging = firebase.messaging();
After the modification Chrome is logging the following error every time a page loads:
Uncaught DOMException: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'https://www.gstatic.com/firebasejs/10.12.5/firebase-app-compat.js' failed to load.
at https://.../firebase-messaging-sw.js:1:1
If we change firebase-messaging-sw.js back to
importScripts( "https://www.gstatic.com/firebasejs/10.12.4/firebase-app-compat.js" ); importScripts( "https://www.gstatic.com/firebasejs/10.12.4/firebase-messaging-compat.js" ); ...
then the error message goes away.
Does anyone have ideas about what's causing this?