fix(baoyu-chrome-cdp): keep HTTP validation in findExistingChromeDebugPort
findExistingChromeDebugPort callers (fetch_google_cookies_via_cdp) depend on /json/version being available. TCP-only check could misclassify non-CDP listeners as reusable, causing waitForChromeDebugPort to timeout instead of falling back to launching a new Chrome. Restore isDebugPortReady (HTTP) as the validator for this function; TCP-only check remains in discoverRunningChromeDebugPort for Chrome 146 approval mode. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d9f9da639d
commit
b7bcc8c094
|
|
@ -210,7 +210,6 @@ export async function findExistingChromeDebugPort(options: FindExistingChromeDeb
|
|||
const timeoutMs = options.timeoutMs ?? 3_000;
|
||||
const parsed = parseDevToolsActivePort(path.join(options.profileDir, "DevToolsActivePort"));
|
||||
|
||||
if (parsed && await isPortListening(parsed.port, timeoutMs)) return parsed.port;
|
||||
if (parsed && parsed.port > 0 && await isDebugPortReady(parsed.port, timeoutMs)) return parsed.port;
|
||||
|
||||
if (process.platform === "win32") return null;
|
||||
|
|
|
|||
|
|
@ -210,7 +210,6 @@ export async function findExistingChromeDebugPort(options: FindExistingChromeDeb
|
|||
const timeoutMs = options.timeoutMs ?? 3_000;
|
||||
const parsed = parseDevToolsActivePort(path.join(options.profileDir, "DevToolsActivePort"));
|
||||
|
||||
if (parsed && await isPortListening(parsed.port, timeoutMs)) return parsed.port;
|
||||
if (parsed && parsed.port > 0 && await isDebugPortReady(parsed.port, timeoutMs)) return parsed.port;
|
||||
|
||||
if (process.platform === "win32") return null;
|
||||
|
|
|
|||
Loading…
Reference in New Issue