What causes NS_ERROR_STORAGE_CONSTRAINT in Firefox?
Asked Answered
S

6

25

In recent versions of Firefox (since 42 or 43 maybe?), I find some sites unusable due to NS_ERROR_STORAGE_CONSTRAINT errors. I currently have 43.0.4. For example, when I go to https://jsfiddle.net/, I get this:

NS_ERROR_STORAGE_CONSTRAINT: 
var baseUrlOverride = localStorage.getItem("togetherjs.baseUrlOverride");
togetherjs.js (line 85)


NS_ERROR_STORAGE_CONSTRAINT: 
...ing")};window.addEvent("domready",function(){var e=document.id("add_external_res...
_dist-e..._2016_1 (line 32)


NS_ERROR_STORAGE_CONSTRAINT: 
...s(e.dataset.id),t.markReadItems()),t.pushMessage("setBadge",{counter:t.currentCo...
app.js (line 1)

and the site can't finish loading. This is just one example, there are many others. Pretty much any site that uses localStorage is giving these errors. I can't find any documentation that explains what this error is or how to fix it. Any ideas?

Seidler answered 20/1, 2016 at 12:40 Comment(5)
Look at the following error reporting bugzilla.mozilla.org/show_bug.cgi?id=1238354, are you running multiple versions of Firefox ?Gerstner
I had Nightly installed, but the NS_ERROR_STORAGE_CONSTRAINT error started before I installed it. I just uninstalled Nightly and still get the error.Seidler
try with a clean profile to ensure your profile db isn't corruptedGerstner
krampstudio, that worked. I uninstalled FF Nightly and created a new profile, and the error is gone with the new profile. Thank you!Seidler
I'll add it as an answer then.Gerstner
J
14

As the other answer says, your Firefox profile got corrupted. That is true, but you don't have to abandon your profile.

You have to find your profile on disk and delete webappsstore.sqlite in that profile. This will clear all your saved site storage.

To avoid this from happening in the future make sure not to mix the same profile between Nightly / Developer Edition and Stable versions of Firefox.

The patches to fix this issue just landed and should be available soon.

Bugzilla Bug url: https://bugzilla.mozilla.org/show_bug.cgi?id=1240238

Jobbery answered 29/1, 2016 at 22:21 Comment(3)
I was hoping I could save the profile and not have to create a new one. That is great to know, thank you.Seidler
I went for Settings -> Privacy and Security -> Cookies and Site Data and clicked the Clear Data Button on Firefox 98.0.1. That fixed my problems on all pages I recently visited.Diaconicon
Nothing said here fixed it for me. I really need to create a new profile and copy over everything, it seems. :(Chambers
I
22

I had to clear Cookies and Site Data to fix this issue in Firefox 98.x.x (64-bit)

Go to Preferences > Privacy & Security > Cookies and Site Data > Clear Data...

All other steps like deleting webappsstore.sqlite file and fixing the profile did not work for me.

Ileum answered 28/3, 2022 at 7:57 Comment(4)
I cleared the relevant site's data, as well as Slack's (!) which used 1.5GB. It worked after this.Collectivity
This worked for me - I'm guessing this will be the top answer soon, it seems this is the more common symptom in 2022.Sealer
The site's edit queue is full, but Preferences should be Settings: support.mozilla.org/en-US/kb/…Sealer
Just cleared the cookies and site data for the relevant website and it worked fine.Corrianne
J
14

As the other answer says, your Firefox profile got corrupted. That is true, but you don't have to abandon your profile.

You have to find your profile on disk and delete webappsstore.sqlite in that profile. This will clear all your saved site storage.

To avoid this from happening in the future make sure not to mix the same profile between Nightly / Developer Edition and Stable versions of Firefox.

The patches to fix this issue just landed and should be available soon.

Bugzilla Bug url: https://bugzilla.mozilla.org/show_bug.cgi?id=1240238

Jobbery answered 29/1, 2016 at 22:21 Comment(3)
I was hoping I could save the profile and not have to create a new one. That is great to know, thank you.Seidler
I went for Settings -> Privacy and Security -> Cookies and Site Data and clicked the Clear Data Button on Firefox 98.0.1. That fixed my problems on all pages I recently visited.Diaconicon
Nothing said here fixed it for me. I really need to create a new profile and copy over everything, it seems. :(Chambers
A
7

Same case happened to me. My Firefox Profile got corrupted. Here are steps I did to recover my profile:

  1. got to about:profiles page
  2. find the profile which is currently in use (if you have multiple there). There will be text like "This is the profile in use and it cannot be deleted." next to such profile
  3. Profile description will contain information about Root Directory path. Open it in any file manager
  4. Close all instances of Firefox
  5. Inside Profile Root directory, you'll find webappsstore.sqlite - remove it (this alone didn't help in my case, but might help in your case as others report here)
  6. Inside Profile Root directory, navigate to storage/default/ directory
  7. Remove all folders starting from http/https/file. Don't remove folders starting from moz-extension unless you want to clean settings of your extensions too
  8. start your Firefox, everything should work at this point

I believe the main root cause in my case was parallel access by Google Drive app to the Profile directory. I wanted to have my Profile synced with cloud. It worked for quite some time, but at some point, the Profile got corrupted.

Andriette answered 24/9, 2021 at 8:50 Comment(4)
Worked for me! ThanksDaguerreotype
Did not help meDispute
This didn't make difference but once I deleted ls-archive.sqlite it started working fineThomajan
Finally, also deleting storage/default/http* made the difference for me!Chambers
S
2

At least version 97, 98, and 99 of Firefox are affected by bug #1758416, which causes NS_ERROR_STORAGE_CONSTRAINT to be returned by localStorage operations.

The problem seems to empty strings being coerced to NULL, when storing localStorage data with SQLite and NULL not being allowed for by Firefox's schema.

Selfinterest answered 10/4, 2022 at 12:39 Comment(0)
G
0

Your firefox' profile database is corrupted. You need to create a new profile using the Firefox ProfileManager.

Gerstner answered 27/1, 2016 at 8:23 Comment(0)
V
0

For me just updating Firefox probably lead to a resolution (I also changed the localStorage property value through the console and refreshed a page, but I'm not sure if that changed anything).

My current version: 126.0.1.

I understand it may not be as simple as that for others, but I believe just updating is worth a shot to maybe start with.

I also think that if one really opened the same profile in different Firefox versions (like stable and Nightly) and it caused the issue (or some other one), just making sure that both of them share the same Firefox version may lead to a resolution to the issue.

Vestal answered 10/6 at 10:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.