Update nextcloud impossible :

What type of hardware are you using: Old laptop or computer
What YunoHost version are you running: 12.0.11 (stable)
What app is this about: Nextcloud 29.0.9~ynh1

Describe your issue

Bon, suite à mpas mal de déconvenuie (mais maintenant, je sais revenir en arrière) : je n’arrive toujours pas à mettre à jour nextcloud :

Je le fait en CLI

root@maison:/home/yunohost.app/nextcloud/data# yunohost tools upgrade apps
Info: Now upgrading nextcloud…
Info: Creating a safety backup prior to the upgrade
Info: Collecting files to be backed up for nextcloud…
Info: Declaring files to be backed up...
Info: /home/yunohost.app/nextcloud will not be saved, because 'BACKUP_CORE_ONLY' is set.
Info: Backing up the MySQL database...
Info: Backup script completed for nextcloud. (YunoHost will then actually copy those files to the archive).
Info: Creating a backup archive from the collected files…
Info: The archive will contain about 1.4GB of data.
Success! Backup created: nextcloud-pre-upgrade2
Success! Backup deleted: nextcloud-pre-upgrade1
Info: Updating sources...
Info: Updating system_user...
Info: Updating install_dir...
Info: Updating data_dir...
Info: Updating permissions...
Warning: This permission is currently granted to all users in addition to other groups. You probably want to either remove the 'all_users' permission or remove the other groups it is currently granted to.
Info: Updating apt...
Info: Updating database...
Info: [+++.................] > Ensuring downward compatibility...
Info: [###+++..............] > Upgrading nextcloud...
Info: Upgrading to Nextcloud 30.0.4
Info: [######++++..........] > Reconfiguring nextcloud...
Warning: File /var/www/nextcloud/config/config.php has been manually modified since the installation or last upgrade. So it has been duplicated in /var/cache/yunohost/appconfbackup//var/www/nextcloud/config/config.php.backup.20250127.092418
Error: Could not upgrade nextcloud: An error occurred inside the app upgrade script
Info: The operation 'Upgrade the 'nextcloud' app' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20250127-081805-app_upgrade-nextcloud' to get help
Warning: Here's an extract of the logs before the crash. It might help debugging the error:
Info: DEBUG - ++ sed -E 's@\s*([0-9]+\/[0-9]+\s+\[(-|>|=)+\]\s+[0-9]+%|\s*Starting ...|Nextcloud or one of the apps require upgrade - only a limited number of commands are available|You may use your browser or the occ upgrade command to do the upgrade)@@g'
Info: DEBUG - duplicatefinder new version available: 1.6.0
Info: DEBUG - duplicatefinder updated
Info: DEBUG - files_texteditor new version available: 2.15.1
Info: DEBUG - Error: App "Plain text editor" cannot be installed because the following dependencies are not fulfilled: Server version 27 or lower is required.
Info: DEBUG - files_texteditor couldn't be updated
Info: DEBUG - contacts new version available: 6.1.3
Info: DEBUG - contacts updated
Info: DEBUG - notes new version available: 4.11.0
Info: DEBUG - notes updated
Info: DEBUG - calendar new version available: 5.0.9
Info: DEBUG - calendar updated
Info: DEBUG - bookmarks new version available: 15.0.5
Info: DEBUG - bookmarks updated
Info: DEBUG - tasks new version available: 0.16.1
Info: DEBUG - tasks updated
Info: DEBUG - user_external new version available: 3.4.0
Info: DEBUG - Error: App "External user authentication" cannot be installed because the following dependencies are not fulfilled: Server version 29 or lower is required.
Info: DEBUG - user_external couldn't be updated
Info: DEBUG - + ynh_exit_properly
Warning: Upgrade failed ... attempting to restore the safety backup (Yunohost first need to remove the app for this) ...
Info: Removing nextcloud…
Info: [++++++++++..........] > Removing system configurations related to nextcloud...
Info: '/etc/php/8.3/fpm/pool.d/nextcloud.conf' wasn't deleted because it doesn't exist.
Info: [####################] > Removal of nextcloud completed
Info: Deprovisioning database...
Info: Deprovisioning apt...
Warning: ./deprovision_apt: line 5: ynh_apt_remove_dependencies: command not found
Error: deprovision failed for apt : An error occured inside the script snippet
Info: The operation 'Remove the 'nextcloud' app' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20250127-082532-app_remove-nextcloud' to get help
Warning: Here's an extract of the logs before the crash. It might help debugging the error:
Info: DEBUG - + database=
Info: DEBUG - + '[' -n '' ']'
Info: DEBUG - + mysql -B ''
Info: DEBUG - + ynh_exit_properly
Info: DEBUG - + [[ deprovision_database =~ ^install$|^upgrade$|^restore$ ]]
Info: INFO - Deprovisioning apt...
Info: DEBUG - Executing command '['sh', '-c', '/bin/bash -x "./deprovision_apt"  7>&1']'
Info: DEBUG - + source /usr/share/yunohost/helpers
Info: DEBUG - ++++ dirname -- /usr/share/yunohost/helpers
Info: DEBUG - +++ cd -- /usr/share/yunohost
Info: DEBUG - +++ pwd
Info: DEBUG - ++ SCRIPT_DIR=/usr/share/yunohost
Info: DEBUG - ++ YNH_HELPERS_VERSION=2
Info: DEBUG - ++ readonly 'XTRACE_ENABLE=set -o xtrace'
Info: DEBUG - ++ XTRACE_ENABLE='set -o xtrace'
Info: DEBUG - + ynh_abort_if_errors
Info: DEBUG - + trap ynh_exit_properly EXIT
Info: DEBUG - + ynh_apt_remove_dependencies
Info: WARNING - ./deprovision_apt: line 5: ynh_apt_remove_dependencies: command not found
Info: DEBUG - + ynh_exit_properly
Warning: Failed to deprovision apt : The operation 'Remove the 'nextcloud' app' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20250127-082532-app_remove-nextcloud' to get help
Info: Deprovisioning permissions...
Info: Deprovisioning data_dir...
Info: Deprovisioning install_dir...
Info: Deprovisioning system_user...
Info: Deprovisioning sources...
Error: The operation 'Remove the 'nextcloud' app' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20250127-082532-app_remove-nextcloud' to get help
Success! nextcloud uninstalled
Info: Preparing archive for restoration…
Info: Restoring nextcloud…
Info: Provisioning sources...
Info: Provisioning system_user...
Info: Provisioning install_dir...
Info: Provisioning data_dir...
Info: Provisioning permissions...
Warning: This permission is currently granted to all users in addition to other groups. You probably want to either remove the 'all_users' permission or remove the other groups it is currently granted to.
Info: Provisioning apt...
Info: Provisioning database...
Info: [....................] > Restoring the app main directory...
Info: [++..................] > Restoring the MySQL database...
Info: [##+++++++++++++.....] > Reconfiguring PHP-FPM...
Warning: grep: /etc/nginx/conf.d/maison.shnoulle.net.d/nextcloud.d: Is a directory
Info: [###############.....] > Restoring cron job...
Info: [###############.....] > Restoring the logrotate configuration...
Info: [###############+....] > Restoring data directory...
Info: [################+...] > Adding multimedia directories...
Info: [#################+..] > Restoring the Fail2Ban configuration...
Info: [##################+.] > Reloading NGINX web server...
Info: [####################] > Restoration completed for nextcloud
Success! Restoration completed
Warning: unable to upgrade apps: The operation 'Upgrade the 'nextcloud' app' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20250127-081805-app_upgrade-nextcloud' to get help
Error: Some apps could not be upgraded

Mon fichier de cponfig.php (je ne sais plus ce que j’ai modifié par rapport à l’original)

$CONFIG = array (
  'instanceid' => '*****',
  'passwordsalt' => '*****',
  'secret' => '*****',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => 'maison.shnoulle.net',
  ),
  'datadirectory' => '/home/yunohost.app/nextcloud/data',
  'overwrite.cli.url' => 'https://maison.shnoulle.net/owncloud',
  'dbtype' => 'mysql',
  'version' => '29.0.9.2',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => '*****',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'maintenance' => false,
  'loglevel' => 2,
  'trashbin_retention_obligation' => 'auto',
  'theme' => '',
  'updatechecker' => false,
  'integrity.check.disabled' => true,
  'logout_url' => 'https://maison.shnoulle.net
/yunohost/sso/?action=logout&r=*****',
  'htaccess.RewriteBase' => '/owncloud',
  'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
  'ldapIgnoreNamingRules' => false,
  'filelocking.enabled' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => '6379',
    'timeout' => '0.0',
    'password' => '',
  ),
  'hashing_default_password' => true,
  'localstorage.allowsymlinks' => true,
  'simpleSignUpLink.shown' => false,
  'mysql.utf8mb4' => true,
  'app_install_overwrite' => 
  array (
    0 => 'contacts',
  ),
  'mail_from_address' => 'nextcloud',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'maison.shnoulle.net',
  'mail_smtphost' => 'localhost',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'nextcloud',
  'mail_smtppassword' => '*****',
  'mail_smtpport' => '25',
  'mail_smtpstreamoptions' => 
  array (
    'ssl' => 
    array (
      'allow_self_signed' => true,
      'verify_peer' => false,
      'verify_peer_name' => false,
    ),
  ),
  'logfile' => '/var/log/nextcloud/nextcloud.log',
  'maintenance_window_start' => 1,
  'trusted_proxies' => 
  array (
    0 => '127.0.0.1',
    1 => '::1',
  ),
  'data-fingerprint' => '*****',
);

Si quelqu’un à une idée ?

Share relevant logs or error messages

yunohost log share 20250127-081805-app_upgrade-nextcloud : https://paste.yunohost.org/raw/asovesakim
yunohost log share 20250127-082532-app_remove-nextcloud : https://paste.yunohost.org/raw/vabanuzabi

Au cas ou

root@maison:~# sudo -u nextcloud env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin php8.3 --define apc.enable_cli=1 /var/www/nextcloud/occ app:list
Enabled:
  - activity: 2.21.1
  - bruteforcesettings: 2.9.0
  - circles: 29.0.0-dev
  - cloud_federation_api: 1.12.0
  - comments: 1.19.0
  - dav: 1.30.1
  - federatedfilesharing: 1.19.0
  - files: 2.1.1
  - files_downloadlimit: 2.0.0
  - files_external: 1.21.0
  - files_pdfviewer: 2.10.0
  - files_reminders: 1.2.0
  - files_sharing: 1.21.0
  - files_trashbin: 1.19.0
  - files_versions: 1.22.0
  - firstrunwizard: 2.18.0
  - logreader: 2.14.0
  - lookup_server_connector: 1.17.0
  - notifications: 2.17.0
  - oauth2: 1.17.1
  - password_policy: 1.19.0
  - photos: 2.5.0
  - privacy: 1.13.0
  - provisioning_api: 1.19.0
  - recommendations: 2.1.0
  - related_resources: 1.4.0
  - serverinfo: 1.19.0
  - settings: 1.12.0
  - sharebymail: 1.19.0
  - systemtags: 1.19.0
  - text: 3.10.1
  - theming: 2.4.0
  - twofactor_backupcodes: 1.18.0
  - user_ldap: 1.20.0
  - viewer: 2.3.0
  - workflowengine: 2.11.0
Disabled:
  - accessibility: 1.10.0
  - admin_audit: 1.19.0
  - bookmarks: 11.0.3 (installed 11.0.3)
  - calendar: 3.5.0 (installed 3.5.0)
  - contacts: 4.2.2 (installed 4.2.2)
  - contactsinteraction: 1.10.0 (installed 1.10.0)
  - dashboard: 7.9.0 (installed 7.9.0)
  - duplicatefinder: 0.0.15 (installed 0.0.15)
  - encryption: 2.17.0
  - federation: 1.19.0 (installed 1.19.0)
  - files_rightclick: 1.6.0 (installed 1.6.0)
  - files_texteditor: 2.14.0 (installed 2.14.0)
  - files_videoplayer: 1.13.0
  - gallery: 18.4.0 (installed 18.4.0)
  - nextcloud_announcements: 1.18.0 (installed 1.18.0)
  - notes: 4.5.1 (installed 4.5.1)
  - support: 1.12.0 (installed 1.3.0)
  - survey_client: 1.17.0 (installed 1.8.0)
  - suspicious_login: 7.0.0
  - tasks: 0.14.4 (installed 0.14.4)
  - twofactor_totp: 11.0.0-dev
  - updatenotification: 1.19.1 (installed 1.1.1)
  - user_external: 3.0.0 (installed 3.0.0)
  - user_status: 1.9.0 (installed 1.0.1)
  - weather_status: 1.9.0 (installed 1.0.0)

Lié à

2025-01-27 09:25:29,819: DEBUG - user_external new version available: 3.4.0
2025-01-27 09:25:30,938: DEBUG - Error: App "External user authentication" cannot be installed because the following dependencies are not fulfilled: Server version 29 or lower is required.

Je la supprime, on verra

Au final : suppression de 2 applications non actives (bizarre que Nextcloud plante là-dessus)

Et enfin : la mise à jour est passée. Donc avant de faire la mise à jour : supprimer les applications non actives est une bonne idée !

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.