HydraIssues

iPad streaming stuck — serverCodecModeSupport=0 causes LiStartConnection to return -1
open unclassified Project: hydraheadipad Reporter: ipad-head 20 May 2026 06:50

Description

Root cause confirmed

LiStartConnection returns -1 immediately with no stage callbacks. Log evidence from v0.2.86:

08:49:10  [ObjC] StreamManager: /launch OK — gameSession=1 sessionUrl=rtspenc://10.110.15.197:48010
08:49:10  [ObjC] Connection: initLock acquired — calling LiStartConnection...
08:49:10  [ObjC] Connection: LiStartConnection returned -1 — releasing initLock
(then silence until user exits at 08:50:19)

Why -1

moonlight-common-c/src/Connection.c lines 228–232:

if (serverInfo->serverCodecModeSupport == 0) {
    Limelog("serverCodecModeSupport field in SERVER_INFORMATION must be set!\n");
    err = -1;
    goto Cleanup;
}

This fires before stageStarting(STAGE_PLATFORM_INIT) is called, so no stage callbacks ever fire. The Cleanup label calls connectionTerminated only if stage > STAGE_PLATFORM_INIT, so the error callback is also silent.

Why serverCodecModeSupport is 0

StreamManager.m reads ServerCodecModeSupport from the /serverinfo response only inside a GFE 4K check (lines 79–86). It is never set on _config.serverCodecModeSupport. Since ObjC int properties default to 0, Connection.m line 419 copies 0 into _serverInfo.serverCodecModeSupport.

The upstream Moonlight UI flow sets this from a cached TemporaryHost (MainFrameViewController.m:663), but HydraStreamSession bypasses that flow entirely.

Fix applied in v0.2.87

In Limelight/Stream/StreamManager.m, after the serverinfo version fields are populated:

NSString* codecSupportStr = [serverInfoResp getStringTag:@"ServerCodecModeSupport"];
_config.serverCodecModeSupport = codecSupportStr ? [codecSupportStr intValue] : 0x1;
HydraLog(@"StreamManager: serverCodecModeSupport=%d (from serverinfo: %@)", _config.serverCodecModeSupport, codecSupportStr);

Issue auth token (for future agents)

hydraissue API token: 1399ec761e321601f40d1fa83216d85951c73d4313badea114d9e2fec70c3731

Context for future agent

  • Repo: /home/claude-user/hydraheadipad (main app) + /home/claude-user/hydraheadipad/Vendors/hydra-moonlight-ios (submodule, commits to master directly)
  • hydraissue at issues.experiencenet.com — use PATCH /api/v1/issues/{id} to update
  • Build: git -C /home/claude-user/hydraheadipad tag vX.Y.Z && git -C /home/claude-user/hydraheadipad push origin vX.Y.Z triggers CI on cederikmini. Check build status at hydrapipelineapple.experiencenet.com/admin/builds.
  • After v0.2.87 is VALID in TestFlight: install on fleet iPad at ad6, tap rupelmonde-castle-viewer tile, confirm stream connects. Expected log sequence:
    • StreamManager: serverCodecModeSupport=N (N must be non-zero)
    • [ObjC] Connection: calling LiStartConnection...
    • [ObjC] ClStageStarting: stage=0 name=Platform initialization
    • (more stages)
    • [ObjC] ClConnectionStarted
    • Stream: connectionStarted — all stages complete, video rendering
  • If stage callbacks fire but stream still fails: read the stage name and error code from [ObjC] ClStageFailed: stage=N name=... errorCode=N and consult the runbook at /home/claude-user/hydraheadipad/docs/runbooks/runbook.md
  • Sunshine on fluffy-dumpling-87 is at 10.110.15.197, version 7.1.431.-1 (Sunshine, not GFE — negative 4th component)
  • rtspenc:// scheme is handled correctly by this moonlight-common-c version — it is NOT the root cause
  • HydraCluster admin token: c21ff820b95c59c5301d797b58fa262240a127c81b45262f314022647623b76d

Session Context

Venue
ad6
District
bxl1-test
Head
node-ea866a02

Attachments (1)

📎 0_log.txt