localStorage implementation does not handle dynamically-detected corruption, reports NS_ERROR_FILE_CORRUPTED for localStorage-using websites
Categories
(Core :: Storage: localStorage & sessionStorage, defect, P2)
Tracking
()
People
(Reporter: jwalker, Unassigned)
References
(Blocks 1 open bug)
Details
Comment 1•8 years ago
|
||
Reporter | ||
Comment 2•8 years ago
|
||
Comment 3•8 years ago
|
||
Comment 4•8 years ago
|
||
Reporter | ||
Comment 6•8 years ago
|
||
Comment 7•8 years ago
|
||
Comment 8•8 years ago
|
||
Comment 10•8 years ago
|
||
Comment 11•8 years ago
|
||
Comment 12•8 years ago
|
||
Comment 13•8 years ago
|
||
Updated•8 years ago
|
Comment 14•8 years ago
|
||
Comment 15•8 years ago
|
||
Comment 16•7 years ago
|
||
Comment 17•7 years ago
|
||
Comment 18•7 years ago
|
||
Comment 19•7 years ago
|
||
Comment 20•7 years ago
|
||
Comment 21•7 years ago
|
||
Comment 22•7 years ago
|
||
Updated•6 years ago
|
Comment 24•6 years ago
|
||
Are there any updates? I started seeing this somewhat recently on a bunch of websites -- Slack and Netflix most frequently -- and clearing both local and session storage each time I open a new tab is rather annoying.
Comment 25•6 years ago
|
||
Yes, the new LocalStorage implementation is enabled on nightly and early betas currently and should ship either in the current Firefox 68 or the next 69 release cycle.
However, I'd recommend that you do one of two things to fix the problem immediately:
- Delete the corrupt database directly.
- Opening the URL about:profiles address bar
- Locate the profile listed as "This is the profile in use and it cannot be deleted."
- Open the profile directory by using the "Open directory" button on the "Root directory" button.
- Using the file manager that pops up, locate
webappsstore.sqlite
. - Quit Firefox. This will make it possible to safely delete the file. You may want to wait a few seconds because Firefox does not always close down instantly.
- Delete the
webappsstore.sqlite
file.
- open the about:support URL and use the "Refresh Firefox" button. This will create a new profile and copy over data that does not include the LocalStorage database. Unfortunately this also leaves the old profile around. Which is good in some senses (you can always go back to it) and bad in others (privacy). After you're sure the new profile didn't lose any important information, it's advisable to use about:profiles and its "Remove" button to get rid of the old profile.
Comment 29•4 years ago
|
||
Why have we not shipped this? It's been over a year and our current localStorage implementation has issues.
Comment 30•4 years ago
|
||
It is enabled in Nightly and early Beta and we see from telemetry still more initialization failures than we should, such that we did not enable it on release (see bug 1599979). As far as we can see, it mostly boils down to resolve bug 1594075 and bug 1621920 (ignore several types of unknown files in the profile), together with bug 1645943 (which is a regression from the long file names handling fix). All these bugs are our top priority currently, still we need to see the numbers go down from telemetry once they land.
Comment 31•4 years ago
|
||
Even when setting dom.storage.next_gen to true in about:config, the problem described in https://bugzilla.mozilla.org/show_bug.cgi?id=1647619, still persists. And the error always mentions the same JavaScript on:
https://spoprod-a.akamaihd.net/files/sp-client/chunk.sp-pages-social_nl-nl_4ce026042c18403fbf69.js
It seems like a very large script. Is it worthwhile to investigate this script, or are there any other helpful ideas?
TIA
Comment 32•4 years ago
|
||
(In reply to Andrew Sutherland [:asuth] (he/him) from comment #25)
Yes, the new LocalStorage implementation is enabled on nightly and early betas currently and should ship either in the current Firefox 68 or the next 69 release cycle.
However, I'd recommend that you do one of two things to fix the problem immediately:
- Delete the corrupt database directly.
- Opening the URL about:profiles address bar
- Locate the profile listed as "This is the profile in use and it cannot be deleted."
- Open the profile directory by using the "Open directory" button on the "Root directory" button.
- Using the file manager that pops up, locate
webappsstore.sqlite
.- Quit Firefox. This will make it possible to safely delete the file. You may want to wait a few seconds because Firefox does not always close down instantly.
- Delete the
webappsstore.sqlite
file.
- open the about:support URL and use the "Refresh Firefox" button. This will create a new profile and copy over data that does not include the LocalStorage database. Unfortunately this also leaves the old profile around. Which is good in some senses (you can always go back to it) and bad in others (privacy). After you're sure the new profile didn't lose any important information, it's advisable to use about:profiles and its "Remove" button to get rid of the old profile.
Thank you very much for this information. Leaving out 2) worked out in my case however, as it fixes broken websites but doesn't force you to create a new profile.
I noticed this issue after the latest Firefox update (v81.0 from Sep 22), so it could be related to that and might have affected other users, too.
Comment 33•4 years ago
|
||
I'm having the same problem on quite a few websites. The locakStorage.clear() seems to fix it for a bit, then it reappears.
v.82.0.2 on Win 10 64 bit
Comment 34•4 years ago
|
||
Having the problem of localStorage failing to be updated for at least one site. If I clear storage, the app can write new keys in, but updates to the keys never happen. v83.0 on MacOS. Confirmed that the site works with Chrome.
Updated•4 years ago
|
Comment 35•4 years ago
|
||
If you need a reproducible case: codesandbox.io is always throwing this error. For example: https://codesandbox.io/s/sentry-js-sdk-unhandled-promise-fuq2h?file=/src/index.js
Comment 36•4 years ago
|
||
I didn't analyze what the test case does, but I tried it on both Firefox Nightly and Chrome and it throws in both browsers. Can you confirm that with Chrome? Are you sure the test case is valid? (If it is, it seems this is a different issue.)
Comment 37•4 years ago
|
||
(In reply to Simon Giesecke [:sg] [he/him] from comment #36)
I didn't analyze what the test case does, but I tried it on both Firefox Nightly and Chrome and it throws in both browsers. Can you confirm that with Chrome? Are you sure the test case is valid? (If it is, it seems this is a different issue.)
Hi Simon,
in Chrome it works (site loads normally). In Firefox (85, macos) any page on codesandbox.io throws error NS_ERROR_FILE_CORRUPTED
(unfortunately, I don't have the stack trace, somehow forgot to capture it before removing webappsstore.sqlite
which fixed the issue permanently). I am not sure whether it is this issue or another one, I just stumbled across this ticket and decided to add a url where it was 100% reproducible for me (and for you, as far as I understood).
Comment 38•4 years ago
|
||
We saw this problem on a Citrix-environment with 32-bit Firefox as an App-V. Because of this we migrated our users to a new Windows 2016 platform with Citrix and a 64-bit version of Firefox 68. After that this problem went away,
Comment 39•4 years ago
|
||
I have been seeing this issue on a self hosted gitlab instance with Firefox 85.0.1. The workaround in comment #32 fixes it for the time being. Will update if it reappears.
Comment 40•3 years ago
|
||
The original issue should be mitigated/fixed by shipping LSNG. The remaining cases seem to be covered by bug 1683401 (which is still open and might deserve some attention).
Comment 41•3 years ago
|
||
And bug 1590640.
Description
•