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
  • 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 | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. Cannot read properties of undefined (reading 'sort')

Cannot read properties of undefined (reading 'sort')

Scheduled Pinned Locked Moved Solved Support
cloudflare
10 Posts 3 Posters 2.6k Views 3 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.
    • E Offline
      E Offline
      eddowding
      wrote on last edited by girish
      #1

      Anyone had this when adding a domain name from Cloudflare? This one was a .co.uk - others worked fine.

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

        Maybe this is related to https://forum.cloudron.io/topic/10808/support-for-co-uk-namecheap-domain?_=1704889651548

        1 Reply Last reply
        1
        • nebulonN nebulon marked this topic as a question on
        • girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by
          #3

          Where do you see this error? Screenshot or logs?

          1 Reply Last reply
          0
          • E Offline
            E Offline
            eddowding
            wrote on last edited by
            #4

            CleanShot 2024-01-10 at 16.53.58.png

            girishG 1 Reply Last reply
            1
            • E eddowding

              CleanShot 2024-01-10 at 16.53.58.png

              girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by
              #5

              @eddowding might be a good idea to revoke that global API key since it's readable even if cropped.

              Can you check /home/yellowtent/platformdata/logs/box.log ? that should have a full backtrace of the error. Can you also tell me the version of Cloudron you are using?

              1 Reply Last reply
              0
              • E Offline
                E Offline
                eddowding
                wrote on last edited by
                #6

                Ah yes, good spot! Changed!

                v: 7.5.2`

                at add (/home/yellowtent/box/src/routes/domains.js:58:37)
                at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
                
                1 Reply Last reply
                0
                • nebulonN Offline
                  nebulonN Offline
                  nebulon
                  Staff
                  wrote on last edited by
                  #7

                  This indeed seems like a bug then. Can you send a mail to support@cloudron.io? I think we have to debug this directly.

                  1 Reply Last reply
                  0
                  • girishG Offline
                    girishG Offline
                    girish
                    Staff
                    wrote on last edited by
                    #8

                    Curiously, the routes code does not use 'sort' at all. But cloudflare code does use it. I have added some checks for cloudflare response validation now but that still won't solve the actual error mostly.

                    1 Reply Last reply
                    0
                    • girishG Offline
                      girishG Offline
                      girish
                      Staff
                      wrote on last edited by
                      #9

                      The full logs are:

                      HttpError: Cannot read properties of undefined (reading 'sort') 
                          at BoxError.toHttpError (/home/yellowtent/box/src/boxerror.js:106:16)
                          at add (/home/yellowtent/box/src/routes/domains.js:58:37)
                          at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { 
                        status: 500,
                        internalError: TypeError: Cannot read properties of undefined (reading 'sort')
                            at Object.verifyDomainConfig (/home/yellowtent/box/src/dns/cloudflare.js:272:38)
                            at process.processTicksAndRejections (node:internal/process/task_queues:95:5),
                        details: null
                      }
                      
                      1 Reply Last reply
                      0
                      • girishG Offline
                        girishG Offline
                        girish
                        Staff
                        wrote on last edited by
                        #10

                        This is fixed now.

                        The original issue is that the zone is added in Cloudflare but the nameservers of the domain are not set to Cloudflare. This makes Cloudflare return name_servers as empty in the response which makes our code crash.

                        1 Reply Last reply
                        2
                        • girishG girish has marked this topic as solved on
                        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