t3code icon indicating copy to clipboard operation
t3code copied to clipboard

T3 embedded Android viewer stays blank while the standalone hub paints live video

Open YashasVM opened this issue 1 month ago • 1 comments

What happened

The T3 Code Device panel opens for a running headless Android emulator but remains blank. Closing the device panel with device_close using shutdown=false, then calling device_open, does not fix it; the user confirmed it was still blank.

The same emulator works in the standalone device hub dashboard in system Chromium. Selecting the correct emulator through the dashboard store shows it as Live and visibly paints the running app in a 576x1280 canvas. device_screenshot also returns a real 1080x2400 PNG.

Diagnosis

The evidence narrows the failure to T3's embedded viewing path or its integration with the hub, rather than a general inability to capture and display this emulator. A root cause is not proven.

Read-only inspection of the installed nightly's resources/app.asar confirmed its version and found the embedded stream implementation in apps/server/dist/client/assets/_chat-CBwKx0l7.js:

  • Android connects to /vendor/serve-emu/ws?device=<serial>&frame-meta=1, parses SEMU packets, and decodes H.264 with WebCodecs.
  • The shipped client configures its decoder from the SPS-carrying keyframe, returns without decoding that keyframe, and requests another keyframe.
  • Every video-session message closes the decoder and requests a keyframe, without checking whether the dimensions changed.
  • Its MJPEG preference and fallback apply to iOS. Android has no runtime MJPEG fallback in this implementation; without WebCodecs it reports an error.

This is the handshake pattern described in #12229. Hub health at 14:49:21 UTC showed configPackets=18, videoResetRequests=17, and lastVideoResetReason="client requested keyframe". These counters support investigating that path, but a single counter snapshot does not prove a continuing reset loop or establish that it caused this panel's failure. The actual embedded renderer's decoder output and reset sequence were not captured.

The installed hub 0.15.3 dashboard's Android implementation advertises H.264 and optional WebRTC, with MJPEG unavailable. Its WebSocket path can configure and decode the same SPS-carrying keyframe. Therefore the working dashboard should not be described as an MJPEG control. The successful browser probe did not record enough transport detail to distinguish WebCodecs, MSE, or WebRTC for that particular session.

Current-main source is approximate relative to this nightly. Relevant source: shared stream implementation. The shipped bundle independently confirms the behavior above.

Steps to reproduce

Observed on the affected installation; not reproduced from a clean install:

  1. Run T3 Code nightly on Linux with a headless Android 15 emulator booted and reachable as emulator-5554.
  2. Open that emulator using device_open.
  3. Observe that T3's Device panel opens but remains blank.
  4. Close the panel without shutting down the emulator, then reopen it. It remains blank.
  5. Open the same local hub in system Chromium and select emulator-5554 through the dashboard store, using selectDevice("emulator-5554"). The dashboard shows the emulator as Live and paints its actual screen.
  6. Request device_screenshot; it also returns the actual screen.

Expected: the embedded Device panel displays the live screen, as the standalone dashboard does.

Version

T3 server: 0.1.1-nightly.20261017.3238, verified by the parent through the environment endpoint. The installed desktop archive's package.json independently reports the same version.

Triage CLI, separately: 0.1.1-nightly.20261017.3238.

Environment

  • Linux x64, kernel 7.2.5-3-omarchy; local T3 desktop installation and local server.
  • Node v24.21.0, recorded by the triage context.
  • expo-device-hub 0.15.3; agent-device 0.21.25.
  • Headless Android 15 emulator, AVD wl35, serial emulator-5554.
  • Working comparison client: host system Chromium driven through Python Playwright.

Evidence

Parent-observed hub health at 2026-10-17 14:49:21 UTC, trimmed:

status: streaming
frames: 9550
configPackets: 18
videoResetRequests: 17
lastVideoResetReason: client requested keyframe
lastError: null
remaining video client:
  sentFrames: 6419
  droppedFrames: 0
  backpressureEvents: 0
  awaitingKeyFrame: false

Earlier health identified grpc-screenshot, rgb888, software libx264, H.264, and encoded size 576x1280. The stream had started at 14:39:07 UTC, before the diagnostic browser attached.

The parent visually inspected the standalone dashboard screenshot and confirmed that the correct emulator's real app screen was painted. The screenshot is withheld because it contains private conversation text. The only console errors reported for the successful dashboard probe were xcrun ENOENT on Linux; no causal link to the embedded failure is established.

An initial dashboard URL query did not select the intended device. That observation and earlier browser snapshot timeouts are not evidence of a stream failure and are excluded from the reproduction.

Related issues

  • #12229 describes the matching shipped client handshake and working screenshots. Its demonstrated capture source was scrcpy, whereas this installation uses grpc-screenshot. This may be additional evidence for that issue; a duplicate is not yet confirmed by a live reset-sequence capture.
  • PR #17033 proposes client handshake fixes and a hub bump to 0.15.1. It was open and unmerged when checked. This installation already has hub 0.15.3 but retains the described client handshake. No released upgrade was verified to fix this installation.

Fix applied or workaround

Closing and reopening the panel without shutting down the emulator did not help. No code patches, database writes, shared hub restart, or emulator reboot were performed.

The standalone hub dashboard is a verified live-view workaround. Screenshots also work. No supported runtime setting was found to switch the embedded Android viewer to MJPEG; changing a dashboard preference does not change T3's independent stream client.

Filed by

Codex, GPT-6.1-Sol, via t3 triage, with live host evidence supplied by the parent session.

YashasVM avatar Oct 17 '26 14:10 YashasVM

[!NOTE] Grok responding on behalf of Julius.

Thanks for the detailed write-up. This is the same Android Device panel failure tracked in #12229: the shipped client configures its decoder from the SPS keyframe, drops it, requests reset-video, and then tears the decoder down on the resulting video-session, so nothing ever paints. Your bundle inspection and hub counters line up with that exact handshake, and the capture source (grpc-screenshot vs scrcpy) doesn't change the client-side loop.

The fix is in flight in #17033 (Fixes #12229). Closing this as a duplicate so the discussion stays in one place. Please add your grpc-screenshot data point to #12229, and if the panel is still blank once #17033 ships in a nightly, comment there and we'll reopen.

juliusmarminge avatar Oct 17 '26 14:10 juliusmarminge