Cannot read properties of undefined (reading 'toLowerCase')
-
Hi,
does anyone know what this error message mean?
"Cannot read properties of undefined (reading 'toLowerCase')"
I am struggeling with setting up the connection to my Windows LDAP Server
Thx,
Lukas -
N nebulon marked this topic as a question on
-
during the sync process to fetch user and groups from my Windows AD
Here is a Log-File from the last sync i tried
2024-10-22T11:56:42.621Z box:taskworker Starting task 48. Logs are at /home/yellowtent/platformdata/logs/tasks/48.log
2024-10-22T11:56:42.675Z box:tasks update 48: {"percent":10,"message":"Starting ldap user sync"}
2024-10-22T11:56:42.952Z box:externalldap syncUsers: Found 21 users
2024-10-22T11:56:42.954Z box:taskworker Task took 0.41 seconds
2024-10-22T11:56:42.954Z box:tasks setCompleted - 48: {"result":null,"error":{"stack":"TypeError: Cannot read properties of undefined (reading 'toLowerCase')\n at translateUser (/home/yellowtent/box/src/externalldap.js:49:54)\n at syncUsers (/home/yellowtent/box/src/externalldap.js:355:24)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async sync (/home/yellowtent/box/src/externalldap.js:509:5)","message":"Cannot read properties of undefined (reading 'toLowerCase')"}}
2024-10-22T11:56:42.954Z box:tasks update 48: {"percent":100,"result":null,"error":{"stack":"TypeError: Cannot read properties of undefined (reading 'toLowerCase')\n at translateUser (/home/yellowtent/box/src/externalldap.js:49:54)\n at syncUsers (/home/yellowtent/box/src/externalldap.js:355:24)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async sync (/home/yellowtent/box/src/externalldap.js:509:5)","message":"Cannot read properties of undefined (reading 'toLowerCase')"}}
TypeError: Cannot read properties of undefined (reading 'toLowerCase')
at translateUser (/home/yellowtent/box/src/externalldap.js:49:54)
at syncUsers (/home/yellowtent/box/src/externalldap.js:355:24)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async sync (/home/yellowtent/box/src/externalldap.js:509:5) -
So the crash happens at https://git.cloudron.io/cloudron/box/-/blob/master/src/externalldap.js?ref_type=heads#L49 we will provide a fix to have a better error message, but generally this will not "fix" the issue.
Looks like some LDAP object from your LDAP server is returning a user record without a username field.
Could this be the issue? -
So the crash happens at https://git.cloudron.io/cloudron/box/-/blob/master/src/externalldap.js?ref_type=heads#L49 we will provide a fix to have a better error message, but generally this will not "fix" the issue.
Looks like some LDAP object from your LDAP server is returning a user record without a username field.
Could this be the issue?@nebulon so I solved the problem. The was an E-Mail missing in one of the user. After adding the E-Mail we sync was succesful
-
N nebulon has marked this topic as solved on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login