Repository navigation
Open
Description
Summary
The daemon's final error says DevToolsActivePort not found, but the file is there and the chrome://inspect/#remote-debugging toggle is already on. The file just points at a port nothing is listening on. The message and the suggested fix send you to tick a checkbox that is already ticked.
Trigger: the browser was started with --remote-debugging-port=9222 on the default profile. Edge 156 (chromium 136+ lockdown, same IsUsingDefaultDataDirectory() check as #264) then opens no devtools endpoint at all — the requested port never binds and the toggle path does not come up either — so the DevToolsActivePort file on disk is stale from the previous run.
Not a duplicate of #264 / #291 / #894
- daemon: Chrome 147+ default-profile CDP discovery fails (regression from #260) #264 / fix: BU_CDP_URL path in get_ws_url() fails on Chrome 147+ (default user-data-dir) — missing /json/version 404 fallback #291 were about
/json/versionreturning 404 while the websocket still worked. Here nothing is listening on any port, so theDevToolsActivePortfallback has nothing to fall back to. - Auto-launch never fires when Chrome is quit but another Chromium-family browser (Brave) is running: daemon reports "DevToolsActivePort not found" instead of chrome-not-running #894 is the "another chromium-family browser is running" path. Here the right browser is running, with the toggle on.
What I see
fatal: DevToolsActivePort not found in ['C:\Users\<user>\AppData\Local\Google\Chrome\User Data',
'C:\Users\<user>\AppData\Local\Google\Chrome SxS\User Data', ...,
'C:\Users\<user>\AppData\Local\Microsoft\Edge\User Data', ...] — enable
chrome://inspect/#remote-debugging, or set BU_CDP_WS for a remote browser
but the state is actually:
%LOCALAPPDATA%\Microsoft\Edge\User Data\DevToolsActivePortexists — port64302,/devtools/browser/<uuid>on line 2%LOCALAPPDATA%\Microsoft\Edge\User Data\Local State→devtools.remote_debugging.user-enabled=true- nothing is listening on
64302, or on any other port - the
DevToolsActivePortmtime is older than the browser process start time — leftover from the previous run, the new browser never wrote it
so the real message is "found, but dead", not "not found".
Repro
- edge 156, default profile,
edge://inspect/#remote-debugging→ tick "allow remote debugging for this browser instance" - quit edge completely
- relaunch edge with
--profile-directory=Default --remote-debugging-port=9222 - run
browser-use
Cross-checks that may help
- the same command without the flag works: edge writes a dynamic port to
DevToolsActivePortandlist_tabs()returns the live tabs --remote-debugging-portdoes work on a non-default profile —--headless=new --user-data-dir=<scratch> --remote-debugging-port=9333binds9333and/json/versionanswers normally, so this is specific to the default profile- the port the harness picks up changes on every browser start, so
9222is usually closed even while everything is working — that part is expected - the flag is not a broken process singleton. Launching the same command while edge is already running gives exit code 0, empty stderr and no second instance — identical to the same launch without the flag
Suggested changes
- tell "no
DevToolsActivePortfile" apart from "file present but port not listening", and include the port and the file mtime in the error - when a supported browser is running and the toggle is on but no port is live, say the endpoint is not reachable and name the likely cause — a browser started with
--remote-debugging-porton the default profile ends up with no endpoint at all on chromium/edge 136+.install.mdcurrently lists three possible reasons fordaemon aliveFAIL and the actionable one is not among them; the recovery it points at ("tick the checkbox") is already done in this case --doctorreportschrome running [ok]+daemon alive [FAIL], which is the only hint that anything is wrong- the recovery text says "start Chrome" and points at
chrome://inspect/#remote-debugging— on windows the browser here was edge, andedge://inspect/#remote-debuggingis the matching page (see also fix: _open_chrome_inspect() fails on Windows — webbrowser.open() can't handle chrome:// protocol #290 for the windowschrome://handling)
Environment
OS: Windows 11 x64
browser version: edge 156.0.4314.58
browser-harness: 0.1.13 (pypi)
python: 3.11.15
browser-harness doctor
platform Windows 10
python 3.11.15
version 0.1.13 (pypi)
latest release 0.1.13
[ok ] chrome running
[FAIL] daemon alive — see install.md
[FAIL] active browser connections — 0
[FAIL] Browser Use cloud auth — optional: browser-harness auth login
Metadata
Metadata
Assignees
Labels
No labels
Activity