No website is able to use localStorage in firefox, error "SQLite encountered an IO error"

1

One of the web apps I used complained that it couldn't use localStorage. To test if this was correct, I opened devtools and tried to execute localStorage.setItem('testkey', 'testval'). I got the following error:

[Exception... "SQLite encountered an IO error"  nsresult: "0x80630002 (NS_ERROR_STORAGE_IOERR)"  location: "JS frame :: debugger eval code :: <TOP_LEVEL> :: line 1"  data: no] debugger eval code:1:14

One possibility was that the website's storage quota was exhausted, so I tried the same on other domains (google, stackexchange) and I got the same error.

I suspect that this might be related to a recent update (I'm on firefox stable 72.0.1, on Ubuntu 16). This seems to be happening after firefox has been open for a while, and restarting resolves the issue (happened twice now).

Could anyone shed light on what might be happening and how it could be resolved?

These are the results of https://firefox-storage-test.glitch.me :

LocalStorage
Bad: Our test logic is broken, please copy and paste the contents of 'Debug Info' below and anything in the devtools console and send to :asuth. (unexpectedBreakage)
QuotaManager
Good: Totally Working. (fullyOperational)
IndexedDB
Good: Totally Working. (fullyOperational)
Cache API
Good: Totally Working. (fullyOperational)

firefox
asked on Super User Jan 12, 2020 by Peeyush Kushwaha • edited Jan 16, 2020 by Peeyush Kushwaha

1 Answer

0

I had this same issue today and its caused by either filesystem corruption, disk issues, or just db corruption in the sqlite database(s).

  1. Stop firefox
  2. Check your system to make sure you don't have any real disk errors.
  3. Remove webappstore.sqlite-shm and webappstore.sqlite-wal from your firefox profile directory (these are temporary caches of the main db file).
  4. Check the integrity of the db file as follows (you need to install sqlite to do this). If you see ok try restarting firefox - otherwise you will see this error:

    sqlite3 name_of_db.sqlite

    pragma integrity_check; disk i/o error;

  5. Copy webappstore.sqlite to a new location, delete the original, and then copy it back. Repeat step 4.

  6. If you now see ok, start Firefox.
  7. If you still have errors, you will have to just delete webappstore.sqlite - Firefox will create a new one, but you will lose local storage settings for other apps.

You may need to repeat these steps with other db files, depending on exactly where the error lies.

answered on Super User May 27, 2020 by match

User contributions licensed under CC BY-SA 3.0