firebase / friendlyeats-web

Apache License 2.0
494 stars 412 forks source link

Error with auth-service-worker.js #308

Open COSSART-FR opened 2 months ago

COSSART-FR commented 2 months ago

Hello, with nextjs-end i have this error in my chrome console, and i have infinite loading.

Uncaught (in promise) TypeError: Failed to fetch at fetchWithFirebaseHeaders (auth-service-worker.js?firebaseConfig=....573c6%22%7D:8013:18)

r-dev-limited commented 1 month ago

Also when token is invalid it crashes and whole site will not load (when you are switching between live & emulated instance) Then token from one instance might stay in cache, and when running live...worker will crash and does not load site after

Flucadetena commented 1 week ago

In case it helps, I had the same problem and also I was getting a "cors" error after navigating or reloading the page.

The whole problem was that when I copied and pasted the credentials in the ".env" file the order was not the correct one. As I copied and pasted without checking from Firebase to the keys already present in the file.

So I put the "NEXT_PUBLIC_FIREBASE_DATABASE_URL" value in the "NEXT_PUBLIC_FIREBASE_API_KEY", for example.

I checked all the values, updated and the problem was solved.

Hope it helps