Closed geeraay closed 1 year ago
Judging by your code some things that could have happened:
list-sls.tsx
props.secretKey
is undefined when constructing the DB;getserversideprops()
in list-sls.tsx
. Could be a race condition on reload or reload on a different page; Passing no key or an undefined key gives no error but creates a new key. I probably fix this in a later release to error when no key is provided.So delete the DB first and than make sure the same key is always used.
If you still have problems please let me know and, if possible provide, minimum reproduction of the issue.
Hi,
Thanks for your effort on building this amazing lib!
I wanted to ask about the following issue in the repo. I have implemented Dexie using Next 12 smoothly, and I would like to add encrypt/decrypt capability using this lib, and it works amazingly. However, when I tried to reload the page, unfortunately an error occurred. The error said that "Could not decrypt message". I have already checked the secret key used, and I see that the key is consistent.
Would appreciate any insights or guidance on this matter. Thank you!
DexieDB.ts![image](https://user-images.githubusercontent.com/20170335/216923540-63313eff-7bbf-46f7-8ae0-3a791a61e212.png)
list-sls.tsx![image](https://user-images.githubusercontent.com/20170335/216925446-2d0ff765-41bb-48db-a0e6-d8175e32a450.png)
getserversideprops on list-sls.tsx![image](https://user-images.githubusercontent.com/20170335/216925950-0b0736d0-2613-421e-b389-a25b1675db65.png)
Error![image](https://user-images.githubusercontent.com/20170335/216923876-947d243f-16ac-4eba-a831-8894019be22a.png)