nextcloud-snap / nextcloud-snap

☁️📦 Nextcloud packaged as a snap
GNU General Public License v3.0
1.72k stars 221 forks source link

Impossible to refresh #2904

Open 3v1n0 opened 1 month ago

3v1n0 commented 1 month ago

Describe the bug

A clear and concise description of the bug.

When using snap refresh nextcloud I'm getting:

sudo snap refresh nextcloud
error: cannot perform the following tasks:
- Run pre-refresh hook of "nextcloud" snap if present (run hook "pre-refresh": nextcloud is a protected snap, you can't do anything with it)

Expected behavior

Snaps refreshes

Screenshots

If applicable, add screenshots to help explain your problem.

OS/snapd/snap version

What OS and version are you running? Please also include the output of the following commands:

$ snap list nextcloud
Name       Version      Rev    Tracking       Publisher   Notes
nextcloud  29.0.2snap1  42890  latest/stable  nextcloud✓  -

and:

  $ snap version
  snap    2.63+20.04ubuntu0.1
  snapd   2.63+20.04ubuntu0.1
  series  16
  ubuntu  20.04
  kernel  5.10.60-qnap
scubamuc commented 1 month ago

@3v1n0 thanks for your request

this is certainly not a nextcloud issue, it seems to be a snapd thing.

see also description on Snapcraft: https://snapcraft.io/docs/supported-snap-hooks

see refresh-control: https://forum.snapcraft.io/t/refresh-control/27213

sometimes changes may be taking place:

@kyrofa could you assist?

scubamuc commented 1 month ago

@3v1n0

ubuntu 20.04

although snapd is very robust your host is running unbuntu 20.04. while "never change a running system" generally applies, do consider upgrading your host -->22.04 --> 24.04

sometimes the upgrade path is too long, so you can migrate your snap. ALWAYS make a backup before upgrading 😎

3v1n0 commented 1 month ago

So, I was thinking the same, but since this happens only while processing the nextcloud snap, I thought it could be related.

No change is pending though:

ID    Status  Spawn                    Ready                    Summary
1787  Error   yesterday at 16:28 CEST  yesterday at 16:29 CEST  Auto-refresh snap "nextcloud"
1788  Done    yesterday at 20:14 CEST  yesterday at 20:14 CEST  Running service command
1789  Error   yesterday at 20:14 CEST  yesterday at 20:15 CEST  Refresh "nextcloud" snap
1790  Done    yesterday at 20:18 CEST  yesterday at 20:18 CEST  Remove refresh hold on "nextcloud"
1791  Error   yesterday at 20:19 CEST  yesterday at 20:19 CEST  Refresh "nextcloud" snap
1792  Error   yesterday at 21:53 CEST  yesterday at 21:54 CEST  Auto-refresh snap "nextcloud"
1793  Done    today at 00:00 CEST      today at 00:00 CEST      Running service command for snap "nextcloud"
1794  Done    today at 00:00 CEST      today at 00:00 CEST      Running service command for snap "nextcloud"
1795  Done    today at 00:00 CEST      today at 00:00 CEST      Running service command for snap "nextcloud"
1796  Done    today at 00:00 CEST      today at 00:00 CEST      Running service command for snap "nextcloud"
1797  Done    today at 00:00 CEST      today at 00:00 CEST      Running service command for snap "nextcloud"
1798  Error   today at 00:28 CEST      today at 00:29 CEST      Auto-refresh snap "nextcloud"
1799  Error   today at 08:28 CEST      today at 08:29 CEST      Auto-refresh snap "nextcloud"

And nextcloud isn't held either.

Also:

$ sudo snap run --shell nextcloud.occ 
root@ubuntu-fileserver:/home/ubuntu# snapctl refresh --pending 
pending: ready
channel: latest/stable
version: 29.0.7snap1
revision: 44391
base: false
restart: false
pachulo commented 1 month ago

I'm sorry, I'm totally clueless here.

Could you report this on https://forum.snapcraft.io/ @3v1n0 to see if they know what might be going on?

kyrofa commented 1 month ago

Sorry folks, I was on vacation for a bit there. This is a new message for me, too. I agree that this sounds snapd-related, so a forum post indeed sounds warranted.

sbe-arg commented 3 weeks ago

I had this problem.

Solved by restating the server post apt updates.

Likely related to the last snapd updates.