If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

localStorage and sessionStorage corrupted / unavailable after browser update, before restart




3 years ago
8 months ago


(Reporter: callahad, Unassigned)


29 Branch

Firefox Tracking Flags

(Not tracked)




3 years ago
Sometimes, localStorage and sessionStorage objects cease functioning. This appears to occur after a browser update, and has been observed on Fx 29 through Fx 32, on 64 bit OS X and Ubuntu.

I have not managed to deterministically repro this bug, though I have experienced it firsthand.

CarlFK on IRC just experienced this bug on Fx 29.0, running on 64-bit Ubuntu 14.04 LTS.


- After performing `apt-get update && apt-get upgrade`, Persona started showing him an "Unsupported Browser" error message, which was rooted in broken localStorage support.

- When visiting the Persona Troubleshooting page at https://people.mozilla.org/~fmarier/troubleshoot.html, it reported that his browser defined both localStorage and sessionStorage, but that it did not support either.

- In the Web Console for that page, `window.localStorage` prints `[object Storage]` instead of the expected `Storage { length: 0 }` pretty-printing.

- Attempting `window.localStorage.setItem('foo', 1)` yields `[Exception... "Component returned failure code: 0x8052000b (NS_ERROR_FILE_CORRUPTED) [nsIDOMStorage.setItem]"  nsresult: "0x8052000b (NS_ERROR_FILE_CORRUPTED)"  location: "JS frame :: debugger eval code :: <TOP_LEVEL> :: line 1"  data: no]`

- Everything works as expected in a new Private Browsing window.

- After restarting the browser (to complete the upgrade), everything works as expected.

Carl's UserAgent string was "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0" when he experienced this bug. I've seen it on Nightly.

Comment 1

3 years ago
Mark Jeffries also repro'd this Firefox bug when upgrading from Firefox 29.0 to 29.0.1 and using Persona. I observed it at his desk. Same exact sequence of events and output (though I didn't explicitly test localStorage)

Comment 2

3 years ago
This may be unrelated to upgrades. According to Gene, "mjeffries experienced that firefox version is not supported issue again but this time *not* while he is in between firefox updates"

Comment 3

3 years ago
False alarm with mjeffries. His Firefox profile was somehow corrupted and he had been restoring his profile each time he had to shutdown firefox by pulling it from backups. I had him create a new profile and migrate his content over using sync and the problem doesn't happen. The issue is still constrained to what :callahad identifies above.
Is it safe to say this bug can now be closed?
Flags: needinfo?(dan.callahan)

Comment 5

2 years ago
I'm good on my end.

Comment 6

2 years ago
I am seeing some of the customers are reporting following error NS_ERROR_FILE_CORRUPTED when             localStorage.SetItem(key, value) is invoked. UA: Mozilla/5.0 (Windows NT 6.1; rv:41.0) Gecko/20100101 Firefox/41.0. Is there a workaround for this?
Hey Mark,

Can you help with this issue?
Flags: needinfo?(mjeffries)

Comment 8

2 years ago
Bug 1055496 seems related to this.
Hi guys,

I have tried to reproduce this issue on latest Firefox release (44.0) and latest Nightly build (47.0a1-20160202030232) but I haven't managed to. Installed the previous 43.0.4 release and Nightly 46.0a1 and performed the update without restarting the browser to complete it. Executed the mentioned commands in web console but I haven't got the excecptions mentioned by Dan or Ravi. 

Used a MacBook Pro Retina 13" (early 2015) with Mac OS X 10.10.5 to test this. 

Dan, can you please retest this on latest Firefox release and latest Nightly build (https://nightly.mozilla.org/) and report back the results ? Maybe it would be better also to use a new profile when doing this to exclude any custom settings that might interfere.


Comment 10

2 years ago
I haven't seen, heard of, or been able to repro this in a while.

Resolving as Works For Me.
Last Resolved: 2 years ago
Flags: needinfo?(mjeffries)
Flags: needinfo?(dan.callahan)
Resolution: --- → WORKSFORME

Comment 11

2 years ago
I'm new to these forums. Forgive my noobness.

I'm seeing this corrupt localStorage and it's driving me crazy. I can't use feedly half the time on this one computer (my work computer). Restarting Firefox fixes the problem temporarily, but then it comes back. This is what I'm seeing in my console:

failed to inline entry Exception { message: "", result: 2152857611, name: "NS_ERROR_FILE_CORRUPTED", filename: "https://s3.feedly.com/web/30.0.1136…", lineNumber: 22, columnNumber: 0, data: null, stack: "[352]</</m.startReadTime@https://s3…" }

The item won't render, it's empty. If I try to reload feedly in a new tab, the entire tab is empty.

Is there a workaround? How to do clear/fix the localStorage?
(In reply to Carey from comment #11)
> Is there a workaround? How to do clear/fix the localStorage?

I'm hoping you've addressed this problem, but for posterity:

The answer is that localStorage data is stored in the "webappsstore.sqlite" database in your profile directory.  If you delete it while Firefox is not running, you it will be re-created from scratch at startup.

Using about:support's profile "referesh" mechanism should likely accomplish a similar goal, assuming it doesn't copy the localstorage database into the new profile.

I think bug 1341070 will track this problem going forward.
You need to log in before you can comment on or make changes to this bug.