The Cloudron dashboard does not show disk usage (not in v10.0.2 nor earlier versions for at least a year). The request to:
/api/v1/system/filesystems
returns:
{
"status": "Internal Server Error",
"message": "Cannot read properties of undefined (reading 'contents')"
}
Environment
Cloudron: 10.0.2
Ubuntu: 24.04.2 LTS
Kernel: 6.8.0-111-generic
Hosting: Hetzner
Storage layout: NVMe → mdadm RAID1 → LUKS → ext4
The root filesystem itself is healthy and reports usage correctly:
Filesystem Type 1B-blocks Used Avail Use% Mounted on
/dev/mapper/luks-a7030049-5aad-45e0-915c-3073a14fb4ac ext4 1883388502016 1367907303424 419734818816 77% /
Box error
The Box log contains:
shell: df: df -B1 --output=source,fstype,size,used,avail,pcent,target
shell: df: df -B1 --output=source,fstype,size,used,avail,pcent,target /home/yellowtent/platformdata
{
path: '/api/v1/system/filesystems',
status: 500,
error: HttpError: Cannot read properties of undefined (reading 'contents')
at getFilesystems (file:///home/yellowtent/box/src/routes/system.js:153:28) {
status: 500,
internalError: TypeError: Cannot read properties of undefined (reading 'contents')
at Object.getFilesystems (file:///home/yellowtent/box/src/system.js:112:42),
details: null
}
}
The relevant code in /home/yellowtent/box/src/system.js is:
for (const stdPath of standardPaths) {
const [dfPathError, diskInfo] = await safe(df.file(stdPath.path));
if (dfPathError) throw new BoxError(BoxError.FS_ERROR, `Error getting std path: ${dfPathError.message}`);
filesystems[diskInfo.filesystem].contents.push(stdPath);
}
Apparent cause
The two df invocations identify the same root device using different names.
An unqualified df reports:
/dev/dm-0 ext4 ... /
A path-specific df reports:
/dev/mapper/luks-a7030049-5aad-45e0-915c-3073a14fb4ac ext4 ... /
These are aliases for the same device:
/dev/mapper/luks-a7030049-5aad-45e0-915c-3073a14fb4ac → /dev/dm-0
It appears that Cloudron initially indexes filesystems using the literal source returned by the unqualified df:
filesystems[dfEntry.filesystem] = ...
It then looks up the path-specific result using the other device alias:
filesystems[diskInfo.filesystem].contents.push(stdPath);
As a result, filesystems[diskInfo.filesystem] is undefined and the API throws while accessing .contents.
It may be necessary to normalize device paths before using them as keys, or fall back to matching by mountpoint/device identity.
Has anyone else encountered this with an mdadm + LUKS root filesystem? Is a fix planned for an upcoming Cloudron release?