[Stylish Firefox] Database error with browser.privatebrowsing.autostart=true

Set browser.privatebrowsing.autostart = true in about:config. Or in about:preferences go to "Privacy & Security" and set History to "Never remember history".

Then the webextension add-on does not work properly and it shows this error:

An error has occurred using the Stylish database. Would you like to visit a web page with possible solutions?


  • That's a very useful clue. By default, WebExtensions work in both regular and private windows, but there is a problem with Stylish because it uses IndexedDB for data storage and retrieval.

    When I switch to automatic private browsing, Firefox's Browser Console displays this error message at startup (when Stylish runs its database health check):

    InvalidStateError storage.js:5:24

    Line 5 of the storage.js script is:

    var dbOpenRequest = window.indexedDB.open("stylish", 2);

    According to the article https://developer.mozilla.org/docs/Web/API/IndexedDB_API/Using_IndexedDB "you can't use IndexedDB in Firefox Private Browsing at all."

    So it appears Stylish 3 will not work in automatic private browsing mode for now.
  • Uhm. Is it possible for webextensions to create a non-private window?
  • Prova said:

    Uhm. Is it possible for webextensions to create a non-private window?

    I don't see that mentioned here one way or the other: https://developer.mozilla.org/Add-ons/WebExtensions/API/windows/create

    A place where that topic might have come up is: https://discourse.mozilla.org/c/add-ons (I didn't search)
  • What about the incognito parameter? browser.windows.create({incognito: false}) or something. Then you might be able to use indexedDB via that window.

  • Your guess is as good as mine.
  • edited November 2017 PaleMoon
    This is odd. I'm not trying to do incognito. However, I do launch my firefox using the command line option for -no-remote, if that matters.

    I am running NOT-WEB-EXTENSIONS firefox. Because it breaks everything! I'm on 52.5.0 ESR, using Stylish 3.0.1. Stylish still works for me on my normally launched Firefox. I need the -no-remote to launch different instances because I dedicate a second version of FF to watching Twitch.

    Edit: Apparently this forum detects my useragent and flairs me with Pale Moon. I'm posting through PM, but I use FF for Twitch and Facebook in different instances.
  • Hi Zyst, I'm not sure why you posted in this thread if you are

    * Not using automatic private browsing, and
    * You don't even need to use the new Stylish, you can stay on 2.1.1 or 2.0.7

    Are you using two different profiles when you launch the second Firefox? If not, there may be a file lock on the database until you exit out of the first Firefox.
  • Because this thread was related. Just pointing out that private browsing/incognito is not the sole problem causing this error.

    Turns out I do want to be on 2.0.7. And yes I use two profiles simultaneously. It may not be a file lock problem, as I've used that for years. But if 3.0.1 changed that behavior to file lock, it probably should be one that is changed back to support multiple profiles.

    As is, I found out that my main profile still had automatic updates enabled for Stylish, so it downloaded 3.0.1 again and it broke. But if I disable those updates and reinstall 2.0.7, everything will work indefinitely. No more updates for me.
  • edited November 2017 Firefox

    @Zyst You could switch to Stylus and be happy about updates.

  • Custom settings affect this as well, anything EXCEPT "Remember history" breaks the extension.
  • @"Dreamless Dancer" These custom settings work fine here, though...

    498 x 441 - 21K
Sign In or Register to comment.