Update from NC 29 RC to final version: unhandled exception

I update via a cli script which my webhoster uberspace provides–always worked without fail before. Update didn’t run through this time, the frontend throws a 500 error. Running PHP 8.1

CLI output:

Error: Failed opening required '/var/www/virtual/XXX/html/apps/mail/composer/../vendor/autoload.php' (include_path='/var/www/virtual/XXX/html/3rdparty/pear/archive_tar:/var/www/virtual/XXX/html/3rdparty/pear/console_getopt:/var/www/virtual/XXX/html/3rdparty/pear/pear-core-minimal/src:/var/www/virtual/XXX/html/3rdparty/pear/pear_exception:/var/www/virtual/XXX/html/apps') in /var/www/virtual/XXX/html/apps/mail/composer/autoload.php:5
Stack trace:
#0 /var/www/virtual/XXX/html/lib/private/legacy/OC_App.php(161): require_once()
#1 /var/www/virtual/XXX/html/lib/private/AppFramework/Bootstrap/Coordinator.php(119): OC_App::registerAutoloading('mail', '/var/www/virtua...')
#2 /var/www/virtual/XXX/html/lib/private/AppFramework/Bootstrap/Coordinator.php(90): OC\AppFramework\Bootstrap\Coordinator->registerApps(Array)
#3 /var/www/virtual/XXX/html/lib/base.php(706): OC\AppFramework\Bootstrap\Coordinator->runInitialRegistration()
#4 /var/www/virtual/XXX/html/lib/base.php(1181): OC::init()
#5 /var/www/virtual/XXX/html/console.php(48): require_once('/var/www/virtua...')
#6 /var/www/virtual/XXX/html/occ(11): require_once('/var/www/virtua...')

Can you share more details about this custom script of there’s?

Was that the output during the update attempt? Or just what now is appearing after it already failed?

Does their script offer any logging of what it did?

Any idea why they have you use this script rather than use one of the official processes?

1 Like

I’d been having problems updating from the web UI for a while and the provided script was useful when I didn’t know about the occ command. So I kept using the script.

It is viewable at Nextcloud — UberLab 7 documentation, further down on the page.

The output is from running the script plus when I use occ to update or try to repair.

Thanks for replying.

The script doesn’t seem to do any magic, it executes the updater.phar, and after the update it does some database optimisations and restarts the notify push service…

#!/usr/bin/env bash
## Updater automatically works in maintenance:mode.
## Use the Uberspace backup system for files and database if you need to roll back.
## The Nextcloud updater creates backups only to safe base and app code data and config files
## so it takes ressources you might need for your productive data.
## Deactivate NC-updater Backups with --no-backup
php ~/html/updater/updater.phar -vv --no-backup --no-interaction

## database optimisations
php ~/html/occ db:add-missing-primary-keys --no-interaction
php ~/html/occ db:add-missing-columns --no-interaction
php ~/html/occ db:add-missing-indices --no-interaction
php ~/html/occ db:convert-filecache-bigint --no-interaction

php ~/html/occ app:update --all
## App updates may require additional steps to be done by the `upgrade` command
php ~/html/occ upgrade
/usr/sbin/restorecon -R ~/html

## FYI: If that file exist...
if test -f ~/etc/services.d/notify_push.ini
then supervisorctl restart notify_push
fi

However the php ~/html/occ app:update --all and php ~/html/occ upgrade commands are probably not necessary, since updater.phar --no-interaction already does that if I’m not mistaken, but they shouldn’t hurt either.

@thp
I’m not sure what exactly is causing the error message, but it seems to be related to the Mail app. You could try disabling the app, run the update again, and then re-enable it if the update has successfully completed.

2 Likes

I can’t run any occ command successfully, so disabling an app doesn’t work as I’ve found out right now. :thinking:

Same output as before.

Try renaming the apps/mail folder to something like apps/mail.disabled.

2 Likes

That did the trick, I could successfully update to NC 29.0.0., thanks!

2 Likes