-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chrome switching between asyncStorage and webSQLStorage on page reload #188
Comments
Also having this issue. It's super strange. |
Seems to be related to indexeddb not being ready: When
|
I believe this is the cause. LocalForage does not seem to detect Chrome's indexedDb reliably: Worse yet, |
v3 which will be out in a few weeks uses the latest of localForage so going to close this |
@mlynch I do not believe my PR with the fix was merged into localForage. This issue should probably not be closed. To be honest, the localForage project seems mostly dead/unmaintained now. You might consider forking it or switching to something else. |
Strange, I'm looking at your PR and it's essentially doing the same thing as the code that is already there. the Will keep an eye on it though, thanks for the info. |
@mlynch I'd be lying if I said I fully understand how browsers are providing IDB. And, honestly, the loss of WEBSQL is a real disappointment. The number of inconsistently reproducible IDB bugs (particularly with Safari) is stunning. |
@lincolnthree I think I'm experiencing the same issue... were you able to find a workaround or at least more information about why it happens? Thanks :) |
My workaround was to fork localForage, use the PR I submitted, and force everything to use my version -- since the project seems not to be maintained any longer. It seems there may be a better solution, but I haven't tried it, since what I have works and I don't want to mess with it and risk breaking things :) |
version: "@ionic/storage": "^2.2.0"
chrome version: 83.0.4103.116 (Official Build) (64-bit)
On first page load it uses asyncStorage then on a hard refresh or if I make a code change and it reloads, it swaps to using webSQLStorage. This doesn't happen in Safari or Firefox as far as I can tell.
I have worked around the issue by specifying my drivers an omitting
websql
before I didn't pass anything,
IonicStorageModule.forRoot()
Here is a video of the issue
https://youtu.be/CZN_cTlPd6U
Cheers,
Matt
The text was updated successfully, but these errors were encountered: