Snap doesn't refresh automatically immediately after snap is quit when update is pending

Bug #1980271 reported by Jeremy Bícha
150
This bug affects 24 people
Affects Status Importance Assigned to Milestone
snapd
Fix Committed
Undecided
Miguel Pires
firefox (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Impact / What Currently Happens
------------------------------
Many people open their chosen web browser (Firefox or Chromium) immediately after logging in and keep the app running continuously.

Eventually, there will be a snap update available. The system notifies that there is a pending update and to "Close the app to avoid notifications."

Most people will eventually close the app, but the pending update is not applied until the next snap refresh is attempted which could be hours away.

This is a frustrating experience because it feels like the notification is not helpful.

I think many users would prefer the snap to just update silently in the background with little or no notification.

Test Case
---------
From Ubuntu 22.04 LTS with the Firefox snap installed by default
Keep Firefox running
Wait for a new Firefox release (happens at least monthly)
Receive a notification about a pending update for Firefox
Close Firefox
Wait a few minutes
Open Firefox

Workaround
----------
Close the app that needs to be updated
Open a terminal and run this command:
snap refresh

Other Info
----------
This issue was mentioned in the original post and in the first comment at
https://forum.snapcraft.io/t/refresh-app-awareness-call-for-testing/29123

Suggested Mitigation
--------------------
Would it help to run a `snap refresh` immediately after Ubuntu is booted?

Revision history for this message
Miguel Pires (miguelpires1) wrote :

This PR https://github.com/snapcore/snapd/pull/11912 disables the refresh-app-awareness so that the running app doesn't block the refresh. This doesn't fix the issue mentioned here but it's related.

Changed in snapd:
status: New → Confirmed
Revision history for this message
Michel-Ekimia (michel.ekimia) wrote :

Just to say that several of our clients are reporting questions about the current behaviour :

- " I received this notification several times per day , what should I do "

- " I closed the app and now what ? "

We really need to make the experience more smooth for people or this will be come a case where people will say " Ubuntu is less convenient for new users"

Olivier Tilloy (osomon)
Changed in snapd:
assignee: nobody → Olivier Tilloy (osomon)
assignee: Olivier Tilloy (osomon) → nobody
Revision history for this message
Sergio Costas (rastersoft-gmail) wrote :

We are currently working on some patches for snapd and snapd-desktop-integration to manage this. We hope to merge them soon.

Changed in snapd:
assignee: nobody → Sergio Costas (rastersoft-gmail)
Revision history for this message
Sergio Costas (rastersoft-gmail) wrote :

This MR is the base for this feature. Once it is merged, we will be able to fully implement it.

https://github.com/snapcore/snapd/pull/12231

Changed in snapd:
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in firefox (Ubuntu):
status: New → Confirmed
Revision history for this message
Miguel Pires (miguelpires1) wrote :

Implemented in the PRs listed in this comment: https://github.com/snapcore/snapd/pull/12495#issuecomment-1446110993

Changed in snapd:
assignee: Sergio Costas (rastersoft-gmail) → Miguel Pires (miguelpires1)
status: In Progress → Fix Committed
Revision history for this message
Lyubomir (mystiquewolf) wrote :

Not updating Firefox for a long time (due to this bug) is a major vulnerability in Ubuntu... Release the fix already!

Revision history for this message
Mateusz Stachowski (stachowski-mateusz) wrote :

I'm using the edge versions of snapd and snapd-desktop-integration and the changes work.

When I click the OK button with Firefox or Snap Store update and then close the app, snapd performs update. I don't have to resort to any manual tinkering (no snap refresh or killing the process from terminal).

This is great improvement but I hope that eventually users will see the option to click on a button that closes the app, then applies the update and finally restarts the app.

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.