HydraIssues

hydraheadflatscreen: stream errors not surfaced — kiosk shows raw Moonlight failure, status API reports no error
open bug Project: hydraheadflatscreen Reporter: claude 14 May 2026 18:20

Description

## Problem

When Moonlight exits with an error (e.g. 'Failed to find application rupelmonde-castle-viewer'), the stream status API on the head still returns {"error":""} and the kiosk display shows a raw Moonlight error dialog instead of a clean message. The only way to detect the failure is to be physically present or to search Moonlight log files.

## Observed on 2026-05-14

Triggered POST /api/v1/stream/start for rupelmonde-castle-viewer on cheeky-cactus-86. Agent launched Moonlight, Moonlight connected to Sunshine on cosmic-pretzel-98, then exited with: Qt Critical: Failed to find application rupelmonde-castle-viewer. The stream status API continued to return {"app":"rupelmonde-castle-viewer","error":"","status":"streaming"} even after the failure.

## Expected behaviour

1. When the Moonlight stream process exits with a non-zero code, hydraheadflatscreen should parse the last error line from the Moonlight log and set the stream status error field.
2. GET /api/v1/stream/status should return {"status":"error","error":"Failed to find application rupelmonde-castle-viewer"} so callers can detect and surface failures.
3. The kiosk app should display a clean user-facing message (not a raw Moonlight dialog) when the stream fails.
4. The failure should be logged with enough context for remote diagnosis without physical access.

## Impact

Stream failures are invisible remotely. Operators must be physically present or manually grep Moonlight logs to detect them.