Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snap store update via the app center fails #1643

Closed
gojo-limitless opened this issue Apr 14, 2024 · 6 comments
Closed

Snap store update via the app center fails #1643

gojo-limitless opened this issue Apr 14, 2024 · 6 comments

Comments

@gojo-limitless
Copy link

gojo-limitless commented Apr 14, 2024

(X11 session) The same error was showing up for Firefox as well. I went to the Firefox page on the App Center separately, and hit "Update" and that was resolved.

But, that doesn't work for snap store. I can't seem to update the snap-store via terminal as well (it shows the same error) even if the app center is closed.

A user should not go all the way to kill the specific process ID just to apply an update available here. Defeats the purpose of having an app center and getting the "update" button.

Screencast.from.2024-04-14.18-08-19.webm
@kenvandine
Copy link
Member

I think the snap-store snap should be excluded from the update all and the update journey completely in the snap-store UI. It will refresh automatically anyway when the app exits.

@krille-chan
Copy link
Contributor

I think the snap-store snap should be excluded from the update all and the update journey completely in the snap-store UI. It will refresh automatically anyway when the app exits.

What do you think about, if we improve the error dialog that it explains (translated to the system's language) that the snap must be closed before updating it but also offers a button to do it like this:

" has a running process. To perform the update for the app must be closed first."
[Close and update ] [Cancel]

This should then also work for the snap-store I think.

Problem is: This needs some work in the snap rest API first. As far as I can see the rest API currently only returns the un-translated English message. If it could return the running snap names with their process ID's in a JSON format, this should be possible to implement

@d-loose
Copy link
Member

d-loose commented Apr 19, 2024

I think the snap-store snap should be excluded from the update all and the update journey completely in the snap-store UI. It will refresh automatically anyway when the app exits.

Agreed, that's probably the cleanest solution. I wonder if this needs some UI work though, since we might want to tell the user

  • that an update for the snap-store snap is available
  • that no action is required since it will be automatically refreshed
  • how they can manually update if they choose to do so
  • how they can switch to a different channel for the snap-store snap

@anasereijo what do you think?

What do you think about, if we improve the error dialog that it explains (translated to the system's language) that the snap must be closed before updating it but also offers a button to do it like this:

" has a running process. To perform the update for the app must be closed first." [Close and update ] [Cancel]

I think this is a related but separate issue and definitely something we should do.

Problem is: This needs some work in the snap rest API first. As far as I can see the rest API currently only returns the un-translated English message. If it could return the running snap names with their process ID's in a JSON format, this should be possible to implement

The errors returned by the snapd API could definitely be improved. In principle we could get the list of PIDs by parsing the error message, but that seems quite unclean.

@anasereijo
Copy link
Collaborator

Thank you all for the proposals and for flagging this issue. We will be looking at the App Center again next cycle (starting from mid May), and we will be looking into this. Cheers

d-loose added a commit that referenced this issue May 14, 2024
fix(snap): Let snap-store snap refresh while the app is running Fixes #1643
d-loose added a commit to d-loose/app-center that referenced this issue May 24, 2024
According to the snapcraft.yaml reference:

> apps.<app-name>.refresh-mode
> Controls whether the daemon should be restarted during a snap refresh.
> Type: string
> Requires daemon to be set in app metadata. Can be one of the following:
> endure, restart, or ignore-running (defaults to restart)

So it seems like we can't use this for a desktop app.
In the meantime we've already merged ubuntu#1663 as a fix for ubuntu#1643.

This reverts commit 80e3689.
@ricmarques
Copy link

To help this issue / bug page to be more easily found in web searches: the problem - demonstrated by the video that @gojo-limitless (Ankush Das) has included, when he opened this bug / issue report - happens when the user clicks on the "Update all" button in the "Manage" page / tab of the Ubuntu "App Center" - for instance, in Ubuntu MATE 24.04 LTS ("Noble Numbat") - and then a dialog box appears with the following error message:

Unknown Snapd Exception

cannot refresh "snap-store": snap "snap-store" has running apps (snap-store), pids: 4183

@houdini68
Copy link

houdini68 commented Oct 22, 2024

On Ubuntu 24.10

sudo killall snap-store && sudo snap refresh snap-store
[sudo] password for rudy: 
snap-store (2/stable) 0+git.4fcd62b7 from Canonical✓ refreshed

BTW the new version enforces the dark mode (it didn't before) and is redesigned in v24.10.
It didn't update automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants