Error in local storage - NS_ERROR_FILE_CORRUPTED - firefox

前端 未结 5 1777
自闭症患者
自闭症患者 2020-12-29 18:57

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

5条回答
  •  情歌与酒
    2020-12-29 19:32

    Clearing everything via the Firefox preferences may not fully clear the local storage where the corrupted SQLite file resides.

    At this point, you have two options:

    • Pop open your console and clear the storage via a Javascript command (hat tip: https://davidjb.com/blog/2017/11/resolving-an-ns_error_file_corrupted-error-in-mozilla-firefox/):
    localStorage.clear()
    sessionStorage.clear()
    
    • Use the terminal to delete the corrupted SQLite file and force Firefox to rebuild it.

    Steps for macOS users:

    1. cd /Users/myusername/Library/Application Support/Firefox/Profiles/.....default/
    2. rm webappsstore.sqlite
    3. Verify no other files corrupted using this script from TheConstructor:

      for i in $(find . -name '*.sqlite'); do echo "$i"; echo "PRAGMA integrity_check;" | sqlite3 -bail "$i"; done

    4. Restart Firefox and reload the page.

提交回复
热议问题