Resolve failed automatic update in Nextcloud snap
Resolve failed automatic update issues in Nextcloud snap
Resolve integrity check failure
Nextcloud snap FAQ’s
1. Check your logs to discover the cause of the update failure
- How to manage Nextcloud snap logs
- How to run the debugging script
- How to discover and disable incompatible third party apps
2. Revert to last known good revision
Snaps were designed to have a robust upgrade story. In the case of the Nextcloud snap, every time it refreshes (updates), it takes a snapshot of the database and other version-specific things (not the raw data though, e.g. pictures and documents) and holds them alongside the old revision of the snap.
sudo snap revert nextcloud
With that command, you should be back up and running right at the moment before the update happened.
see How to revert Nextcloud snap after failed update
Backup your running snap now!
This would be the perfect opportunity to create a complete Nextcloud snap backup including configuration, apps, certificates, database and data.
- stop Nextcloud snap
sudo snap stop nextcloud
- save Nextcloud snap
sudo snap save nextcloud
- start Nextcloud snap
sudo snap start nextcloud
- copy/move snapshot (*.zip) in
/var/lib/snapd/snapshots
to wherever
3. Resolve auto-update issues
A prevalent cause of auto-update issues is attributed to incompatible third party apps due to snap confinement. Any apps requiring access to executable binaries will cause auto-updates to fail since these are not included in the snap. Disabling the misbehaving apps usually resolves the auto-update issue. Sometimes apps can be re-installed or re-enabled after successful manual refresh (update)… but may recur during the next auto-update.
If your Nextcloud interface is unavailable or in Maintenance mode, you can disable apps using the management console or command line:
- List apps:
sudo nextcloud.occ app:list
- Disable app:
sudo nextcloud.occ app:disable <appname>
- Remove app:
sudo nextcloud.occ app:remove <appname>
- Remove app:
4. Manually update = refresh Nextcloud snap
sudo snap refresh nextcloud
Resolve integrity check failure – “Integrity check failed… invalid files”
Some files have not passed the integrity check. Further information on how to resolve this issue can be found in the documentation
. (List of invalid files…)
If you get a message that the integrity check has failed due to invalid files, check your logs for the invalid files. There is usually a link in the integrity failure message with a list of invalid files causing integrity failure. Within that listing there is usually a reference to the directory from which you may deduce the app name (i.e “spreed”).
IMPORTANT!
Read the documentation
See the link to list of invalid files
Steps to resolve integrity check failure
1. Find the files causing the issue
Review your logs or by following the link list of invalid files in the message and discover which app (<appname>
) those files reference
2. Double check the app name in question:
sudo nextcloud.occ app:list
3. Remove the app causing the integrity check failure:
sudo nextcloud.occ app::remove <appname>
4. Reinstall the app:
sudo nextcloud.occ app:enable <appname>
5. Run the integrity check manually and see output:
sudo nextcloud.occ integrity:check-core
6. Run the integrity check on the app:
sudo nextcloud.occ integrity:check-app <appname>
7. Manually update = refresh Nextcloud snap
sudo snap refresh nextcloud
The message should disappear. You may want to truncate your logs.
see How to manage Nextcloud snap with snap
see How to manage automatic updates in Nextcloud snap