Can't install 'LDAP user and group backend'

Error

Exception: Too few arguments to function OCA\User_LDAP\Helper::__construct(), 1 passed in /opt/nextcloud/apps/user_ldap/appinfo/install.php on line 32 and exactly 2 expected in file '/opt/nextcloud/apps/user_ldap/lib/Helper.php' line 48

/opt/nextcloud/lib/private/AppFramework/App.php - line 172:

OC\AppFramework\Http\Dispatcher->dispatch()

/opt/nextcloud/lib/private/Route/Router.php - line 298:

OC\AppFramework\App::main()

/opt/nextcloud/lib/base.php - line 1023:

OC\Route\Router->match()

/opt/nextcloud/index.php - line 36:

OC::handleRequest()

Caused by ArgumentCountError: Too few arguments to function OCA\User_LDAP\Helper::__construct(), 1 passed in /opt/nextcloud/apps/user_ldap/appinfo/install.php on line 32 and exactly 2 expected
/opt/nextcloud/apps/user_ldap/appinfo/install.php - line 32:

OCA\User_LDAP\Helper->__construct()

/opt/nextcloud/lib/private/Installer.php - line 629:

include("/opt/nextcl ... p")

/opt/nextcloud/lib/private/Installer.php - line 163:

OC\Installer::includeAppScript()

/opt/nextcloud/apps/settings/lib/Controller/AppSettingsController.php - line 451:

OC\Installer->installApp()

/opt/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 225:

OCA\Settings\Controller\AppSettingsController->enableApps()

/opt/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 133:

OC\AppFramework\Http\Dispatcher->executeController()

/opt/nextcloud/lib/private/AppFramework/App.php - line 172:

OC\AppFramework\Http\Dispatcher->dispatch()

/opt/nextcloud/lib/private/Route/Router.php - line 298:

OC\AppFramework\App::main()

/opt/nextcloud/lib/base.php - line 1023:

OC\Route\Router->match()

/opt/nextcloud/index.php - line 36:

OC::handleRequest()

Nextcloud 24.0.0
PHP Version 8.1.2-1ubuntu2.14

The above file doesn’t exist in a proper installation of v24 (and it doesn’t look like it’s existed since <=v20). These days user_ldap is a shipped (default) app so it definitely “installs” just fine.

You’ll have to share more details about your environment, your installation method, how you typically upgrade, the output of occ config:list (or equivalent), and the output of occ app:list.

My best guess is you maybe did a manual update (and left old app files around) or maybe have overlapping apps_paths content.

Once that’s sorted you can also figure out how to update yourself to at least v26 in order to be on a supported version of Nextcloud. :slight_smile:

Updated to 24.0.12
error is gone.
pardon )

1 Like