Closed calebebteixeira closed 2 years ago
I can confirm that error. Downgrading to firebase@8.10.0
and @nuxtjs/firebase@7.6.1
seems to fix that error.
Additional Versions: • node 14.18.1 • @nuxtjs/pwa 3.3.5 • firebase-admin 10.0.0
Needs some further investigation.
I can confirm that error. Downgrading to
firebase@8.10.0
and@nuxtjs/firebase@7.6.1
seems to fix that error.Additional Versions: • node 14.18.1 • @nuxtjs/pwa 3.3.5 • firebase-admin 10.0.0
Needs some further investigation.
I was also helped by changing the version of the packages, but there is a problem with an empty object after a hard page reload(Ctrl + F5). @bitpunk Do you have such a problem?
I was also helped by changing the version of the packages, but there is a problem with an empty object after a hard page reload(Ctrl + F5). @bitpunk Do you have such a problem?
That's the expected behaviour. CTRL+F5 clears the cache (…and the service worker who retrieves the data for you) therefore the data is not available. But this should not be a problem, because users usually do not clear the cache every time. 😅
Oh man! After days trying to fix this issue... Found out that I was setting up PWA WORKBOX the wrong way:
pwa: { workbox: { importScripts: [ '/firebase-auth-sw.js' ], dev: false, // THIS NEEDs TO BE INSIDE workbox{} } // dev: false <---- I WAS ADDING "dev" HERE, THIS WAS WRONG!!!! }
Thanks everybody for all the help!
I just cloned https://github.com/lupas/nuxt-firebase-demo to make sure I got the latest version available... But ctx.res.locals is always empty:
Version
OS: Arch Linux NODE: v14.18.1 @nuxtjs/firebase: ^8.0.0-beta.0 firebase: ^9.1.3 nuxt: ^2.15.8
Reproduction Link
https://github.com/lupas/nuxt-firebase-demo
Steps to reproduce
I just cloned this repo and launched.. that's all I did...
What is Expected?
I'm expecting ctx.res.locals not to be always empty object.