Glad to hear I am not the only one having issues. Just started using T3 Code. It also really wanted to open the dev url as a file.
[Bug]: Remote preview stays on "Connecting to browser…" when the viewer's first still capture never answers#24852
Area
apps/server (ServerBrowser.attachViewer, ServerBrowserStream), apps/mobile preview sheet.
What happens
A remote viewer (iPhone app, via T3 Connect relay) opened an agent-owned tab and stayed on "Connecting to browser…" for four minutes, until the agent closed the tab. Host is the Windows desktop app 0.1.2 with the headless server browser (no desktop-hosted webview involved), so this is not the off-window Electron guest in #22461 / #23015 / #24514.
Why
ServerBrowserStream calls attachViewer before upgrading the WebSocket, and attachViewer awaits an initial still (Page.captureScreenshot) with no deadline. If the page's renderer does not answer, the handshake never completes: the phone's socket never opens, and the UI has no timeout for that state. The pending still also holds tab.captureLock, so every later agent snapshot on the tab queues behind it (#23022 describes that half).
Host trace (server.trace.ndjson, UTC 2026-10-25):
| 1 | 09:02:27 preview_open https://www.costco.co.uk/ ok, 4.3 s |
| 2 | 09:02:28 GET /api/preview-stream/ws → ServerBrowser.attachViewer 244,877 ms |
| 3 | 09:02:29… preview_snapshot / evaluate / navigate on that tab all time out (15 s) |
| 4 | 09:04:22 second viewer attach (full screen) 131,158 ms |
| 5 | 09:06:33 t3_preview_close → both attachViewer spans end, GETs 499 |
A second tab on the same site worked normally. Why the first renderer stopped answering is not reproduced; the T3 fault is that one unanswered capture blocks the viewer handshake and the tab.
Expected
The viewer's socket opens as soon as the screencast is attached; the still is best-effort. A client that gets no frame after a reasonable time shows an error with a reconnect, not a permanent spinner.
Reproduction
Unit level: stub Page.captureScreenshot to never resolve on the viewer's CDP session and call attachViewer; it never returns. Test and fix on robrab2000/t3code@investigate/mobile-preview-connecting-hang, PR to follow.
Refs #23022, #23515 (bounds captureViewport), #19420, #22461.
Investigated with Claude Fable 5.1 in T3 Code.