NextCloud update from 32.0.7~ynh1 to 33.0.2~ynh1 fails due to repository signature issues

What app is this about, and its version: NextCloud 32.0.7~ynh1
What YunoHost version are you running: 12.1.39 (stable)
What type of hardware are you using: VPS bought online

Describe your issue

I tried to update NextCloud via the terminal but it failed, apparently due to repository signature problems in:

The full update log is attached.

I get the following errors when I try and run apt update:

Get:1 https://dl.yarnpkg.com/debian stable InRelease
Err:1 https://dl.yarnpkg.com/debian stable InRelease                                                                                                                                                   
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 62D54FD4003F6525
Hit:2 http://deb.debian.org/debian bookworm InRelease                                                                                                                                                  
Hit:3 http://apt.postgresql.org/pub/repos/apt bookworm-pgdg InRelease                                                                                                                                  
Hit:4 http://security.debian.org/debian-security bookworm-security InRelease                                                                
Hit:5 http://deb.debian.org/debian bookworm-updates InRelease                             
Get:7 https://packages.sury.org/php bookworm InRelease [6,133 B]    
Err:7 https://packages.sury.org/php bookworm InRelease
  The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key <deb@sury.org>
Hit:6 https://forge.yunohost.org/debian bookworm InRelease   
Fetched 16.5 kB in 3s (6,126 B/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://dl.yarnpkg.com/debian stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 62D54FD4003F6525
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://packages.sury.org/php bookworm InRelease: The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key <deb@sury.org>
W: Failed to fetch https://packages.sury.org/php/dists/bookworm/InRelease  The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key <deb@sury.org>
W: Failed to fetch https://dl.yarnpkg.com/debian/dists/stable/InRelease  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 62D54FD4003F6525
W: Some index files failed to download. They have been ignored, or old ones used instead.

Share relevant logs or error messages

https://paste.yunohost.org/raw/amedupeqiq

Hello,

May this topic could help you :

ppr

Thank you @ppr , that link provided a simple fix for the core issue.

I suspect that my previous failed update attempt created a new problem. The next update attempt failed because it couldn’t create a backup. Specifically it seemed to be trying to back up something that’s not there:

File or folder '/etc/php/8.3/fpm/pool.d/nextcloud.conf' to be backed up does not exist

Full Log Link: https://paste.yunohost.org/raw/abigiwaqar

I was able to work around this without uninstalling NextCloud by following this suggestion:

Now my update has completed successfully.