Skip to content

500 Error: "Invalid value used as weak map key" when using latest vuefire/nuxtfire releases (v 3.1.15) #1410

@dosstx

Description

@dosstx

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

at ./node_modules/.pnpm/nuxt-vuefire@0.2.16_rd3jegnpemhlxr77rbrlplecpe/node_modules/nuxt-vuefire/dist/runtime/emulators/storage.plugin.mjs:23:22
at ./virtual:nuxt:/project/sandbox/.nuxt/plugins/server.mjs:52:89
at Module.executeAsync (./node_modules/.pnpm/unctx@2.3.1/node_modules/unctx/dist/index.mjs:111:19)
at setup (./virtual:nuxt:/project/sandbox/.nuxt/plugins/server.mjs:52:65)
at ./node_modules/.pnpm/nuxt@3.6.5_@types+node@18.17.5/node_modules/nuxt/dist/app/nuxt.js:112:60
at fn (./node_modules/.pnpm/nuxt@3.6.5_@types+node@18.17.5/node_modules/nuxt/dist/app/nuxt.js:156:44)
at Object.callAsync (./node_modules/.pnpm/unctx@2.3.1/node_modules/unctx/dist/index.mjs:68:55)
at ./node_modules/.pnpm/nuxt@3.6.5_@types+node@18.17.5/node_modules/nuxt/dist/app/nuxt.js:158:56
at Object.runWithContext (./node_modules/.pnpm/@vue+runtime-core@3.3.4/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:3855:18)

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions