prazdevs / pinia-plugin-persistedstate

💾 Configurable persistence and rehydration of Pinia stores.
https://prazdevs.github.io/pinia-plugin-persistedstate/
MIT License
2.13k stars 121 forks source link

[pinia-plugin-persistedstate] Error: [nuxt] A composable that requires access to the Nuxt instance was called outside of a plugin #282

Closed aliraza880880 closed 6 months ago

aliraza880880 commented 8 months ago

Describe the bug

This issue arises when the same page is opened in a new tab repeatedly more than three times. [pinia-plugin-persistedstate] Error: [nuxt] A composable that requires access to the Nuxt instance was called outside of a plugin, Nuxt hook, Nuxt middleware, or Vue setup function. This is probably not a Nuxt bug

Reproduction

no

System Info

System:
    OS: Ubuntu 22.04.4 LTS
    CPU: 64-bit
  Binaries:
    Node: 20.10.0 
    npm: 10.2.3 
    nuxt: 3.10.3
  Browsers:
    Edge: Chromium (122.0.2365.52)
    Internet Explorer: 11.0.19041.3636

Used Package Manager

npm

Validations

prazdevs commented 6 months ago

Please provide a proper reproduction.

mukundshah commented 5 months ago

Can we reopen this? I have now facing a smiliar situation here. And I have a repro too.

For me, this is happening if the value is mutated from nuxt plugin. The store was acting finicky but when the debug: true was set, the actual underlying issue surfaced.

Repro: https://stackblitz.com/edit/nuxt-starter-kmist8?file=plugins%2Fdemo.ts

image

PatrickBauer commented 3 months ago

We've got the same issue and using debug shows the same errors. If many users access the site at the same time, it looks like state data is actually shared between those, which should never happen and is a really big problem for us.

justinkekeocha commented 1 month ago

@prazdevs

Experiencing this today. Running the latest version of this plugin