[NC 17.0.3] Could not autodetect the UUID attribute

Nextcloud version (eg, 12.0.2): 17.0.3.1
Operating system and version (eg, Ubuntu 17.04): CentOS 7
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.6
PHP version (eg, 7.1): 7.2.27

The issue you are facing:

I updated our NC installation from 17.0.2 to 17.0.3 and now our Logs are being flooded with the message Could not autodetect the UUID attribute and I have no idea why, because the checks in the LDAP setting are working fine and people can login and work perfectly fine as well.

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

The output of your Nextcloud log in Admin > Logging:

{"reqId":"XjwNfTbypvTqjFeKPeznbAAAABE","level":3,"time":"2020-02-06T12:58:38+00:00","remoteAddr":"xxx.xxx.xxx.xxx","user":"user.name","app":"user_ldap","method":"PROPFIND","url":"/remote.php/dav/files/user.name/","message":"Could not autodetect the UUID attribute","userAgent":"Mozilla/5.0 (Macintosh) mirall/2.6.2stable (build 20191224) (Nextcloud)","version":"17.0.3.1","id":"5e3c0d7f08b05"}
{"reqId":"XjwNfTbypvTqjFeKPeznbAAAABE","level":3,"time":"2020-02-06T12:58:38+00:00","remoteAddr":"xxx.xxx.xxx.xxx","user":"user.name","app":"user_ldap","method":"PROPFIND","url":"/remote.php/dav/files/user.name/","message":"Could not autodetect the UUID attribute","userAgent":"Mozilla/5.0 (Macintosh) mirall/2.6.2stable (build 20191224) (Nextcloud)","version":"17.0.3.1","id":"5e3c0d7f08b2b"}
{"reqId":"XjwNfTbypvTqjFeKPeznbAAAABE","level":3,"time":"2020-02-06T12:58:38+00:00","remoteAddr":"xxx.xxx.xxx.xxx","user":"user.name","app":"user_ldap","method":"PROPFIND","url":"/remote.php/dav/files/user.name/","message":"Could not autodetect the UUID attribute","userAgent":"Mozilla/5.0 (Macintosh) mirall/2.6.2stable (build 20191224) (Nextcloud)","version":"17.0.3.1","id":"5e3c0d7f08b46"}
{"reqId":"XjwNfTbypvTqjFeKPeznbAAAABE","level":3,"time":"2020-02-06T12:58:38+00:00","remoteAddr":"xxx.xxx.xxx.xxx","user":"user.name","app":"user_ldap","method":"PROPFIND","url":"/remote.php/dav/files/user.name/","message":"Could not autodetect the UUID attribute","userAgent":"Mozilla/5.0 (Macintosh) mirall/2.6.2stable (build 20191224) (Nextcloud)","version":"17.0.3.1","id":"5e3c0d7f08b5e"}
{"reqId":"XjwNfTbypvTqjFeKPeznbAAAABE","level":3,"time":"2020-02-06T12:58:38+00:00","remoteAddr":"xxx.xxx.xxx.xxx","user":"user.name","app":"user_ldap","method":"PROPFIND","url":"/remote.php/dav/files/user.name/","message":"Could not autodetect the UUID attribute","userAgent":"Mozilla/5.0 (Macintosh) mirall/2.6.2stable (build 20191224) (Nextcloud)","version":"17.0.3.1","id":"5e3c0d7f08b7b"}
{"reqId":"XjwNfTbypvTqjFeKPeznbAAAABE","level":3,"time":"2020-02-06T12:58:38+00:00","remoteAddr":"xxx.xxx.xxx.xxx","user":"user.name","app":"user_ldap","method":"PROPFIND","url":"/remote.php/dav/files/user.name/","message":"Could not autodetect the UUID attribute","userAgent":"Mozilla/5.0 (Macintosh) mirall/2.6.2stable (build 20191224) (Nextcloud)","version":"17.0.3.1","id":"5e3c0d7f08b93"}
{"reqId":"XjwNfTbypvTqjFeKPeznbAAAABE","level":3,"time":"2020-02-06T12:58:38+00:00","remoteAddr":"xxx.xxx.xxx.xxx","user":"user.name","app":"user_ldap","method":"PROPFIND","url":"/remote.php/dav/files/user.name/","message":"Could not autodetect the UUID attribute","userAgent":"Mozilla/5.0 (Macintosh) mirall/2.6.2stable (build 20191224) (Nextcloud)","version":"17.0.3.1","id":"5e3c0d7f08b93"}

Removed the sensitive data (remote address, and the username) - Judging by the useragent, it looks like the Nextcloud desktop client.

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

<?php
$CONFIG = array (
  'instanceid' => '***instance_id***',
  'passwordsalt' => '***salty***',
  'secret' => '***secret***',
  'trusted_domains' =>
  array (
    0 => '***domain1***',
    1 => '***domain2***',
    2 => '***domain3***',
  ),
  'trusted_proxies' =>
  array (
    0 => '***proxy1***',
    1 => '***proxy2***',
  ),
  'datadirectory' => '/mnt/nextcloud-data',
  'dbtype' => 'mysql',
  'version' => '17.0.3.1',
  'overwrite.cli.url' => 'https://nextcloud.url.com/',
  'proxy' => '***myproxy***',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => '***db_password***',
  'installed' => true,
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_from_address' => '***mail_setting***',
  'mail_domain' => '***mail_setting***',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => '***mail_setting***',
  'mail_smtpport' => '***mail_setting***',
  'mail_smtpname' => '***mail_setting***',
  'mail_smtppassword' => '***mail_setting***',
  'maintenance' => false,
  'log_rotate_size' => 10485760,
  'theme' => '',
  'loglevel' => 2,
  'lost_password_link' => 'disabled',
  'simpleSignUpLink.shown' => false,
  'updater.release.channel' => 'stable',
  'mysql.utf8mb4' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'updater.secret' => '***updater_secret***',
);

Output of occ ldap:show-config

+-------------------------------+------------------------------------------------------------+
| Configuration                 | s01                                                        |
+-------------------------------+------------------------------------------------------------+
| hasMemberOfFilterSupport      |                                                            |
| homeFolderNamingRule          |                                                            |
| lastJpegPhotoLookup           | 0                                                          |
| ldapAgentName                 | uid=diradmin,cn=users,dc=ldap,dc=do_name,dc=com                |
| ldapAgentPassword             | ***                                                        |
| ldapAttributesForGroupSearch  |                                                            |
| ldapAttributesForUserSearch   |                                                            |
| ldapBackupHost                | backupdlap.url.com                                         |
| ldapBackupPort                | ldapport                                                        |
| ldapBase                      | dc=ldap,dc=do_name,dc=com                                      |
| ldapBaseGroups                | cn=groups,dc=ldap,dc=do_name,dc=com                            |
| ldapBaseUsers                 | cn=users,dc=ldap,dc=do_name,dc=com                             |
| ldapCacheTTL                  | 600                                                        |
| ldapConfigurationActive       | 1                                                          |
| ldapDefaultPPolicyDN          |                                                            |
| ldapDynamicGroupMemberURL     |                                                            |
| ldapEmailAttribute            | mail                                                       |
| ldapExperiencedAdmin          | 1                                                          |
| ldapExpertUUIDGroupAttr       |                                                            |
| ldapExpertUUIDUserAttr        |                                                            |
| ldapExpertUsernameAttr        | uid                                                        |
| ldapExtStorageHomeAttribute   |                                                            |
| ldapGidNumber                 | gidNumber                                                  |
| ldapGroupDisplayName          | cn                                                         |
| ldapGroupFilter               | (&(|(objectclass=posixGroup))(|(cn=ldap_group)))         |
| ldapGroupFilterGroups         | ldap_group                                               |
| ldapGroupFilterMode           | 0                                                          |
| ldapGroupFilterObjectclass    | posixGroup                                                 |
| ldapGroupMemberAssocAttr      | memberUid                                                  |
| ldapHost                      | ldaphost.url.com                                         |
| ldapIgnoreNamingRules         |                                                            |
| ldapLoginFilter               | (&(|(objectclass=posixAccount))(|(uid=%uid)(|(uid=%uid)))) |
| ldapLoginFilterAttributes     | uid                                                        |
| ldapLoginFilterEmail          | 0                                                          |
| ldapLoginFilterMode           | 0                                                          |
| ldapLoginFilterUsername       | 1                                                          |
| ldapNestedGroups              | 0                                                          |
| ldapOverrideMainServer        |                                                            |
| ldapPagingSize                | 500                                                        |
| ldapPort                      | 389                                                        |
| ldapQuotaAttribute            |                                                            |
| ldapQuotaDefault              |                                                            |
| ldapTLS                       | 0                                                          |
| ldapUserAvatarRule            | default                                                    |
| ldapUserDisplayName           | cn                                                         |
| ldapUserDisplayName2          |                                                            |
| ldapUserFilter                | (|(objectclass=posixAccount))                              |
| ldapUserFilterGroups          |                                                            |
| ldapUserFilterMode            | 0                                                          |
| ldapUserFilterObjectclass     | posixAccount                                               |
| ldapUuidGroupAttribute        | auto                                                       |
| ldapUuidUserAttribute         | auto                                                       |
| turnOffCertCheck              | 0                                                          |
| turnOnPasswordChange          | 0                                                          |
| useMemberOfToDetectMembership | 1                                                          |
+-------------------------------+------------------------------------------------------------+

Does anyone have any idea what is causing this and does anyone have a solution to it?

Thanks in advance

The nice little search function of the forum (upper right corner of the screen) returns the following matches on this message:

https://help.nextcloud.com/search?q=Could%20not%20autodetect%20the%20UUID%20attribute

Since I already used the search function and none of the results helped me to resolve the problem, I opened this thread.

Thanks for the hint and the hidden sarcasm though :+1:

Again, the problem only appeared after upgrading from 17.0.2 to 17.0.3 - The update also finished without any errors. It looks like, something has changed in the ldap app.

Hi,

I had the same problem with the update from 17.0.2 to 17.0.3. I was very happy not to be alone until I realized that there was no solution.
I replaced the ldap_user app (folder nextcloud/apps/user_ldap) with the one from version 17.0.2. The error has disappeared from the logs. Login works, LDAP test works. So it seems to work.

Steps:
move nextcloud/apps/user_ldap to backup
download nextcloud Version 17.0.2
copy nextcloud/apps/user_ldap from the Version 17.0.2 to your nextcloud folder.

cya

1 Like

Thanks @fips1845

I kind of guessed that it has something to do with the new NC version, since it did not happen with the old one.

Going to give your solution a try, despite it being kind of a “dirty” solution. Will have to report this on GitHub, since it is annoying.

I agree with you. The solution is dirty.

I would appreciate it if someone had another solution. So a GitHub issue sounds like a good idea.

2 Likes

I’m also affected by the bug.
There is a bug report on Github for 18.0.0 that seems to be similar:

1 Like

Hey @patrick90 that’s awesome, at least we are not the only ones. Thanks for the link!

I’m probably going to compare the old app repo with the new one tomorrow and see what has been changed. Hopefully this can be fixed.

1 Like

@CFelix you’re welcome :slight_smile:

My guess is that the bug comes from the new array_walk for caching on line 971 in

apps/user_ldap/lib/Access.php

It calls dn2ocname, which calls getUUID, which calls detectUuidAttribute which throws the error.

It seems that you are correct about the array_walk - I compared the 17.0.2 with the 17.0.3 and tried a few things. Since I didn’t want to exchange the whole content of user_ldap with the old stuff, I kind of compared the files and merged stuff from 17.0.3 to 17.0.2 and tested each single thing.

As soon as I leave the new array_walk out of it, the error stops appearing. Currently checking what the consequences are, to leave this out.

Hi all,

Seeing this log message even on NC 16.0.8 – the differences you have seen for newer versions seem to cover only WHERE the function dn2ocname will be called – but not WHY it has a problem. If downgrading the user_ldap app fixes these entries we should look for recent changes there.

Hi all,

I now have updated my Nextcloud Instance to 18.0.1. Same problem still exists with the new Version.
I have replaced the Access.php with the one from the old ldap_user App. Until now everything looks fine. Login works, permissions works, so lets see what future will bring.

Greetings

1 Like

Thanks for the heads up! It seems that the Github topic doesn’t get any attention from the developers either. As you said, we have to see what the future will bring :+1:t3:

Hi all,

on sunday i updated my nextcloud to 18.0.2. No similar problems have occurred since then. The problem seems to be fixed.

Greetings

1 Like

Haven’t updated yet as I am still in the middle of planning a down time (doing other updates at the same time, which saves me some time)

hmm i Updated to 18.0.3 and it’s still broken.
Old groups works fine new ones generates the known UUID error

1 Like

We have now done the upgrade to NC 18.0.3 and it seems to be working without modifying any PHP files. I must admit, we haven’t added any new groups yet though.

Juts like @elVerwirro said, it could well be, that this now only appears for groups being added after the upgrade.