Cannot read properties of undefined (reading 'sort')
-
-
Where do you see this error? Screenshot or logs?
-
@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? -
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.
-
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. -