firebase / firebase/quickstart-js
Messaging example does not works
- Dominant language
- TypeScript
- Stars
- 5.4k
- Forks
- 3.7k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 6
Description
### Step 1: Describe your environment
Operating system: MacOS
Browser: Safari/Chrome
Firebase SDK version: 10.1.0
### Step 2: Describe the problem:
I already gave the permissions however the ui is still asking for permissions. In the browser console, it says: "An error occurred while retrieving token. FirebaseError: Messaging: We are unable to register the default service worker. Failed to register a ServiceWorker for scope ('http://localhost:5173/firebase-cloud-messaging-push-scope') with script ('http://localhost:5173/firebase-messaging-sw.js'): ServiceWorker script evaluation failed (messaging/failed-service-worker-registration). "
#### Steps to reproduce:
1. git clone https://github.com/firebase/quickstart-js
2. cd messaging/
3. fill config.ts
4. npm install -g firebase-tools
5. firebase login
6. firebase use --add
7. npm install
8. firebase emulators:start
9. npm run dev
#### Observed Results:
* What happened? This could be a description, logs, etc.
Nothing changed.
"Click REQUEST PERMISSION button to request permission for the app to send notifications to the browser." this does not works.
* I followed the readme.md: https://github.com/firebase/quickstart-js/blob/master/messaging/README.md
#### Expected Results:
* What did you expect to happen?
It should give me the notifications
Contributor guide
Assessment
This issue has not been assessed yet.