firebase / quickstart-js

Firebase Quickstart Samples for Web
https://firebase.google.com
Apache License 2.0
5.09k stars 3.66k forks source link

Messaging example does not works #812

Open emremutlu08 opened 1 month ago

emremutlu08 commented 1 month ago

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). "

Screenshot 2024-07-19 at 11 03 46

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:

Expected Results:

bunniesnu commented 3 weeks ago

Did you fix it? Stuck with the same problem. I would like to know the solution.

0wwafa commented 1 week ago

same here! I need a f*ing working example! everything worked until 2 weeks ago.. now nothing works and the examples don't work too!