HydraIssues

Linux exe_path lands on a Windows body: hydraunrealtemplate registered as /opt/hydra/.../run.sh on chunky-turnip-23
open bug Project: hydrabody Reporter: 14 Oct 2026 23:39

Description

Found while diagnosing a failed iPad stream to chunky-turnip-23 (node-b961f1c8, Windows, hydrabody v2.0.70-rc.9, mobile-kit).

Symptom

chunky's installed-experience state at C:\Windows\System32\config\systemprofile\.hydrabody\experiences.yaml records:

    hydraunrealtemplate:
        build_number: 2
        exe_path: /opt/hydra/experiences/hydraunrealtemplate/run.sh

That is a Linux path on a Windows body. Test-Path on it returns False. tickSunshineApps faithfully copies ExePath into the Sunshine app cmd (pkg/provider/sunshine.go, desired[name] = desiredApp{cmd: exePath + " " + ueArgs}), so apps.json carries a cmd Windows cannot execute.

Every other experience on the same body has a correct Windows path (mercator-talks, rupelmonde-castle-viewer, gallo-romeins-v3, hellohydra-xr, steamvr-perftest all resolve), so this is specific to hydraunrealtemplate.

Impact

hydraunrealtemplate was, for a period, the ONLY app visible in the head catalog on this venue. A head that launches it causes Sunshine to try to execute a shell script path on Windows. The launch fails, the session dies immediately, and from the head it presents as a stream that never gets past the handshake, with no useful error.

Suspected origin

The recent Linux-body work (commits 1edc034 "Linux body: stop an experience, and restore the executable bit" and 3d33a3b) added Linux experience support. hydraunrealtemplate is at build_number 2. The likely cause is that the experience's binary/exe_path is recorded per experience rather than per platform, so a Linux build's run.sh overwrote the value every body reads.

Fix

exe_path must be resolved per platform (goos/arch) at install time, and a body must refuse to register an app whose exe_path does not exist on disk rather than publishing an unlaunchable app to heads. The second half is the general guard: it would have turned this into a loud log line instead of a silent handshake failure.

Related: #804 (apps.json churn on the same body).

Session Context

Venue
mobile-kit

Comments (2)

api 15 Oct 2026 05:52

Body-side fix released in hydrabody v2.0.70-rc.16. Released, not yet verified on a live body: the cloud body was preempted before rc.16 could deploy, so this is covered by unit tests and code review only.

What is fixed

A body no longer publishes an app it knows it cannot launch.

  • tickSunshineApps checks the recorded exe_path is present before registering an installed experience.
  • pruneUnlaunchableApps removes any that are already registered. Skipping registration alone was not enough: an app registered before the guard existed, or whose build changed platform, sits in Sunshine's list indefinitely and keeps being offered. That is exactly how the cloud body ended up carrying hydraunrealtemplate. Only names the body would have registered itself are removed, so an app added to Sunshine by hand is untouched.
  • tickExperiences now says so at install time, naming the path and the body's GOOS/GOARCH. Previously the mismatch was recorded silently and the install reported success, so nothing pointed at the library. The state is still written and the build number still advances, because not recording it makes the download repeat every tick.
  • Both warnings are deduplicated per app, so a body in this state says it once rather than every 30 seconds.

Checking the path rather than the platform is deliberate: a Linux body keeps its run.sh, a Windows body keeps its .exe, and there is no GOOS branching to keep in step as platforms are added.

What is NOT fixed, and is the real cause

The experience library serves one exe_path per experience with no platform dimension (liveExperience.ExePath, a single string). So a Linux build's launcher is recorded on every body regardless of platform. That needs a library-side change: either per-platform exe paths, or not publishing a Linux-only build to a venue whose bodies are Windows.

Important consequence that this commit does NOT address: the head catalogue comes from hydraexperiencelibrary by district and venue, not from Sunshine's app list. So a Linux-only experience still appears in a Windows venue's grid. This change stops the body pretending it can serve it; it does not stop the library offering it. That is why hydraunrealtemplate was visible at mobile-kit in the first place.

api 15 Oct 2026 08:21

Now verified live on the restored cloud body (node-558827b8, hydrabody v2.0.70-rc.16).

The guard fires and the stale registration is cleaned up:

08:20:02 [sunshine] NOT registering "hydraunrealtemplate": /opt/hydra/experiences/hydraunrealtemplate/run.sh is not on this body, so a head could only fail to launch it
08:20:02 [sunshine] removed unlaunchable app "hydraunrealtemplate" from Sunshine

apps.json afterwards, stable and with the entry gone rather than re-added on the next tick:

[0] hellohydra-xr             prep-cmd=YES
[1] rupelmonde-castle-viewer  prep-cmd=YES

experiences.yaml still records the Linux path, which is correct: the body keeps the library's data and simply refuses to publish an app it cannot launch. The library-side cause is untouched and still open, as is the fact that the head catalogue comes from hydraexperiencelibrary by district and venue rather than from Sunshine, so the experience can still appear in a Windows venue's grid.