In Nextcloud 19 with PHP 7.3.19, updating apps using occ (command line) results in the following “unhandled exception.” It seems to leave the apps in a state that keeps them from appearing in the occ app:listlisting as well as in Your Apps on the admin console. Since it happens with multiple apps, the cause is most likely not in the apps – today it happened with Notes and Appointments.
I work around this by manually removing the app directory in apps/ and installing the app anew using occ app:installwhich succeeds.
What causes this?
An unhandled exception has been thrown:
TypeError: Argument 2 passed to OC_App::executeRepairSteps() must be of the type array, null given, called in /path/to/nextcloud/lib/private/legacy/OC_App.php on line 904 and defined in /path/to/nextcloud/lib/private/legacy/OC_App.php:956
Stack trace:
#0 /path/to/nextcloud/lib/private/legacy/OC_App.php(904): OC_App::executeRepairSteps('tasks', NULL)
#1 /path/to/nextcloud/lib/private/Installer.php(205): OC_App::updateApp('tasks')
#2 /path/to/nextcloud/core/Command/App/Update.php(109): OC\Installer->updateAppstoreApp('tasks')
#3 /path/to/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\App\Update->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /path/to/nextcloud/3rdparty/symfony/console/Application.php(1012): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /path/to/nextcloud/3rdparty/symfony/console/Application.php(272): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\App\Update), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /path/to/nextcloud/3rdparty/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /path/to/nextcloud/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /path/to/nextcloud/console.php(100): OC\Console\Application->run()
#9 /path/to/nextcloud/occ(11): require_once('/path/to/nextcloud...')
#10 {main}
This is still happening with Netscape 22.0.0 and PHP 7.3.29. The error occurs when updating most apps using occ app:update. Here’s the output from occ app:update contacts today:
contacts new version available: 4.0.1
An unhandled exception has been thrown:
TypeError: Argument 3 passed to OC_App::checkAppDependencies() must be of the type array, null given, called in /path/to/nextcloud/lib/private/legacy/OC_App.php on line 989 and defined in /path/to/nextcloud/lib/private/legacy/OC_App.php:1185
Stack trace:
#0 /path/to/nextcloud/lib/private/legacy/OC_App.php(989): OC_App::checkAppDependencies(Object(OC\AllConfig), Object(OC\L10N\LazyL10N), NULL, false)
#1 /path/to/nextcloud/lib/private/Installer.php(202): OC_App::updateApp('contacts')
#2 /path/to/nextcloud/core/Command/App/Update.php(115): OC\Installer->updateAppstoreApp('contacts', false)
#3 /path/to/nextcloud/apps/bookmarks/vendor/symfony/console/Command/Command.php(255): OC\Core\Command\App\Update->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /path/to/nextcloud/apps/bookmarks/vendor/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /path/to/nextcloud/apps/bookmarks/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\App\Update), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /path/to/nextcloud/apps/bookmarks/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /path/to/nextcloud/lib/private/Console/Application.php(209): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /path/to/nextcloud/console.php(99): OC\Console\Application->run()
#9 /path/to/nextcloud/occ(11): require_once('/path/to/nextcloud...')
#10 {main}
Mine appeared to be the mail app. Followed issue #28293 from the Github link you posted and I started disabling apps. Disabled mail and was able to fix this with the following commands
OMG it worked perfectly. I updated NC to 25.0.1 without any problems after deleting
‘app_install_overwrite’ => ‘’,
from my config.php file in /var/www/html/nextcloud/config.
Thank you good Sir!
But i am interested where you have seen where my problem was, because i don’t…
Well the error complains about the second parameter in the line you showed, which is $ignoreMaxApps. If you look above in the line before you can see this variable is directly taken from configuration.
Do you know how this line ended up in your configuration? Was it from an older Nextcloud version? Maybe we need to fix the code to better react to this.
Thank you for your detailed description!
As i can remember i installed NC directly via apt-get manually circa 6 month ago.
I changed just a little in the config file, therefore it was in it since installation.