some firefox settings not saved across restarts

5

I upgraded from Firefox 3.6 to Firefox 4 a while back. Overall I have been happy with the new version, but one problem has me stumped: Firefox doesn't save some settings across restarts, e.g. popup blocker site exceptions and file type actions.

This happens in two separate Firefox profiles. Both profiles have "Clear history when Firefox closes" unchecked, and the privacy.sanitize.sanitizeOnShutdown and privacy.clearOnShutdown.* settings in about:config are set to false.

The behaviour doesn't happen on another computer where I have two identical profiles with the exact same configurations; their settings are happily saved across restarts. I use Firefox Sync with both profiles across the two machines.

One difference is that on the problematic machine, my ~/.mozilla directory is a symlink, while it's not on the machine that works. It saves other settings and history fine though, just not the aforementioned settings, so I doubt the symlink is the root cause.

Here are some other details (the same for both machines):

  • Running Ubuntu Lucid
  • Using this Firefox package: 4.0+nobinonly-0ubuntu1~mfs~lucid1
  • privacy.sanitize.migrateFx3Prefs is set to true
  • All files under ~/.mozilla/firefox/... are user readable and writable, and all directories are executable
  • The problem still happens in Firefox's safe mode

ryan

Posted 2011-05-09T20:51:02.440

Reputation: 268

Answers

3

I think the .sqlite file may have become corrupted, or at least incompatible.

I suggest you back it up, then delete it. Firefox should recreate it on start-up. If after this the changes are saved between sessions, my suspicion is confirmed.

If this is the cause, either try to find a way to clean or reconstruct the file, or just suck it up and reenter your settings.

Mr.Wizard

Posted 2011-05-09T20:51:02.440

Reputation: 1 309

1yup, that was it. @voithos's answer inspired me to investigate, and i found that permissions.sqlite had this schema:
CREATE TABLE moz_hosts ( id INTEGER PRIMARY KEY,host TEXT,type TEXT,permission INTEGER); but Firefox was expecting this schema: CREATE TABLE moz_hosts ( id INTEGER PRIMARY KEY,host TEXT,type TEXT,permission INTEGER,expireType INTEGER,expireTime INTEGER); note the extra expireTime column. after i backed up and deleted permissions.sqlite, firefox happily recreated and used it. thanks!
– ryan – 2011-05-10T17:47:16.953

1

You said that both profiles have "Clear history when Firefox closes" unchecked. Try checking it, going into "Settings..." and making sure that "Site Preferences" is unchecked. Then, uncheck "Clear history" again. Also, under Tools -> Clear Recent History, make sure that "Site Preferences" is unchecked.

If that doesn't work, then perhaps it has something to do with your permissions.sqlite file under your profile directory, which normally contains the exceptions that you mentioned. Maybe try looking into it with sqliteman or SQLite Manager, and see if it is saving the information at all.

voithos

Posted 2011-05-09T20:51:02.440

Reputation: 163

thanks for the suggestions! Site Preferences was unchecked in both places, but looking at permissions.sqlite was a good idea. sqliteman shows that it's valid, and has a bunch of data, but that data never makes it into firefox itself. the file was also last modified over a month ago. investigating more... – ryan – 2011-05-10T17:00:11.093

fixed! details below. thanks again! i'd accept both answers if i could; as it is, i've voted yours up since it was helpful too. – ryan – 2011-05-10T17:51:23.820

@ryan Glad to see that your issue is resolved! Thanks for sharing your investigation into the sqlite file, too; quite interesting. – voithos – 2011-05-10T17:54:25.177