cannot refresh snap "firefox": snap "firefox" has running apps (firefox)

Bug #1985066 reported by Birgit Edel
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
firefox (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Firefox installed via 22.04 snap does not seem to update properly.

There is a log line (or error printout on manual execution), but it does not really point me to the actual bug. I already know firefox is running for some other user - that machine is never up and not running firefox - but I do not see how that matters.

# snap list firefox
Name Version Rev Tracking Publisher Notes
firefox 103.0.1-1 1635 latest/stable mozilla✓ -
# snap info firefox | grep latest/stable
tracking: latest/stable
  latest/stable: 103.0.2-1 2022-08-09 (1670) 171MB -
# sudo snap refresh firefox
error: cannot refresh "firefox": snap "firefox" has running apps (firefox), pids:
       19113,19246,19268,19361,19524,19529,19588,19874,20047,20075,20105,20127
# firefox --version
Mozilla Firefox 103.0.1

(expected: 103.0.2)

Tags: snap
Birgit Edel (biredel)
tags: added: snap
Revision history for this message
Olivier Tilloy (osomon) wrote :

By design and by default, snapd won't let you update a snap that has running apps, because it might result in crashes or unpredictable behaviours.

Your best bet is to actually ensure firefox is not running before refreshing it.

Alternatively, if you are an administrator on that machine, you could try to turn off that default setting (but even that might require restarting the firefox snap before it actually allows you refreshing while the app is running):

    snap set core experimental.refresh-app-awareness=false

As I noted above, this might result in unpredictable behaviour of the running apps that are being refreshed, so use at your own risk, that's not a setting that I would recommend unless you really know what you're doing.

Changed in firefox (Ubuntu):
status: New → Invalid
Revision history for this message
Birgit Edel (biredel) wrote :

Sounds like a noteworthy regression from 20.04. What can I do to help get relevant documentation updated?

"faster access to the newest Firefox versions"
https://discourse.ubuntu.com/t/jammy-jellyfish-release-notes/24668

"Automatic security updates: By Default: enabled"
https://wiki.ubuntu.com/Security/Features

Revision history for this message
Slalomsk8er (slalomsk8er) wrote :

This is a very bad user experience and besides the very annoying notifications that firefox need to be closed because of an update and if I follow this, then nothing happens and I get the same message after starting it again, I'm finished with giving this distribution method (snap) a fair try.

Changed in firefox (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
Olivier Tilloy (osomon) wrote :

The poor user experience with the notification and firefox not auto-updating itself after being closed is being addressed separately (bug #1980271).

Changed in firefox (Ubuntu):
status: Confirmed → Invalid
Changed in firefox (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
Slalomsk8er (slalomsk8er) wrote :

Sorry, can still confirm seeing this happening independently of https://bugs.launchpad.net/snapd/+bug/1980271 with user switching.

"snap refesh firefox" complains if firefox isn't closed by the user and worse, how can a regular user handle this if an other user has firefox running as well?

If I understand correctly the solution could be the same (https://github.com/snapcore/snapd/pull/12231) but I don't think this is invalidating this bug but will allow potentially that both will be closed by the same fix.

Revision history for this message
Birgit Edel (biredel) wrote :

This bug was previously tracked as a duplicate of #1980271 - that bug was since marked as fixed by changes addressing the (single-)user experience absent privilege separation.

snapd 2.59.1 in the afaict default configuration still refuses to start an up-to-date instance (in parallel, if the firefox snap design truly requires keeping all versions still in use).
The dangerously misleading "All snaps up to date." message is still printed on "snap refresh".

Revision history for this message
Ganton (ganton) wrote :

> The dangerously misleading "All snaps up to date." message is still printed on "snap refresh".

I can confirm that. Today, `sudo snap refresh` wrote "All snaps up to date." but `sudo snap refresh firefox` wrote "error: cannot refresh "firefox": snap "firefox" has running apps (firefox) [...]" because NOT all snaps are up to date.

Revision history for this message
Andreas Scherbaum (ads-launchpad) wrote :

I'm affected by this problem as well: snap shows one app which should be refreshed, but then refuses to refresh and claims there are still processes running. Looking into the process list, not a single of the listed PIDs is used.

ads@diamond:~$ uname -a
Linux diamond 6.2.0-32-generic #32-Ubuntu SMP PREEMPT_DYNAMIC Mon Aug 14 10:03:50 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

ads@diamond:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 23.04
Release: 23.04
Codename: lunar

ads@diamond:~$ snap refresh --list
Name Version Rev Size Publisher Notes
obsidian 1.4.13 18 114MB obsidianmd classic

ads@diamond:~$ snap refresh obsidian
error: cannot refresh "obsidian": snap "obsidian" has running apps (obsidian), pids:
       2531439,2531440,2531441,2531442

ads@diamond:~$ ps auxwf | grep -E '2531439|2531440|2531441|2531442'
ads 2550804 0.0 0.0 9568 2560 pts/14 S+ 22:47 0:00 | | \_ grep -E 2531439|2531440|2531441|2531442

In the meantime, the reminder about refreshing the app pops up constantly, but offers no options to solve the problem. I agree with @osomon that this is a horrible user experience.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.