-
-
Notifications
You must be signed in to change notification settings - Fork 344
500 Error: "Invalid value used as weak map key" when using latest vuefire/nuxtfire releases (v 3.1.15) #1410
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
Comments
Same on my side. Don't know if this is directly related but as I cannot use the latest version, I downgraded to
|
Interesting. I wonder if that is somehow related to same thing we are seeing here: #1408 |
I'm getting the same error in the same circumstance, however, I noticed the error only occurs when there is no logged in user (incognito mode). When refreshing the page with an authenticated firebase user, everything works as normal? It seems the problem is happening here:
This function gets called multiple times, the first time it gets called, firebaseApp is an object, but the following times firebaseApp is undefined, hence "Invalid value used as weak map key" |
Found the issue. It occured in the handling of the anonnymous session where there was no logged in user. If there was no cached version the code would work, however there was no else block for when there is a cached version plugin.server.mjs
|
Thanks for all the information! I released a patch, let me know if things are still broken |
@Eronne Googling those errors should help. Here are some extra resources: |
Thanks @posva for the reactivity and the details! 🙏🏼 I was applying the Service Account Token Creator role to the wrong service account... I thought it had to be applied on the service account provided with the |
It happened to me too 😅 |
It works for me now, thanks! |
Reproduction
https://codesandbox.io/p/sandbox/github/posva/nuxt--vuefire-repro-template/tree/main
Steps to reproduce the bug
Using the latest vuefire and nuxt-vuefire releases (3.1.15 and 0.2.16) , I get the following error when viewing the app in the browser:
500
Invalid value used as weak map key
This is also reproduceable when using the
nuxt template
link.Downgrading Vuefire and Nuxt-vuefire to the previous version fixes this issue.
Expected behavior
I expect to the see the default Nuxt welcome page. Instead, I see the 500 error above.
Actual behavior
I get the 500 server error mentined above.
Additional information
Although I can't reproduce it on codesandbox, on my localhost, if I downgrade the vuefire/nuxtfire versions to a previous version, the error is gone.
The text was updated successfully, but these errors were encountered: