Error on Upgrading Nextcloud

Hi,

today i try to update my nextcloud-server from 21.0.4 to 21.0.7

Everything went fine expext the mail app. If i try to activate or update the mail app i get this error

An unhandled exception has been thrown:
Error: Class 'OCA\User_LDAP\LDAPProviderFactory' not found in /home/datengrab/www/wolke/lib/private/Server.php:1029

The server is a stand-alone server with no connection to an LDAP Server. Does anybody have a idea how to fix this?

Thanks

Hi,

do you have a trace of the error?

This might have been caught by https://github.com/nextcloud/server/pull/27732, but the fix was only backported to stable21.

Are you able to still trigger this bug anywhere? E.g. if you run occ on the CLI?

Patch is at https://github.com/nextcloud/server/pull/29997 / https://patch-diff.githubusercontent.com/raw/nextcloud/server/pull/29997.patch. If you can please try to reproduce the error one more time without the patch, then with.

Your instance must have run into this because you once had LDAP enabled but then disabled it and some remnant configuration wasn’t cleaned up.

Thanks for the patch. No its working.

Here are the trace before the patch:

sudo -u apache php occ app:enable mail
An unhandled exception has been thrown:
Error: Class 'OCA\User_LDAP\LDAPProviderFactory' not found in /foo/bar/wolke/lib/private/Server.php:1029
Stack trace:
#0 /foo/bar/wolke/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\Server->OC\{closure}(Object(OC\Server))
#1 /foo/bar/wolke/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(Pimple\Container))
#2 /foo/bar/wolke/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet('OCP\\LDAP\\ILDAPP...')
#3 /foo/bar/wolke/lib/private/ServerContainer.php(137): OC\AppFramework\Utility\SimpleContainer->query('OCP\\LDAP\\ILDAPP...', false)
#4 /foo/bar/wolke/lib/private/AppFramework/DependencyInjection/DIContainer.php(434): OC\ServerContainer->query('OCP\\LDAP\\ILDAPP...', true)
#5 /foo/bar/wolke/lib/private/AppFramework/Utility/SimpleContainer.php(87): OC\AppFramework\DependencyInjection\DIContainer->query('OCP\\LDAP\\ILDAPP...', true)
#6 [internal function]: OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(ReflectionParameter))
#7 /foo/bar/wolke/lib/private/AppFramework/Utility/SimpleContainer.php(101): array_map(Object(Closure), Array)
#8 /foo/bar/wolke/lib/private/AppFramework/Utility/SimpleContainer.php(109): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#9 /foo/bar/wolke/lib/private/AppFramework/Utility/SimpleContainer.php(126): OC\AppFramework\Utility\SimpleContainer->resolve('OCA\\Mail\\Servic...')
#10 /foo/bar/wolke/lib/private/AppFramework/DependencyInjection/DIContainer.php(459): OC\AppFramework\Utility\SimpleContainer->query('OCA\\Mail\\Servic...')
#11 /foo/bar/wolke/lib/private/AppFramework/DependencyInjection/DIContainer.php(431): OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback('OCA\\Mail\\Servic...')
#12 /foo/bar/wolke/lib/private/AppFramework/Utility/SimpleContainer.php(87): OC\AppFramework\DependencyInjection\DIContainer->query('OCA\\Mail\\Servic...', true)
#13 [internal function]: OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}(Object(ReflectionParameter))
#14 /foo/bar/wolke/lib/private/AppFramework/Utility/SimpleContainer.php(101): array_map(Object(Closure), Array)
#15 /foo/bar/wolke/lib/private/AppFramework/Utility/SimpleContainer.php(109): OC\AppFramework\Utility\SimpleContainer->buildClass(Object(ReflectionClass))
#16 /foo/bar/wolke/lib/private/AppFramework/Utility/SimpleContainer.php(126): OC\AppFramework\Utility\SimpleContainer->resolve('OCA\\Mail\\Migrat...')
#17 /foo/bar/wolke/lib/private/AppFramework/DependencyInjection/DIContainer.php(459): OC\AppFramework\Utility\SimpleContainer->query('OCA\\Mail\\Migrat...')
#18 /foo/bar/wolke/lib/private/ServerContainer.php(146): OC\AppFramework\DependencyInjection\DIContainer->queryNoFallback('OCA\\Mail\\Migrat...')
#19 /foo/bar/wolke/lib/private/Repair.php(131): OC\ServerContainer->query('OCA\\Mail\\Migrat...')
#20 /foo/bar/wolke/lib/private/legacy/OC_App.php(1066): OC\Repair->addStep('OCA\\Mail\\Migrat...')
#21 /foo/bar/wolke/lib/private/Installer.php(165): OC_App::executeRepairSteps('mail', Array)
#22 /foo/bar/wolke/core/Command/App/Enable.php(123): OC\Installer->installApp('mail', false)
#23 /foo/bar/wolke/core/Command/App/Enable.php(93): OC\Core\Command\App\Enable->enableApp('mail', Array, false, Object(Symfony\Component\Console\Output\ConsoleOutput))
#24 /foo/bar/wolke/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\App\Enable->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#25 /foo/bar/wolke/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#26 /foo/bar/wolke/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\App\Enable), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#27 /foo/bar/wolke/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#28 /foo/bar/wolke/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#29 /foo/bar/wolke/console.php(100): OC\Console\Application->run()
#30 /foo/bar/wolke/occ(11): require_once('/home/datengrab...')
1 Like

Thanks for the confirmation!