Ubuntu – Firefox 84 Crashing

crashfirefox

After upgrading to firefox ver 84.0.1+build1-0ubuntu0.20.04.1 (from Ubuntu 20.04 repo), I've been getting a lot of crashes in firefox (rest of system is still functional). It usually happens more than 15 minutes into application startup, and has even happened while I was idle and away from my desk. As far as I can tell it's the same error message every time. One of my crash reports can be found at https://crash-stats.mozilla.org/report/index/fc8299fa-5080-4ffb-bd81-2bca80201226

I tried a reinstall of firefox (also from the ubuntu repo), but that didn't work.

I then rolled back to another version that was available in the ubuntu repo (75.0+build3-0ubuntu1), and that stopped the crashing, but of course that's not going to work long-term either.

After seeing that v75 was working, I tried upgrading again to v84, and once again FF started crashing. For now I'll stay rolled back, but would love to get this figured out.

Best Answer

Sometimes Firefox's configuration files located under .mozilla/firefox/ in the user's home directory get corrupted due to force kill Firefox (eg. system crash, system reboot or shutdown while browser tabs are open). This can sometimes happen during Firefox or system upgrades.


Fix Firefox:

You can make Firefox build new fresh configuration if you rename/delete the current configuration directory. Be warned you will loose all your plugins, bookmarks, saved site logins ...etc. and you will end up with a new default fresh copy of Firefox. To try this:

  1. Close Firefox browser.
  2. Back up your current Firefox configuration directory. Run the following in the terminal:

cp -r ~/.mozilla/firefox/ ~/.mozilla/firefox_old/

  1. Delete your current Firefox configuration directory. Run the following in the terminal:

    rm -r ~/.mozilla/firefox/

  2. Start Firefox browser. A new .mozilla/firefox/ directory will be automatically created with fresh configuration files in it.

  3. Try Firefox now and see if it works again.


Rescue data:

If all goes well and Firefox is working again and you wish to restore your important data to the new configuration directory, please follow the steps below:

  1. Close Firefox browser.
  2. Run the following command in the terminal:

cp ~/.mozilla/firefox_old/*default/{logins.json,key3.db,key4.db,places.sqlite,cookies.sqlite,formhistory.sqlite,permissions.sqlite,content-prefs.sqlite} ~/.mozilla/firefox/*default/

  1. Start Firefox browser. This should restore your site logins, passwords, bookmarks, form data and cookies. Please read here

Go back?

If the above solution did not work and you wish to go back to your old Firefox state, Please follow the instructions below:

  1. Close Firefox browser.

  2. Delete your new Firefox configuration directory. Run the following in the terminal:

    rm -r ~/.mozilla/firefox/

  3. Restore your old Firefox configuration directory. Run the following in the terminal:

    cp -r ~/.mozilla/firefox_old/ ~/.mozilla/firefox/

  4. Start Firefox browser. You are now back to your old Firefox configuration. Exactly as it was before you attempt to fix it using this answer.

  5. If all goes well, clean up and remove the back up created during this process. Run the following in the terminal:

    rm -r ~/.mozilla/firefox_old/

Related Question