Open akash07k opened 3 years ago
you should create a firebase-messaging-sw.js
in root
It would be great if you please provide some sample code for firebase messaging as well.
It would be great if you please provide some sample code for firebase messaging as well.
I've done a firebase cloud messaging model. Do visit my repo https://github.com/Rahman24/fcm-example for a code model
I have the same error when I go to version 9 and I don't know how to fix it, I followed the steps in the documentation and nothing i needed help
I have the same error when I go to version 9 and I don't know how to fix it, I followed the steps in the documentation and nothing i needed help
What is you problem? Please explain it briefly
Step 1: Describe your environment
Step 2: Describe the problem:
Steps to reproduce:
Observed Results:
Expected Results:
Relevant Code:
So I'm developing a firebase cloud messaging app and getting some issues. I solved most of the issues by myself but still unable to find the solutions of some problems. The problem here is that I'm using SDK V9 and the code in this repo is not using the moduler code. Instead of it, still the old styled code is being used (compat) one and hence it is creating a lot of problem for new comers. My code is in below repo: https://github.com/firebase/quickstart-js And the first issue which I'm having is: FirebaseError: Messaging: We are unable to register the default service worker. Failed to register a ServiceWorker for scope ('http://localhost:3000/firebase-cloud-messaging-push-scope') with script ('http://localhost:3000/firebase-messaging-sw.js'): ServiceWorker script evaluation failed (messaging/failed-service-worker-registration). at registerDefaultSw (registerDefaultSw.ts:43) at async updateSwReg (updateSwReg.ts:28) at async getToken$1 (getToken.ts:43)