Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. Cannot read properties of undefined (reading 'toLowerCase')

Cannot read properties of undefined (reading 'toLowerCase')

Scheduled Pinned Locked Moved Solved Support
7 Posts 2 Posters 2.7k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hi-its-lukas
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • nebulonN Offline
      nebulonN Offline
      nebulon
      Staff
      wrote on last edited by
      #2

      Where do you encounter this issues? It sounds like some Javascript variable which is expected to be a string is actually undefined but really we need more context here.

      1 Reply Last reply
      0
      • nebulonN nebulon marked this topic as a question on
      • H Offline
        H Offline
        hi-its-lukas
        wrote on last edited by
        #3

        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)

        1 Reply Last reply
        0
        • nebulonN Offline
          nebulonN Offline
          nebulon
          Staff
          wrote on last edited by
          #4

          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?

          H 1 Reply Last reply
          0
          • nebulonN Offline
            nebulonN Offline
            nebulon
            Staff
            wrote on last edited by
            #5

            The crash will at least be fixed with next Cloudron version https://git.cloudron.io/cloudron/box/-/commit/14a18a42b777771796b46c7714cc2ab23c0085d5

            1 Reply Last reply
            0
            • nebulonN nebulon

              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?

              H Offline
              H Offline
              hi-its-lukas
              wrote on last edited by
              #6

              @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

              1 Reply Last reply
              0
              • nebulonN Offline
                nebulonN Offline
                nebulon
                Staff
                wrote on last edited by
                #7

                Glad it worked out in the end. With the next release we will have a better error handling to find those issues faster.

                1 Reply Last reply
                0
                • nebulonN 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
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Bookmarks
                • Search