From ea58bce19e7b3affcdfa6ed070fc9e589fdf1311 Mon Sep 17 00:00:00 2001 From: leeguooooo Date: Tue, 9 Jun 2026 23:39:41 +0900 Subject: [PATCH] fix(connect): extension connect now uses the relay URL (was falling through to auto-connect) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `extension connect` rewrote argv to ["connect", ] but the connect path reads flags.cdp — parsed earlier from the original argv ("extension connect" → None). So the relay URL was dropped and the daemon ran AUTO-CONNECT, grabbing whatever Chrome it could discover: a stale remote-debugging Chrome on :9222 (indefinite hang), or triggering Chrome's "Allow remote debugging?" prompt on machines without one. This is the EAGAIN/hang hermes hit on --session connect. Fix: set flags.cdp = Some(relay_url) (+ disable auto_connect) in the extension-connect branch so the daemon connects to the live relay endpoint. Diagnosed via local repro (trace showed connect_cdp resolving ws://...:9222/ devtools/browser/... instead of the relay's ws://...:/). --- cli/src/main.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cli/src/main.rs b/cli/src/main.rs index fdf29d1..e79fab6 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -658,8 +658,15 @@ fn main() { if clean.get(1).map(|s| s.as_str()) == Some("connect") { match connect::relay_url() { Some(url) => { + // The connect path reads `flags.cdp` (parsed from the original + // argv, which was `extension connect` → None), NOT `clean`. + // Without this the relay URL is dropped and we fall through to + // auto-connect, grabbing some other Chrome (stale :9222) or + // popping the remote-debug prompt. Point the daemon at the + // relay explicitly. + flags.cdp = Some(url.clone()); + flags.auto_connect = false; clean = vec!["connect".to_string(), url]; - // fall through to the normal connect handling below } None => { eprintln!(