182

Recently, this warning appears when open Firefox:

Pending update of "firefox" snap

Close the app to avoid disruptions

What does it mean? And what do I have to do? Is this a bug?

11
  • 6
    Alternatively, replace the snap version of Firefox with apt version, so that you control when firefox will update (and it won't interrupt when you are doing some important work). Jun 3, 2022 at 16:05
  • 35
    just a comment: why can Firefox / Chromium give us a hint of what to do ? Rather than send a totally ambiguous statement out day after day until we have to go out and search for answer. Lack of intelligent documentation is such a waste of time - for everyone. Jul 4, 2022 at 6:55
  • 4
    The snap notification "Pending update of "XYZ snap Close the app to avoid disruptions," introduced in 22.04, is an enormous improvement over the older behavior...where the app would simply terminate without warning in order to update, seeming like a crash. Folks who want to improve the experience should get involved, contribute code, and make other meaningful contributions. Complaining about it here accomplishes nothing.
    – user535733
    Aug 2, 2022 at 1:53
  • 3
    I just want to comment the current status quo is better than before. Before, apt would upgrade firefox (since it's considered a security update), firefox would show that bar saying it must be restarted, and you could not open new tabs until you restarted firefox. Now, there's a notification that I thought meant an update would occur as soon as I quit firefox, and turns out it won't. Fine by me, personally rather than force the update I'll let it update when it wishes too.
    – hwertz
    Aug 23, 2022 at 19:16
  • 34
    This UX is terrible. Because if you close firefox nothing will happen. The message should be "close the app and do a refresh by yourself, or I will notify you again".
    – mathieu
    Sep 9, 2022 at 6:53

9 Answers 9

118

If you have received a notification of a pending Firefox update it will appear as a small bell icon next to the clock in the top panel. Clicking on the bell will show a Firefox pending update notification as shown in the below screenshot.

enter image description here

As soon as you see the Pending update of "firefox" snap. Close the app to avoid disruptions (13 days left) notification (which means you have 13 days to upgrade Firefox yourself or else the Firefox snap package will get an unattended upgrade) close Firefox and then reopen it after updating the Firefox snap package is finished. If the pending update to the Firefox snap package has not started yet, it can be initiated by running sudo snap refresh. If you don't close Firefox after Firefox has finished being updated, then you will be unable to open any new tabs until you close Firefox and then reopen it.

When the Firefox snap package has been updated a notification will appear that Firefox was updated and is ready to launch.

enter image description here

Another noteworthy feature of pending updates for Firefox is that they can be installed automatically without user interaction. For example, I have closed Firefox, locked the screen, and left the computer for a few minutes, and then when I came back I received a notification that a pending update to Firefox had been installed in my absence.


The Firefox update notification has changed since this question was asked. Now it looks like this.

enter image description here

The bottom notification says that Software updates are available to be downloaded. When I ignore this notification on my Ubuntu 22.04 the software updates are downloaded automatically. The top and more recent notification says:

Update available for Firefox.
Close the application to update now. It will update.

As soon as I close the Firefox window, Firefox starts to update, and a few seconds later I get another notification that says:

Firefox was updated.
Ready to launch.

The second screenshot in this answer shows an image of this notification which is the third of three Firefox update notifications. I consider these 3-step notifications to be an improvement on the original notification because because when I close Firefox it only takes a few seconds for Firefox to be updated and ready to launch. If I select History -> Restore Previous Session in Firefox, then all my tabs from the previous session come back.

25
  • 5
    I,ve done this sequence: Close firefox. Command in Terminal: sudo snap refresh. And now it's Ok
    – Emilio
    Jun 3, 2022 at 17:50
  • 72
    Another example of snap wanting to have some feature without implementing proper UI support. We want Android style permissions, but we won't have Android-style permission prompt popups, we'll make you dig through settings to find out what's wrong. We want to force you to close the app to allow an update, but we won't detect that the app closed and update visibly automatically, go do it yourself in a terminal.
    – Jack M
    Jun 6, 2022 at 12:46
  • 25
    To spell this out, sudo snap refresh while firefox is running shows no snaps to update, run it after killall firefox and it does update.
    – Rqomey
    Jun 7, 2022 at 11:14
  • 31
    I believe that this is not really answer to the problem, just workaround. Application should be updated seamlessly without disrupting user workflow. Do you know if there is a bug? Jun 13, 2022 at 17:13
  • 17
    Why even force updates? This is not Windows. The want to bring Microsoft update philisophy here of forced updates. I don't like having to re-open my programs and re-creating my environments. So stupid
    – chx101
    Aug 5, 2022 at 8:31
66

The above only works if you actually close firefox, otherwise the snap will not refresh, and running snap refresh will not even tell that it held an update back.

The formula that worked for me:

killall firefox;
sudo snap refresh;

But the user experience sucks. It was far more slick using apt, and starting firefox on older machines seems quite a lot slower too.

3
  • 2
    The "killall" element solved my issue
    – havlock
    Jun 14, 2022 at 6:37
  • Same with Telegram too, which is what I was having a problem with. Make sure it is really closed and not just minimized before doing the refresh.
    – dan-gph
    Aug 16, 2022 at 7:27
  • 1
    Even rebooting does not make the message go away. As phm says: the user experience sucks. Mar 10, 2023 at 8:33
47

How to disable snap notifications on the Settings UI

This is not ideal as you will miss out on the latest security updates. But if the thing is going to keep annoying me every other day, I can't stand it anymore.

  • Settings ("Windows key" and search "Settings")
  • Notifications
  • Snapd User Session Agent
  • Slide Notifications left

Tested on Ubuntu 22.04. Learnt from: https://forum.snapcraft.io/t/how-to-disable-snapd-update-notifications-permanently/31117/2

It is not like I leave my laptop on suspend every night, I shut it down every day, thus shutting down the browser, and even then the update is not automatic. That system is just too user unfriendly. Devs need to implement a system that automatically downloads security updates, and that they take effect when you restart the program. A notification should only show e.g. after 24 hours of being outdated.

Bibliography:

enter image description here

1
  • 4
    I agree, it is extremely annoying, why don't the add an option to automatially download the update, and apply the update on the next restart of the app [just like expo updates :)] Apr 3, 2023 at 20:00
31

The message says...

Close the app to avoid disruptions

It would be more helpful if it told you to close the app, and leave it closed for a day or so (with the computer running), to allow the pending update to occur in the background. The assumption is that this process, itself, will not be a "disruption".

The faster solution, assuming you're willing to put up with snap shenanigans, is to run snap refresh --list in order to identify any pending updates, then close the associated apps before running sudo snap refresh, then repeat this sequence to make sure you were successful.

Here's a session log, further demonstrating that you can't take snap messages at face value. Hopefully, there's enough hints here to make snap updates more manageable.

$ sudo snap refresh
All snaps up to date.

$ snap refresh --list
Name      Version        Rev   Size   Publisher   Notes
chromium  103.0.5060.53  2020  139MB  canonical✓  -

$ snap refresh --time
timer: 00:00~24:00/4
last: today at 14:55 MDT
next: today at 19:03 MDT
8
  • 1
    On the plus side (assuming you have enough expertise to deal with this successfully) these popups make it more obvious when your browser(s) need to be patched. Jun 21, 2022 at 23:14
  • 2
    I got a similar notification about another application. I then gave the command sudo snap refresh, which yielded the output All snaps up to date. Only after I'd closed the offending application, and tried the refresh command again, was the application updated. Very odd. Jul 12, 2022 at 19:42
  • 3
    The warning message is clearly deficient in that it seems to imply that ALL you have to do is close the app. The SNAP daemon knows that it is dependent upon Firefox being shut down. Why does the Snap Daemon not ask for a NOTIFICATION when Firefox does shut down and automatically start the refresh? I haven't tried a reboot. Does anybody know if a reboot includes an automatic snap refresh? Somehow APT managed to update Firefox without requiring this much intervention from the user. Aug 28, 2022 at 2:16
  • how early can snap refresh be scheduled during boot? Sep 7, 2022 at 5:29
  • @JamesCobban Yes I tried rebooting, and no (ubuntu 22.04) it doesn't automatically snap refresh. Oct 26, 2022 at 19:36
7

Firefox deb packages are available from mozillateam PPA.

Shot instructions:

sudo add-apt-repository ppa:mozillateam/ppa
# raise firefox PPA priority
echo -e 'Package: firefox*\nPin: release o=LP-PPA-mozillateam\nPin-Priority: 501' | sudo tee -a /etc/apt/preferences.d/mozillateamppa
sudo apt remove firefox
sudo apt install firefox

Remark

The PPA repo has a higher Pin-Priority, but after two days, the snap package was installed again.

I've done the following:

apt list --all-versions firefox
sudo apt install firefox=105.0+build2-0ubuntu0.22.04.1~mt1
sudo apt-mark hold firefox

Update firefox

sudo apt upgrade firefox
4

Here's an all GUI, app specific solution:

  • Close the app in need of updating
  • Open the Ubuntu Software app
  • Click "Installed" (to list only software already on your machine)
  • Click on the app to update
  • Click "Update"
1
  • 2
    Some applications remain running when the application window is closed (snap-store is one example). The user must actively Quit those applications.
    – user535733
    Sep 19, 2022 at 2:22
4

There seems to be a bug in the update or update message system (Possibly related to FireFox).

I keep seeing the alert message in the System Messages notification area:

firefox update message

However, there is no actual update for firefox available.

I am running the current version which is available from snap.

firefox version

If I look in the Snap store it shows there are actually no updates.

snap store no updates

However, when I look at the version in the snap store it does display the [Install] button (as if it is not installed).

However, you can see that both versions (107.0.1) are the same.

firefox 107.0.1

And yet this message keeps popping up each day. It always says 13 days left also.

5
  • 2
    it just keeps getting better and better. / sarcasm
    – pierrely
    Dec 17, 2022 at 3:36
  • Hey I have this same exact bug with Firefox on 22.04 so did you ever find a solution for it?
    – Cool124
    Jan 8, 2023 at 21:41
  • @Cool124 Seems to be a bug because I see the latest version of FireFox released and it is giving the message again -- even though I already have the latest version installed. I have not found any solution at this point.
    – raddevus
    Jan 8, 2023 at 22:13
  • @raddevus Yeah you're not the only one with that bug. Hey you should report it to Canonical as a bug, you can report bugs to Ubuntu help.ubuntu.com/stable/ubuntu-help/report-ubuntu-bug.html.en
    – Cool124
    Jan 8, 2023 at 22:29
  • This bug is now long fixed.
    – user535733
    Feb 8 at 2:45
2

If the notification still popups after the suggested killall offending_process_name, try running:

sudo snap refresh [offending_process_name]

Replacing [offending_process_name] for the name of what you are trying to update. If you don't know the name, you can use sudo snap refresh --list to get it.

Why? Because that one will fail too, but it will tell you why it fails for that specific package. It will produce an output similar to this:

Cannot update [offending_process] because it has associated apps running.

And most important, it will tell you the PIDs of the associated processes in the next line. Once you know the PIDs, you can simply run:

sudo kill 44332
sudo kill 55434

Where those numbers are some random PIDs. Replace for the real ones.

Then retry:

sudo snap refresh [offending_app]

or sudo snap refresh and it should work this time.

Real life example: Visual Studio Code seems to spawn processes like Android's ADB, omnisharp, etc. And in some situations it doesn't close them on exit. This result in a peculiar situation. You run killall code, code is the command name to launch Visual Studio Code, and you get that the process isn't running at all. Then you retry sudo snap refresh and it doesn't update code, and just produce the popup saying "you have XX days to...".

It seems like snap tracks the processes launched by snaps even if they aren't snaps themselves (comment on this). The PIDs you pass to kill command may not be snaps. If this is the case, then spawning things from the builtin terminal may too prevent update even when code is not in memory.

Also, if for some reason kill doesn't end those processes you have to force the SIGKILL signal, default is SIGTERM and won't kill bugged processes. See man kill.

1

Just close Firefox and then run these commands:

sudo snap refresh
sudo snap refresh firefox
3
  • 1
    If you "Just close the firefox" you also still have to explicitly tell SNAP to refresh. For some reason this is not automatically triggered when Firefox shuts down. I tried. Finally when you restart Firefox you have lost your current working environment. It might have taken hours to get to the specific set of open windows. Instead the message does not warn you that you need to KILL your Firefox tasks, for example by rebooting. Aug 28, 2022 at 2:11
  • "snap refresh --list" command lists all snaps need to be refreshed Sep 1, 2022 at 13:06
  • No matter how much snap refreshing, upgrading, and updating I do, the message keeps coming back. The only cure for the problem is to have some kind of automatic updating
    – Paul A.
    Oct 26, 2022 at 22:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .