Closed fosterdouglas closed 9 months ago
this seems oddly related to #52 at first glance 🤔
I encountered a similar issue, and it turned out I was exceeding the cookie size limit of 4096 bytes. Could this be the case for you too? Check the data size stored in the cookie.
I encountered a similar issue, and it turned out I was exceeding the cookie size limit of 4096 bytes. Could this be the case for you too? Check the data size stored in the cookie.
That was exactly my issue as well! I forgot to revisit this to update.
Describe the bug
I've come across some strange behavior and have spent many hours trying to debug. At the end, it seems as though setting multiple values in a store in succession causes persistence to fail with cookies?
In this example, any combination of 2 of these lines works properly, but using 3 or more (of any combination), it results in the values of all of them in the cookie being null.
The objects I'm setting are relatively small in kb size.
This is obviously absurd and seems like unlikely behavior, but I've really tried everything to fix it. I'm setting the values from a composable, but I've tried it directly in a component as well.
I'm using 3.2.0, and 2.1.7 of Pinia, with no custom options in nuxt.config, and a basic Setup store:
If anyone has any ideas of why this might be happening or how I can approach debugging, let me know! Thank you!
Reproduction
-
System Info
Used Package Manager
npm
Validations