What app is this about, and its version: roundcube 1.6.14~ynh1
What YunoHost version are you running: YunoHost 12.1.39 (stable)
What type of hardware are you using: VPS bought online
Describe your issue
Une erreur pendant la mise à jour de Roundcube ‘mise à jour a échoué’.
Après plusieurs tentatives, faire une réinstallation au propre de Roundcube, faire aussi une mise à jour forcée.
J’ai fini par remarquer cette partie avec des liens et commandes (que je ne connaissais pas), ce qui m’a permis de résoudre le problème.
Info : DEBUG - + sudo -E -u roundcube php8.5 /var/www/roundcube/composer.phar install --no-dev -d /var/www/roundcube --no-interaction --no-ansi
Info : DEBUG - Composer could not detect the root package (roundcube/roundcubemail) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version
Info : DEBUG - Installing dependencies from lock file
Info : DEBUG - Verifying lock file contents can be installed on current platform.
Info : DEBUG - Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update roundcube`.
Info : DEBUG - - Required package "mlocati/ip-lib" is not present in the lock file.
Info : DEBUG - This usually happens when composer files are incorrectly merged or the composer.json file is manually edited.
Info : DEBUG - Read more about correctly resolving merge conflicts https://getcomposer.org/doc/articles/resolving-merge-conflicts.md
Info : DEBUG - and prefer using the "require" command over editing the composer.json file directly https://getcomposer.org/doc/03-cli.md#require-r
Solution trouvée :
Il faut renommer le fichier « composer.lock => composer.lock.bkp ».
Avant de commencer, faites une sauvegarde de Roundcube :
yunohost backup create --apps roundcube
Puis, faire une copie/sauvegarde du fichier « composer.lock » :
mv /var/www/roundcube/composer.lock /var/www/roundcube/composer.lock.bkp
Faire la mise à jour de Roundcube :
yunohost tools upgrade apps roundcube
Et si tout fonctionne, pensez à supprimer le fichier « composer.lock.bkp » :
rm /var/www/roundcube/composer.lock.bkp
Je partage, si ça peut aider.
Pour moi, cela a fonctionné.
Share relevant logs or error messages
yunohost app upgrade -F roundcube
Info : Mise à jour de roundcube…
Info : Creating a safety backup prior to the upgrade
Info : Collecte des fichiers devant être sauvegardés pour roundcube…
Info : Declaring files to be backed up...
Info : Backing up the MySQL database...
Info : Backup script completed for roundcube. (YunoHost will then actually copy those files to the archive).
Info : Création d'une archive de sauvegarde à partir des fichiers collectés…
Info : L'archive contiendra environ 46MB de données.
Succès ! Sauvegarde créée : roundcube-pre-upgrade2
Info : La sauvegarde roundcube-pre-upgrade1 a été supprimée car elle a été remplacée par une sauvegarde plus récente roundcube-pre-upgrade2
Info : Updating sources...
Info : Updating system_user...
Info : Updating install_dir...
Info : Updating permissions...
Info : Updating apt...
Info : Updating database...
Info : Updating composer...
Info : [++..................] > Ensuring downward compatibility...
Info : [##+++...............] > Upgrading source files...
Info : [#####++.............] > Upgrading system configurations related to roundcube...
Info : [#######+++..........] > Reconfiguring Roundcube...
Info : [##########++........] > Updating dependencies with Composer...
Erreur : Impossible de mettre à jour roundcube : Une erreur s'est produite durant l'exécution du script de mise à jour de l'application
Info : L'opération 'Mettre à jour l'application 'roundcube'' a échoué ! Pour obtenir de l'aide, merci de partager le journal de l'opération en utilisant la commande 'yunohost log share xxxxxxxx-xxxxxx-app_upgrade-roundcube'
Attention : Here's an extract of the logs before the crash. It might help debugging the error:
Info : DEBUG - ++ sed 's@__\([^.]*\)__@\L\1@g'
Info : DEBUG - + ynh_store_file_checksum /var/www/roundcube/config/config.inc.php
Info : INFO - [##########++........] > Updating dependencies with Composer...
Info : DEBUG - + cp /var/www/roundcube/composer.json-dist /var/www/roundcube/composer.json
Info : DEBUG - + chmod -R o-rwx /var/www/roundcube
Info : DEBUG - + chown -R roundcube:www-data /var/www/roundcube
Info : DEBUG - + ynh_composer_exec install --no-dev
Info : DEBUG - + local workdir=/var/www/roundcube
Info : DEBUG - + COMPOSER_HOME=/var/www/roundcube/.composer
Info : DEBUG - + COMPOSER_MEMORY_LIMIT=-1
Info : DEBUG - + sudo -E -u roundcube php8.5 /var/www/roundcube/composer.phar install --no-dev -d /var/www/roundcube --no-interaction --no-ansi
Info : DEBUG - Composer could not detect the root package (roundcube/roundcubemail) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version
Info : DEBUG - Installing dependencies from lock file
Info : DEBUG - Verifying lock file contents can be installed on current platform.
Info : DEBUG - Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update roundcube`.
Info : DEBUG - - Required package "mlocati/ip-lib" is not present in the lock file.
Info : DEBUG - This usually happens when composer files are incorrectly merged or the composer.json file is manually edited.
Info : DEBUG - Read more about correctly resolving merge conflicts https://getcomposer.org/doc/articles/resolving-merge-conflicts.md
Info : DEBUG - and prefer using the "require" command over editing the composer.json file directly https://getcomposer.org/doc/03-cli.md#require-r
Info : DEBUG - + ynh_exit_properly
Attention : Upgrade failed ... attempting to restore the safety backup (Yunohost first need to remove the app for this) ...
Info : Suppression de roundcube…
Info : [++++++++++..........] > Removing NGINX web server configuration...
Info : [####################] > Removal of roundcube completed
Info : Deprovisioning composer...
Info : Deprovisioning database...
Info : Deprovisioning apt...
Info : Deprovisioning permissions...
Info : Deprovisioning install_dir...
Info : Deprovisioning system_user...
Info : Deprovisioning sources...
Succès ! roundcube désinstallé
Info : Préparation de l'archive pour restauration…
Info : Restauration de roundcube…
Info : Provisioning sources...
Info : Provisioning system_user...
Info : Provisioning install_dir...
Info : Provisioning permissions...
Info : Provisioning apt...
Info : Provisioning database...
Info : Provisioning composer...
Info : [++++................] > Restoring roundcube main directory...
Info : [####++++............] > Restoring the MySQL database...
Info : [########++++........] > Restoring the PHP-FPM configuration...
Info : [############++++....] > Reloading NGINX web server and PHP-FPM...
Info : [####################] > Restoration completed for roundcube
Succès ! Restauration terminée
Erreur : L'opération 'Mettre à jour l'application 'roundcube'' a échoué ! Pour obtenir de l'aide, merci de partager le journal de l'opération en utilisant la commande 'yunohost log share xxxxxxxx-xxxxxx-app_upgrade-roundcube'