YunoHost-Apps / nextcloud_ynh

Nextcloud package for YunoHost
https://nextcloud.com/
GNU Affero General Public License v3.0
147 stars 63 forks source link

[Solved] Update to 28.0.1 not possible => OCC issue (webadmin + CLI) #649

Closed ultrajej closed 8 months ago

ultrajej commented 8 months ago

Update to 28.0.1 not possible => OCC issue (webadmin + CLI)

Action: Update Nextcloud (nextcloud) from 27.1.4_ynh1 to 28.0.1_ynh1

I am trying to update the version of NextCloud on my machine but it fail update this app in any way... (webadmin + CLI)

After failing to install, it can restore the version 27 without issue...

Context

  1. Go to Update system

[Mettre à jour le système](https://192.168.0.101/yunohost/admin/#/update))

  1. Click on either update all apps or update Nextcloud only

    Expected behavior

Nextcloud should be updated to the version 28.0.1

Logs

...
Info : DEBUG - #15 /var/www/nextcloud/occ(11): require_once('...')
Info : DEBUG - #16 {main}+ '[' 1 -eq 3 ']'
Info : DEBUG - + ynh_die '--message=Unable to upgrade Nextcloud'
Info : WARNING -     2/0 [----->----------------------]   0%Unable to upgrade Nextcloud
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 nextcloud...
...

My comments

require_once is empty:

require_once('...') A similar case can be found here: https://help.nextcloud.com/t/solved-php-fatal-error-occ-files-scan/132038 Could it be a issue with my PHP version?

On other cases at the same stage require_once is not empty. It is more related to privilege issues


Full log available at: https://paste.yunohost.org/raw/ifixokaxej


Solution / Fix

One of my Nextcloud apps was not compatible with Nexcloud 28.0.1: Keeweb I uninstalled keeweb and was able to update to Nexcloud 28.0.1 without other issue

orhtej2 commented 8 months ago

Relevant snippet:

2024-01-15 11:14:21,853: DEBUG - An unhandled exception has been thrown:
2024-01-15 11:14:21,857: DEBUG - Error: Undefined constant OCA\Keeweb\Migration\RegisterMimeType::CUSTOM_MIMETYPEALIASES in /var/www/nextcloud/apps/keeweb/lib/Migration/RegisterMimeType.php:25
2024-01-15 11:14:21,858: DEBUG - Stack trace:
2024-01-15 11:14:21,858: DEBUG - #0 /var/www/nextcloud/apps/keeweb/lib/Migration/RegisterMimeType.php(41): OCA\Keeweb\Migration\RegisterMimeType->registerForNewFiles()
2024-01-15 11:14:21,858: DEBUG - #1 /var/www/nextcloud/lib/private/Repair.php(127): OCA\Keeweb\Migration\RegisterMimeType->run()
2024-01-15 11:14:21,858: DEBUG - #2 /var/www/nextcloud/lib/private/legacy/OC_App.php(836): OC\Repair->run()
2024-01-15 11:14:21,858: DEBUG - #3 /var/www/nextcloud/lib/private/Installer.php(166): OC_App::executeRepairSteps()
2024-01-15 11:14:21,858: DEBUG - #4 /var/www/nextcloud/lib/private/legacy/OC_App.php(264): OC\Installer->installApp()
2024-01-15 11:14:21,858: DEBUG - #5 /var/www/nextcloud/lib/private/Updater.php(431): OC_App->enable()
2024-01-15 11:14:21,858: DEBUG - #6 /var/www/nextcloud/lib/private/Updater.php(284): OC\Updater->upgradeAppStoreApps()
2024-01-15 11:14:21,858: DEBUG - #7 /var/www/nextcloud/lib/private/Updater.php(140): OC\Updater->doUpgrade()
2024-01-15 11:14:21,858: DEBUG - #8 /var/www/nextcloud/core/Command/Upgrade.php(222): OC\Updater->upgrade()
2024-01-15 11:14:21,858: DEBUG - #9 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(298): OC\Core\Command\Upgrade->execute()
2024-01-15 11:14:21,859: DEBUG - #10 /var/www/nextcloud/3rdparty/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run()
2024-01-15 11:14:21,861: DEBUG - #11 /var/www/nextcloud/3rdparty/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
2024-01-15 11:14:21,861: DEBUG - #12 /var/www/nextcloud/3rdparty/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
2024-01-15 11:14:21,869: DEBUG - #13 /var/www/nextcloud/lib/private/Console/Application.php(206): Symfony\Component\Console\Application->run()
2024-01-15 11:14:21,870: DEBUG - #14 /var/www/nextcloud/console.php(100): OC\Console\Application->run()
orhtej2 commented 8 months ago

It's keeweb that's failing the upgrade, can you uninstall this app, upgrade then reinstall it?

ultrajej commented 8 months ago

Solved... see "Solution / Fix" above