Here is the behavior I’m observing on a brand new Ubuntu installation without any old configuration data I fetched from another installation. I have this laptop where I try this new release of Ubuntu, I do some research (Ansible and so forth), then I leave the browser open with a few tabs, lock the workspace until I come back to continue coding and reading after a few hours (because day job, sleep an such). It’s almost every time when I come back that Firefox crash reporter tells me that it should not have happened that Firefox crashed. I agree. And I ask here now: How did this happen? What can I do to help?
With Ubuntu 21.10 the default installation of Firefox seems to have switched from DEB to Snap, which is fine with me, as long as it works. I don’t want to shoot the messenger here, but this almost never happened with DEB packages. Even on Firefox Beta. Not on Chrome OS with Chrome either, so I won’t accept low effort excuses like “you shouldn’t leave the browser open that long”.
I just checked
snap info firefox, which tells me that the snap refreshed 2 days ago. So my first assumption that frequent updates may be causing this must be wrong.
A few more relevant details:
- Encrypted zfs installation as offered by the installer, rpool/USERDATA creates snapshots about every 60 minutes through autozsys. Doesn’t look like an issue to me though.
- Fresh installation from scratch, no old configuration data, as I said
- Hardware: Lenovo P14s with AMD CPU and AMD GPU (Ryzen “Pro”), 16 GB of RAM and a WD Black SN750 NVME SSD should be fine, I guess. It’s not “crippled” or dated hardware I’m nagging you with, I hope.
Firefox will also crash if its dependencies get updated, i.e. the core20 snap or the gnome platform snap. That accounts for quite a few problematic updates in total.
How often are snaps updated? Few times a day without asking?
It was alright right after upgrade, now Firefox crashes few times a day.
Snaps update automatically, and by default, the snapd daemon checks for updates 4 times a day. Each update check is called a refresh.
You can delay updates somewhat and enable refresh app awareness ([WIP] Refresh App Awareness) to prevent updates of running applications. This won’t help in all cases because it only takes the snap itself into account, but not its dependencies.
I have set refresh.timer for system and firefox
Hope this will help.
The Snap team needs to separate the download and the install process of the snap update. That way, the download process can happen on an unmetered connection, then update the app at next boot or next launch.
Am I right to assume that Snap’s app awareness doesn’t go as far as stopping the update of the dependencies?
That is correct as far as I can see.
Note to myself, seems like bug reports have been filed about this before, like this one: https://bugs.launchpad.net/snapd/+bug/1945697
I just wanted to add my voice here because, reading the comments and replies, I don’t think it properly encompasses how terrible the UX of using Firefox with Ubuntu 21.10 is right now: it’s totally broken! Every morning, I sit down in front of my computer knowing that Firefox will crash within the first minutes of use. The only positive side of it is that I can attest of the robustness of Firefox’s restore session feature. If it wasn’t for that feature, I would have thrown my computer out of the window already
I really really hope this gets fixed for the LTS release because I don’t see how a release can be called “stable” with such a poor firefox experience.
Today, I am enabling this:
sudo snap set core experimental.refresh-app-awareness=true
Hopefully, it will prevent firefox from crashing so often
Sorry for the vent, I am usually a bit more constructive but today’s first crash in the morning got me