Friday, February 18, 2011

Firefox Crash Recovery

Just the other day, I was left with no option other than to power-cycle my Ubuntu workstation at work. After this, Firefox, which was open when my workstation died on me, would not start anymore. It just insisted that "Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system." - a useless piece of crap advice.

This happened to me before, but I never bothered to document the recovery process. I learned my lesson, thank you very much:
  1. step #0: find the location of the default Firefox user profile, and then cd to it:
    cd ~/.mozilla/firefox/pefasakk.default/
  2. step #1: remove the previous session's lock file:
    rm .parentlock
    you may be lucky, and all may just work now. I wasn't, and it didn't.
  3. step #2: if Firefox complains that bookmarks and history have been disabled, then you should move away the places database and try again:
    mv places.sqlite places.sqlite.backup
    mv places.sqlite-journal places.sqlite-journal.backup
    the good news is that Firefox will most likely start with your bookmarks intact, the bad news is that you've just reset your browsing history...
  4. step #3: I thought I was out of the woods - everything looked normal enough, until I restarted Firefox - a few hours later - only to discover that Firefox stopped saving cookies, so that I had to re-login to every web site that required it (so many!). I fixed this by moving away the cookies database:
    mv cookies.sqlite cookies.sqlite.backup
    mv cookies.sqlite-journal cookies.sqlite-journal.backup
Now back to our regularly scheduled programming (pun intended).

No comments:

Post a Comment