Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error in local storage - NS_ERROR_FILE_CORRUPTED - firefox

I've been working in a web application and I'm using local storage. But for some Firefox users I notice that they're having the following error:

NS_ERROR_FILE_CORRUPTED: Component returned failure code: 0x8052000b (NS_ERROR_FILE_CORRUPTED) [nsIDOMStorage.setItem]

when it called the function:

function setLocalStorageItem(key, value){          localStorage.setItem(key, JSON.stringify(value)); } 

It's is a way to avoid this error?

like image 442
Juan Jardim Avatar asked Sep 18 '13 16:09

Juan Jardim


People also ask

Where is Firefox localStorage stored?

As of LSNG, local storage is also found in the profile directory under storage/default/ .

How do I change local storage in Firefox?

You can also delete local and session storage entries by selecting an item and pressing the Delete or Backspace key. Finally, you can add new storage items by clicking the “Plus” (+) button and then editing the resulting new row to the value you want.

Does Firefox have localStorage?

localStorage in extension code. Firefox clears data stored by extensions using the localStorage API in various scenarios where users clear their browsing history and data for privacy reasons. Data saved using the storage.


1 Answers

After an OS crash files within the Firefox profile folder might be corrupt and lead to non-functional websites (in my case ironically the Firefox marketplace). Here, webappsstore.sqlite was affected.

As user @Oli stated over at Ask Ubuntu

Firefox stores its HTML5 data in a file called webappsstore.sqlite. That's sitting in your profile directory which lurks somewhere in ~/.mozilla/firefox/....default/ (depending on what your profile is called).

Move that out the way and restart Firefox and everything will come back to life.

More: https://developer.mozilla.org/en/dom/storage

If deleted/moved out of your profile folder, Firefox builds a new, sanitized webappsstore.sqlite file. Worked for me.
Information on where to find your profile folder can be accessed here.

like image 50
Volker E. Avatar answered Sep 27 '22 01:09

Volker E.