You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Machines: when Start, Restart or another power action fails, the user only sees "Internal error" #214
The power actions in lifecycle() (omarchyd/machines.mjs, about lines 584-627: start, shutdown, restart, force stop, pause, resume, hibernate) let plain Error objects escape. Those come from execP (every failing virsh call) and from the deliberate message at line 604:
if(Date.now()>end)thrownewError(`${m.name} didn’t shut down within 3 minutes; use Stop, then Start`)
sendError() in omarchyd/rpc.mjs (lines 17-24) only passes the message through for RpcError; every other error becomes HTTP 500 with the text "Internal error". So the instruction in line 604, and the reason virsh gives (for example "unsupported configuration", "Failed to start domain", a missing passt binary), never reach the user. The web app shows e.message in a toast (for example web/src/desktop/Desktop.tsx line 541 and the power actions in web/src/machines/panels.tsx), so the toast reads "Internal error". The real reason is only in the task history and the server log.
The same applies to machines.updateSettings / markChanged() when virsh define fails.
How to reproduce
I ran createMachines() with a fake run that makes virsh start fail with "error: Failed to start domain: unsupported configuration", created a machine, stopped it, and called machines.start. The thrown error was passed to sendError.
Actual: HTTP 500, body {"error":{"message":"Internal error",...}}.
Expected: a message that says why the machine did not start (or, for the restart timeout, the existing "didn’t shut down within 3 minutes; use Stop, then Start" text).
Real-world trigger for the timeout message: change a hardware setting on a running machine whose guest ignores ACPI shutdown, then press Reboot.
Suggested fix
Wrap the failure in lifecycle() (and markChanged/updateSettings) in an RpcError('PRECONDITION_FAILED' or 'BAD_GATEWAY', error.message) so the message reaches the client, as create() already does by storing error.message for the machine.
Activity
nixfred commentedon Nov 25, 2026
Working to resolve this.
Say why libvirt refused a changed machine setting instead of "Interna…