firebase / firebase/quickstart-js

Getting errors while developing firebase-cloud-messaging app

Open
#617 5 comments 0 reactions 0 assignees View on GitHub
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: _____
* Browser: _____
* Firebase SDK version: _____

### Step 2: Describe the problem:

#### Steps to reproduce:

1. _____
2. _____
3. _____

#### Observed Results:

* What happened? This could be a description, logs, etc.

#### Expected Results:

* What did you expect to happen?

#### Relevant Code:

```
// TODO(you): code here to reproduce the problem
```
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)

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.