IO Error when using localStorage on Firefox 29+?

3

I am using localStorage in a very basic manner in an internal application. Its only storing a simple string value "newest" or "oldest":

localStorage.setItem('sortOrder', val)

But for some reason, certain users are throwing the following errors in Firefox:

Component returned failure code: 0x80630002 (NS_ERROR_STORAGE_IOERR) [nsIDOMStorage.getItem]

Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMStorage.getItem]

The IOERR occurs roughly 125 times a day across hundreds of page loads and FAILURE occurs only 5 or so times.

I found https://bugzilla.mozilla.org/show_bug.cgi?id=700841, but none of our users have any extensions installed.

Google doesn't return anything particularly useful other than this wrapper around localStorage: https://github.com/doochik/SafeLS

I'm hesitant to silently catch all errors, but without anymore information, it sounds like the only solution...

Does anyone have any insight into what these errors actually mean? Any ideas what could cause localStorage to throw these errors?

javascript
html
firefox
local-storage
asked on Stack Overflow Jun 13, 2014 by oif_vet • edited Jun 13, 2014 by oif_vet

1 Answer

0

Override automatic cache management was the culprit for me on Firefox 48 under:

  • Edit
  • Preferences
  • Advanced

I selected that option in the hope that it would reduce the cache disk usage, as it enables the "Limit cache to X MB" dialog.

It did, but it also broke several websites in the process...


User contributions licensed under CC BY-SA 3.0