Refresh App Awareness - call for testing

We’re going to enable refresh app awareness in snapd by default with 22.04 and because of that would like to encourage everyone interested in helping test the feature to enable it already on their systems (there is no need to have 22.04 installed - it’s enough to be running latest stable snapd or latest snapd from edge in cases of fixes) and report any problems.

To enable the feature now do the following:

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

For more background about the feature see [WIP] Refresh App Awareness

What you can expect from it right now:

  • a desktop notification about refresh attempt getting inhibited when affected app (snap) is currently running. The refresh can be inhibited by up to 14 days.
  • a desktop notification when attempting to run an app that is getting refreshed.

The feature has some limitations discussed in the thread mentioned above - most notably, a long running app (e.g. started together with the desktop session and running till reboot) may never have a window to refresh (until it runs out of the 14-days allowance for inhibiting the refresh of course); this will be addressed via future improvements.

7 Likes

Hi Pawel,

I have had refresh awareness enabled for nearly a month now, and it has significantly improved my experience using the Firefox snap as my primary browser.

Before I enabled refresh-awareness, I found that I would open Firefox in the mornings and read my email, or talk in a meet and greet interview, and the browser would crash due to a refresh that occurred. This got pretty painful with constant Firefox point releases happening to fix cves.

Since I have had refresh awareness enabled, I have been receiving the notifications about the pending refresh:

Pending update of "firefox" snap
Close the app to avoid disruptions (14 days left)

I have seen this during video calls, reading my emails and other important tasks, and the browser has been stable until I reach a time where I can close and perform a snap refresh.

My only complaint is that snapd does not watch and wait for the process to terminate and then start an automatic refresh, I have to initiate a refresh manually. With being able to inhibit a process from starting during refresh, it would be safe to auto refresh on close, and if the user happens to launch the browser immediately after close, maybe send a notification or progress bar telling the user the app is refreshing, and it will be ready soon.

But otherwise, I am very happy with refresh awareness on snapd running on Jammy, and I strongly encourage you to enable it by default before Jammy is released.

5 Likes

Positive experience here too! Before refresh-awareness, Firefox was simply unusable, crashing every single morning a few minutes after I got on the computer. Since refresh-awareness was enabled (a few weeks ago), almost no crashes. My Firefox is back to being usable again.

My main complaint is the same as mentioned by @mruffell, I wish that snap would detect when the process is no longer running to initiate a snap refresh automatically instead of me having to do it manually.

Other issue, with Chrome this time, it happened several time that closing Chrome doesn’t kill all its processes so snap refresh does not work. I had to manually kill all Chrome processes in order to refresh its snap.

1 Like

I’ve been using it for a several months now, and it works as designed. As for updating on app close, my vote is for some kind of permanent notification whenever there’s a pending update, so user can choose best time to do it (within 14 days windows, obviously).

I know it can be tricky to implement, given all DE’s out there; maybe the notifications API already include tools to make a notification permanent, on whichever DE user prefer to use.

Is this still on course for the GA release?

I’m wondering whether the change of default is tied specifically to Ubuntu 22.04 users, or whether it’s tied to a specific snapd release (e.g, will 20.04 users get it as part of snapd 2.xx).

While I haven’t tested it recently, I’d tested it a few months ago and it solves a lot of my problems as both distributor and user, so any improvements since will have only sweatened the deal.

This is a massive improvement IMO and I’m glad to see it been close to released to stable / by default, thanks you to everyone working on it :slight_smile:

2 Likes

It’s still planned to land very soon (https://github.com/snapcore/snapd/pull/11566) ; I don’t know if it will make it on time for snapd deb included in 22.04 - if not, then it will just auto-update itself when new version of snapd is rolled out to the snap store.

And yes, it’ll be automatically available everywhere, it’s not tied to specific Ubuntu release.

1 Like

One thing I wish this can do is download the update, and apply immediately as soon as the app is closed, or just before the app is launched (there’ll be a message that says something like " is updating at the moment…").

That should save some time. The current message that says “pending update of <snap>. Close the app to avoid disruption” is a little vague. No indication whether the app was successfully updated. I just tried to close Firefox (running on beta channel) to apply the update, and relaunched about half a minute later. While it launched (slowly, FYI), update still didn’t apply (from 100.0b5-1 to 100.0b6-1).

1 Like

I’ve just encountered this, and for Firefox - this is so confusing: I got the notification about the refresh, then closed Firefox and left it closed for a while, before opening. Obviously nothing actually happened and the next day I got the notification again, counting down the days.

I think immediate update when the application is closed is kind of required, because the user doesn’t know what to do with that message - except to do as it says: close the app, but as discussed - that doesn’t help.

3 Likes

You can run snap refresh firefox to manually refresh once you close it. But I agree with you!

@elcste - Thank you for that explanation. I had no idea what to do until I found this thread.

The idea that I would just close an app and… wait a day or so for it to update, I guess… is mind-boggling. A few points of feedback as a startled and confused user:

  1. The message gives me no information regarding how to resolve the issue. It should mention running snap refresh in the terminal, at the very least
  2. It would be better if a button in the message automatically stopped and refreshed the app when clicked instead of forcing me to Terminal
  3. Better still would be some sort of persistent tray icon or menu that let me see all of the apps that need closing+refreshing (instead of multiple messages, one per app) and either monitors them to update automatically when they close or lets me manually trigger their updates

I get that progress is iterative and snap is relatively new and experimental (compared to apt, yum, etc.), but as a user who was happy with apt and its GUI counterparts, this behavior just makes me wonder why snap is being used in LTS releases to begin with.