Updating Password App causing error - Nextcloud stuck in maintenance mode

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 18.0.2): 20.0.4
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04 - Docker (linuxserver.io image)
Apache or nginx version (eg, Apache 2.4.25): nginx
PHP version (eg, 7.1): v7.3.25

The issue you are facing:

While browsing the apps, I noticed password need to be updated. I clicked the button and Nextcloud fell into maintenance mode and would not recover. Within the term I manually ran the update comand and got the below error.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Update password app

Terminal occ upgrade output:

root@ea189a7f9b47:/config/www/nextcloud# sudo occ upgrade
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
Setting log level to debug
Updating database schema
Updated database
Updating <passwords> ...
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('20.0.4.0', '20.0.4.0')
#13 /config/www/nextcloud/core/Command/Upgrade.php(255): OC\Updater->upgrade()
#14 /config/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Upgrade->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /config/www/nextcloud/3rdparty/symfony/console/Application.php(1000): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /config/www/nextcloud/3rdparty/symfony/console/Application.php(271): 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/3rdparty/symfony/console/Application.php(147): 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...')
#21 {main}root@ea189a7f9b47:/config/www/nextcloud#
2 Likes

I got the same here.
also using the linuxserver.io image on unraid

root@3407cea6e031:/# sudo occ upgrade
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
Setting log level to debug
Updating database schema
Updated database
Updating <passwords> ...
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('20.0.4.0', '20.0.4.0')
#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...')
#21 {main}root@3407cea6e031:/# ^C
root@3407cea6e031:/#

Due to the fact that you’ve already reported the problem here and also identified the root cause of the problem as an upstream one, I will close this thread too.

I’m getting stuck on the Passwords mod too. I can set MX mode to false but I get this:

Update to 20.0.1

An error occurred.
Detailed logs
Preparing update
Set log level to debug
Turned on maintenance mode
Repair step: Repair MySQL collation
Repair info: All tables already have the correct collation -> nothing to do
Repair step: Repair SQLite autoincrement
Repair step: Copy data from accounts table when migrating from ownCloud
Repair step: Drop account terms table when migrating from ownCloud
Updating database schema
Updated database
An error occurred.

Not sure why it’s talking about OwnCloud.
My site is hosted by SiteGround, who recently changed their script installer. Not sure if that’s the cause though. I might mean the command line stuff to fix it won’t be an option.

I’m thinking about going to Cloudama or getting a Pi server instead.