Error when updating to version 2021


I just wanted to update the app in my nextcloud 20 as it was suggested in the app-management. Well, it did not work. Nextcloud was sent in maintenance mode.

Disabling maintenance mode and redo the update in GUI returned:

## Aktualisierung auf 20.0.4
Es ist ein Fehler aufgetreten.
Detaillierte Protokollmeldungen
Update vorbereiten
Log-Level auf “debug” gesetzt
Reparaturschritt: Repair MySQL collation
Reparaturinformation: All tables already have the correct collation -> nothing to do
Reparaturschritt: Repair SQLite autoincrement
Reparaturschritt: Copy data from accounts table when migrating from ownCloud
Reparaturschritt: Drop account terms table when migrating from ownCloud
Das Datenbankschema wird aktualisiert -->Translation: Databasescheme updating
Datenbank aktualisiert --> Translation: Database updated
Es ist ein Fehler aufgetreten. --> Translation: Error occured
[Bitte die Seite neu laden.] --> Translation: Please reload site

–> sending site in maintenance mode again.

CLI upgrade returns following:

An unhandled exception has been thrown:
ParseError: syntax error, unexpected 'ConfigurationService' (T_STRING), expecting function 
(T_FUNCTION) or const (T_CONST) in /config/www/nextcloud/apps/passwords/lib/Migration/DatabaseObjectRepair.php:39
Stack trace:
#0 /config/www/nextcloud/lib/composer/composer/ClassLoader.php(322): Composer\Autoload\includeFile('/config/www/nex...')
#1 [internal function]: Composer\Autoload\ClassLoader->loadClass('OCA\\Passwords\\M...')
#2 [internal function]: spl_autoload_call('OCA\\Passwords\\M...')
#3 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(107): ReflectionClass->__construct('OCA\\Passwords\\M...')
#4 /config/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php(126): OC\AppFramework\Utility\SimpleContainer->resolve('OCA\\Passwords\\M...')
#5 /config/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php(455): OC\AppFramework\Utility\SimpleContainer->query('OCA\\Passwords\\M...')
#6 /config/www/nextcloud/lib/private/ServerContainer.php(140): OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback('OCA\\Passwords\\M...')
#7 /config/www/nextcloud/lib/private/Repair.php(124): OC\ServerContainer->query('OCA\\Passwords\\M...')
#8 /config/www/nextcloud/lib/private/legacy/OC_App.php(1035): OC\Repair->addStep('OCA\\Passwords\\M...')
#9 /config/www/nextcloud/lib/private/legacy/OC_App.php(979): OC_App::executeRepairSteps('passwords', Array)
#10 /config/www/nextcloud/lib/private/Updater.php(379): OC_App::updateApp('passwords')
#11 /config/www/nextcloud/lib/private/Updater.php(258): OC\Updater->doAppUpgrade()
#12 /config/www/nextcloud/lib/private/Updater.php(130): OC\Updater->doUpgrade('', '')
#13 /config/www/nextcloud/core/Command/Upgrade.php(255): OC\Updater->upgrade()
#14 /config/www/nextcloud/apps/mail/vendor/symfony/console/Command/Command.php(258): OC\Core\Command\Upgrade->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /config/www/nextcloud/apps/mail/vendor/symfony/console/Application.php(920): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /config/www/nextcloud/apps/mail/vendor/symfony/console/Application.php(266): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\Upgrade), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /config/www/nextcloud/apps/mail/vendor/symfony/console/Application.php(142): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /config/www/nextcloud/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /config/www/nextcloud/console.php(100): OC\Console\Application->run()
#20 /config/www/nextcloud/occ(11): require_once('/config/www/nex...')

I can get everything out of my backups. But I rather not do that unless I have to. Anyone has an idea?

Thank you!

See to downgrade the app.

1 Like

Thanks a lot!!!

With 2021.6.10 there is now a special build for systems using PHP 7.3. This build has the same features as the regular version (2021.6.20) but was automatically converted to work with PHP 7.2 using rectorphp.

So i’m confident that this solution will be able to provide updates for PHP 7.3 based systems until NC themselves stops supporting it.

Doesn’t Ubuntu Server 20.04 ship with PHP7.4 out of the box? If not or if you are using an older version of Ubuntu, you could use the following PPA…

Ondřej Surý ist also a maintainer of PHP in the official Debian Apt repositories. I’m using his repos for years and never had any problems…

Well, as the developer of the passwords app, i would be happy if everyone updated to a recent version of PHP.
But while the latest version of Ubuntu comes with PHP 7.4, the stable version of Debian only has PHP 7.3. An while i recommend using one of the PPA from Ondřej Surý, some users don’t want to because it’s not official, and others just cant because they depend on their hoster or use a solution like NextcloudPI.

So far those users could only use version 2020.12.* of the passwords app which supports PHP 7.2-7.4, but only NC 20.
The special build i mentioned above gives users the the possibility to use the latest version of the app without having to upgrade their server.
And I can use modern PHP features while also not deviating from the Nextcloud PHP minimum requirements.

Ah I didn’t realise, that you are the developer of the app. My answer should have gone to @akrea, who is using Ubuntu 20.04. At least it looks that way, according to the initial post.

Yep. But Ondřej Surý is one of the maintainers of the official Debian packages. Therefore I have no concerns there. And with the upcoming release of Debian Bullseye the problem should be solved, at least for the time being… :wink:

Yeah hosting providers and / or appliances are a diffrent story of course. Up to a certain point, you are always dependent on whether the hoster or the maintainers of the appliance offer the depedencies that certain things may need.

Either way it’s of course a great service, that you still offer a special version of your app for users who either do not want to ugrade or cannot upgrade their PHP stack for some reason. :slight_smile: