Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

with-firebase-cloud-messaging does not works #10628

Closed
tomflorentin opened this issue Feb 21, 2020 · 3 comments
Closed

with-firebase-cloud-messaging does not works #10628

tomflorentin opened this issue Feb 21, 2020 · 3 comments
Labels
good first issue Easy to fix issues, good for newcomers

Comments

@tomflorentin
Copy link

Examples bug report

Example name

with-firebase-cloud-messaging

Describe the bug

Does not works at all.
I configured it as asked, and deployed on now.

I'm getting this console error :

FirebaseError: Messaging: Missing App configuration value: "projectId" (messaging/missing-app-config-values).
    at Ae (https://test-firebase-messaging.now.sh/_next/static/LOLJCA2TQ6uRRoWpH7wN-/pages/index.js:1:15681)
    at https://test-firebase-messaging.now.sh/_next/static/LOLJCA2TQ6uRRoWpH7wN-/pages/index.js:1:34785
    at e.instanceFactory (https://test-firebase-messaging.now.sh/_next/static/LOLJCA2TQ6uRRoWpH7wN-/pages/index.js:1:34993)
    at e.getOrInitializeService (https://test-firebase-messaging.now.sh/_next/static/LOLJCA2TQ6uRRoWpH7wN-/pages/index.js:1:39418)
    at e.getImmediate (https://test-firebase-messaging.now.sh/_next/static/LOLJCA2TQ6uRRoWpH7wN-/pages/index.js:1:37891)
    at e._getService (https://test-firebase-messaging.now.sh/_next/static/LOLJCA2TQ6uRRoWpH7wN-/pages/index.js:1:84333)
    at e.<computed> [as messaging] (https://test-firebase-messaging.now.sh/_next/static/LOLJCA2TQ6uRRoWpH7wN-/pages/index.js:1:86611)
    at Object.d [as messaging] (https://test-firebase-messaging.now.sh/_next/static/LOLJCA2TQ6uRRoWpH7wN-/pages/index.js:1:86415)
    at Object.<anonymous> (https://test-firebase-messaging.now.sh/_next/static/LOLJCA2TQ6uRRoWpH7wN-/pages/index.js:1:35809)
    at a (https://test-firebase-messaging.now.sh/_next/static/chunks/commons.17b8bb40680ea9fcd795.js:1:21024)
(anonymous) @ index.js:1
a @ commons.17b8bb40680ea9fcd795.js:1
(anonymous) @ commons.17b8bb40680ea9fcd795.js:1
O.forEach.t.<computed> @ commons.17b8bb40680ea9fcd795.js:1
a @ commons.17b8bb40680ea9fcd795.js:1
r @ commons.17b8bb40680ea9fcd795.js:1
(anonymous) @ commons.17b8bb40680ea9fcd795.js:1
Promise.then (async)
r @ commons.17b8bb40680ea9fcd795.js:1
(anonymous) @ commons.17b8bb40680ea9fcd795.js:1
i @ commons.17b8bb40680ea9fcd795.js:1
E._invoke @ commons.17b8bb40680ea9fcd795.js:1
O.forEach.t.<computed> @ commons.17b8bb40680ea9fcd795.js:1
t.async @ commons.17b8bb40680ea9fcd795.js:1
init @ index.js:1
value @ index.js:1
Fu @ framework.94bc9fd9a7de53a90996.js:1
t.unstable_runWithPriority @ framework.94bc9fd9a7de53a90996.js:1
ql @ framework.94bc9fd9a7de53a90996.js:1
Ru @ framework.94bc9fd9a7de53a90996.js:1
ku @ framework.94bc9fd9a7de53a90996.js:1
vu @ framework.94bc9fd9a7de53a90996.js:1
lc @ framework.94bc9fd9a7de53a90996.js:1
(anonymous) @ framework.94bc9fd9a7de53a90996.js:1
xu @ framework.94bc9fd9a7de53a90996.js:1
sc @ framework.94bc9fd9a7de53a90996.js:1
hydrate @ framework.94bc9fd9a7de53a90996.js:1
z @ main-41d64572c3c79bdb7daa.js:1
(anonymous) @ main-41d64572c3c79bdb7daa.js:1
a @ commons.17b8bb40680ea9fcd795.js:1
(anonymous) @ commons.17b8bb40680ea9fcd795.js:1
O.forEach.t.<computed> @ commons.17b8bb40680ea9fcd795.js:1
a @ commons.17b8bb40680ea9fcd795.js:1
r @ commons.17b8bb40680ea9fcd795.js:1
(anonymous) @ commons.17b8bb40680ea9fcd795.js:1
i @ commons.17b8bb40680ea9fcd795.js:1
E._invoke @ commons.17b8bb40680ea9fcd795.js:1
O.forEach.t.<computed> @ commons.17b8bb40680ea9fcd795.js:1
t.async @ commons.17b8bb40680ea9fcd795.js:1
ae @ main-41d64572c3c79bdb7daa.js:1
(anonymous) @ main-41d64572c3c79bdb7daa.js:1
a @ commons.17b8bb40680ea9fcd795.js:1
(anonymous) @ commons.17b8bb40680ea9fcd795.js:1
O.forEach.t.<computed> @ commons.17b8bb40680ea9fcd795.js:1
a @ commons.17b8bb40680ea9fcd795.js:1
r @ commons.17b8bb40680ea9fcd795.js:1
(anonymous) @ commons.17b8bb40680ea9fcd795.js:1
i @ commons.17b8bb40680ea9fcd795.js:1
E._invoke @ commons.17b8bb40680ea9fcd795.js:1
O.forEach.t.<computed> @ commons.17b8bb40680ea9fcd795.js:1
t.async @ commons.17b8bb40680ea9fcd795.js:1
K @ main-41d64572c3c79bdb7daa.js:1
(anonymous) @ main-41d64572c3c79bdb7daa.js:1
a @ commons.17b8bb40680ea9fcd795.js:1
(anonymous) @ commons.17b8bb40680ea9fcd795.js:1
O.forEach.t.<computed> @ commons.17b8bb40680ea9fcd795.js:1
a @ commons.17b8bb40680ea9fcd795.js:1
r @ commons.17b8bb40680ea9fcd795.js:1
(anonymous) @ commons.17b8bb40680ea9fcd795.js:1
Promise.then (async)
r @ commons.17b8bb40680ea9fcd795.js:1
(anonymous) @ commons.17b8bb40680ea9fcd795.js:1
Promise.then (async)
r @ commons.17b8bb40680ea9fcd795.js:1
(anonymous) @ commons.17b8bb40680ea9fcd795.js:1
i @ commons.17b8bb40680ea9fcd795.js:1
E._invoke @ commons.17b8bb40680ea9fcd795.js:1
O.forEach.t.<computed> @ commons.17b8bb40680ea9fcd795.js:1
t.async @ commons.17b8bb40680ea9fcd795.js:1
IKlv.t.default @ main-41d64572c3c79bdb7daa.js:1
BMP1 @ main-41d64572c3c79bdb7daa.js:1
l @ webpack-91b117697e716c22a78b.js:1
0 @ main-41d64572c3c79bdb7daa.js:1
l @ webpack-91b117697e716c22a78b.js:1
t @ webpack-91b117697e716c22a78b.js:1
r @ webpack-91b117697e716c22a78b.js:1
(anonymous) @ main-41d64572c3c79bdb7daa.js:1
Show 28 more frames
A bad HTTP response code (404) was received when fetching the script.
main-41d64572c3c79bdb7daa.js:1 SW registration failed:  TypeError: Failed to register a ServiceWorker for scope ('https://test-firebase-messaging.now.sh/') with script ('https://test-firebase-messaging.now.sh/service-worker.js'): A bad HTTP response code (404) was received when fetching the script.


A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. clone the example
  2. type yarn
  3. change the messagingSenderId by yours
  4. type yarn dev
  5. open your console, and see the errors associated to the service worker.

Expected behavior

We should not see any error, and get incomming push notifications.

System information

  • OS: MacOS
  • Browser : Chrome
  • Version of Next.js: 9.2.2 - latest

Additional context

Thanks for your help.

@timneutkens timneutkens added good first issue Easy to fix issues, good for newcomers help wanted labels Feb 22, 2020
aviaryan added a commit to aviaryan/next.js that referenced this issue Feb 25, 2020
@aviaryan
Copy link
Contributor

Opened a PR for this at #10686

@Timer Timer removed the help wanted label Jun 3, 2020
@Timer
Copy link
Member

Timer commented Sep 12, 2020

Closing as above PR was merged

@Timer Timer closed this as completed Sep 12, 2020
@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Easy to fix issues, good for newcomers
Projects
None yet
Development

No branches or pull requests

5 participants