I recently suffered a problem where Firefox began forgetting all my account authentications and what-not each time I restarted the computer. Investigating further, I discovered all my profile’s cookies were being wiped every time I exited the browser. Searching bugzilla turned up a few open bugs where people described having the same problem, but none of the them had fixes or answers beyond “check your settings” and “delete Firefox, trash your profiles, re-install”. I eventually found the answer in some mozillazine forum thread, which I thought I’d post here, in the hope that it may help any poor soul Googling the issue.
The problem is apparently caused by corruption of the SQLite database file used to store cookies for you browser profile. The fix is (or was in my case) to delete the cookies.sqlite file completely. Under Windows Vista, the file is located at: Users[account-name]AppDataRoamingMozillaFirefoxProfiles[random].defaultcookies.sqlite
When you next run Firefox, it should recreate the cookies.sqlite file, this time free of whatever evil corruption had infected it. Exactly what causes the corruption in the first place isn’t clear. People in the mozillazine thread where I found this answer claimed a poorly written add-on or plug-in is the likely culprit. The only add-ons I had installed at the time were Firebug and the Microsoft .NET Framework assistant. I have a bunch of plug-ins, but only the normal stuff like Java, Flash, Acrobat, etc. I guess it’s just one of those things. Anyway, I hope this helps someone somewhere.