Cannot read properties of undefined (reading 'sort')
-
wrote on Jan 9, 2024, 11:44 PM last edited by girish Jan 11, 2024, 10:01 AM
Anyone had this when adding a domain name from Cloudflare? This one was a .co.uk - others worked fine.
-
Maybe this is related to https://forum.cloudron.io/topic/10808/support-for-co-uk-namecheap-domain?_=1704889651548
-
-
wrote on Jan 10, 2024, 4:54 PM last edited by
-
@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? -
wrote on Jan 11, 2024, 11:30 PM last edited by
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)
-
This indeed seems like a bug then. Can you send a mail to support@cloudron.io ? I think we have to debug this directly.
-
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 }
-
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. -