NC27->NC28: LDAP not working

During the 27.1.6 to 28.0.2 upgrade, the process failed because of the user_ldap app.

I disabled user_ldap app with occ and was able to proceed with the rest of the upgrade.

After that I get the below error message when trying to re-enable user_ldap .
Not sure what a boolean is returned there, my php knowledge is very limited so I am not sure what the query actually is (LDAP or MySQL?).

Any ideas?
Please do let me know if I am missing something or if more specific logs needs to be uploaded to help.
This is a staging instance of Nextcloud, production is untouched and working fine on 27.1.6.

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via 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:


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


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, 20.0.5): 28.0.2
Operating system and version (eg, Ubuntu 20.04): Debian 11.9
Apache or nginx version (eg, Apache 2.4.25): 2.4.56
PHP version (eg, 7.4): 8.2.15

The issue you are facing:

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

Steps to replicate it:

  1. Upgraded from 27.1.6 to 28.0.2
  2. Upgrade failed because of LDAP (see error below)
  3. Disabled LDAP
  4. Ran occ upgrade manually successfully
  5. Running occ app:enable user_ldap throws the error below

The output of your Nextcloud log in Admin > Logging:

An unhandled exception has been thrown:
TypeError: array_unique(): Argument #1 ($array) must be of type array, bool given in /var/www/html/nextcloud/apps/user_ldap/lib/Migration/Version1190Date20230706134108.php:102
Stack trace:
#0 /var/www/html/nextcloud/apps/user_ldap/lib/Migration/Version1190Date20230706134108.php(102): array_unique()
#1 /var/www/html/nextcloud/apps/user_ldap/lib/Migration/Version1190Date20230706134108.php(83): OCA\User_LDAP\Migration\Version1190Date20230706134108->copyGroupMembershipData()
#2 /var/www/html/nextcloud/lib/private/DB/MigrationService.php(527): OCA\User_LDAP\Migration\Version1190Date20230706134108->postSchemaChange()
#3 /var/www/html/nextcloud/lib/private/DB/MigrationService.php(402): OC\DB\MigrationService->executeStep()
#4 /var/www/html/nextcloud/lib/private/Installer.php(155): OC\DB\MigrationService->migrate()
#5 /var/www/html/nextcloud/core/Command/App/Enable.php(110): OC\Installer->installApp()
#6 /var/www/html/nextcloud/core/Command/App/Enable.php(80): OC\Core\Command\App\Enable->enableApp()
#7 /var/www/html/nextcloud/3rdparty/symfony/console/Command/Command.php(298): OC\Core\Command\App\Enable->execute()
#8 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run()
#9 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#10 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#11 /var/www/html/nextcloud/lib/private/Console/Application.php(206): Symfony\Component\Console\Application->run()
#12 /var/www/html/nextcloud/console.php(100): OC\Console\Application->run()
#13 /var/www/html/nextcloud/occ(11): require_once('...')
#14 {main}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'instanceid' => 'NOPE',
  'passwordsalt' => 'NOPE',
  'secret' => 'NOPE',
  'trusted_domains' =>
  array (
    0 => 'NOPE.NOPE.COM',
  'datadirectory' => '/NOPE',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => 'https://NOPE.NOPE.COM',
  'htaccess.RewriteBase' => '/',
  'dbname' => 'NOPE',
  'dbhost' => 'NOPE',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'NOPE',
  'dbpassword' => 'NOPE',
  'installed' => true,
  'auth.webauthn.enabled' => false,
  'ldapIgnoreNamingRules' => false,
  'maintenance' => false,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => 'true',
  'redis' =>
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
  'lost_password_link' => 'disabled',
  'mail_from_address' => 'NOPE',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'NOPE.COM',
  'mail_smtphost' => 'mail.NOPE.COM',
  'mail_smtpport' => '587',
  'twofactor_enforced' => 'true',
  'twofactor_enforced_groups' =>
  array (
    0 => 'everyone',
  'twofactor_enforced_excluded_groups' =>
  array (
  'theme' => '',
  'loglevel' => 0,
  'enabledPreviewProviders' =>
  array (
    0 => 'OC\\Preview\\Image',
    1 => 'OC\\Preview\\Movie',
    2 => 'OC\\Preview\\TXT',
  'default_phone_region' => 'SOMEWHERE',
  '' => 'stable',
  'app_install_overwrite' =>
  array (
    0 => 'twofactor_admin',
    1 => 'workflow_pdf_converter',
    2 => 'files_trackdownloads',
    3 => 'extract',
    4 => 'impersonate',
  'mysql.utf8mb4' => true,
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'NOPE',
  'mail_smtppassword' => 'NOPE',
  'mail_smtpsecure' => 'tls',
  'updater.secret' => 'NOPE',

The output of your Apache/nginx/system log in /var/log/____:

# Nothing worth pasting here, all standard


# Seems unrelatd, but getting a lot of this:
[user_saml] Debug: /appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead.
	GET /apps/logreader/api/poll?lastReqId=SOMEID
	from IP.IP.IP.IP by SOMEADMIN at Feb 13, 2024, 11:56:50 AM

I wanted to suggest to open a bug report but you have already done it:

Let’s follow the discussion there.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.