Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firebase messaging service worker failed to load v10.12.5 script #8409

Closed
yhuang1211 opened this issue Aug 6, 2024 · 2 comments · Fixed by #8414
Closed

Firebase messaging service worker failed to load v10.12.5 script #8409

yhuang1211 opened this issue Aug 6, 2024 · 2 comments · Fixed by #8414
Assignees

Comments

@yhuang1211
Copy link

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?

@yhuang1211 yhuang1211 added new A new issue that hasn't be categoirzed as question, bug or feature request question labels Aug 6, 2024
@jbalidiong jbalidiong added needs-attention and removed new A new issue that hasn't be categoirzed as question, bug or feature request labels Aug 6, 2024
@jbalidiong
Copy link
Contributor

Hi @yhuang1211, thanks for bringing this to our attention. I was able to reproduce the behavior now. Let me check with our engineers what we can do for this issue or bring someone here that can provide more context about it. I’ll update this thread if I have any information to share.

@Tred3695
Copy link

ios)bersey,)usa/Boston.versiy":987765

@firebase firebase locked and limited conversation to collaborators Sep 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants