firebase / firebase/firebase-js-sdk

Bump issue 5403

Open
#7,030 5 comments 0 reactions 0 assignees View on GitHub
api: messaging documentation
Dominant language
TypeScript
Stars
5.1k
Forks
1k
Avg merge
2d 21h
Merged PRs (30d)
37

Description

https://github.com/firebase/firebase-js-sdk/issues/5403 has been closed, but its issue and solution is lacking documentation in the firebase.google.com docs.

I ran into the same problem as the writer of the mentioned issue and it took me a long time to figure out the root of the problem.

It is not obvious on first hand, mainly because debugging of service workers is difficult to do in many browsers. For example, in the firefox inspector, when a service worker is unable to start, it will only print the message `TypeError: ServiceWorker script at http://localhost:3000/firebase-messaging-sw.js for scope http://localhost:3000 threw an exception during script evaluation. [index.tsx:(...)` without informing that the importScripts has failed.

Also, it seems that `import {} from ...` statements in service worker scripts are not widely supported in browsers. But the documentation directs the user into using `import` instead of `importScripts`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.