Receiving several WebKit related IndexedDB errors #1001
-
Hi! I've read through the docs, and saw that several errors are to be expected when dealing with WebKit and IDB. I'm receiving several error reports through telemetry for users of Safari/iOS all related to either the DB connection closing, the user requesting to delete the DB, the DB being corrupted. My question is: Is there a way to tell this library to fall back to another storage mechanism than IDB? Or, can it retry, or fall back when these errors occur? PS: Where is the source code? O_O |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hello,
There is already such a mechanism at the initialization of the service. But it is not possible to fallback later on, because data would be completely inconsistent. Imagine this scenario:
I would need more elements to investigate:
|
Beta Was this translation helpful? Give feedback.
-
Thank you for the logs. I will try to investigate. I have seen there was some
If completely falling back to if (/* Your Safari detection */) {
localStorage.setItem();
} else {
this.storageMap.set();
} It would not be a good idea to include such an option in the lib for several reasons:
|
Beta Was this translation helpful? Give feedback.
Thank you for the logs. I will try to investigate. I have seen there was some
indexedDb
bugs in some betas of iOS 17, but they are supposed to be fixed in final versions.If completely falling back to
localStorage
, this library becomes quite useless. You can do it directly with something like that:It would not be a good idea to include such an option in the lib for several reasons: