Skip to content

CDP WebSocket drops after first navigation — daemon logs "Connection lost", second Page.navigate times out #370

Description

@keven221

Before submitting

  • I searched existing issues for duplicates.
  • I ran browser-harness --doctor and read the output.
  • I read the troubleshooting section of install.md.
  • This is a reproducible bug in browser-harness — not a question, feature request, or cloud.browser-use.com issue.

Summary

Daemon connects to Chrome, first navigation works, then WebSocket drops. All subsequent CDP write commands (Page.navigate, Target.createTarget) timeout. Daemon log: "conn: Connection lost". Workaround: js("window.location.href=...") instead of new_tab().

Repro

Steps

# Chrome with remote debugging enabled (Way 1 or Way 2)
browser-harness --doctor  # chrome ok

# First nav WORKS
browser-harness <<'PY'
new_tab("https://example.com")
print(page_info())  # ✅ Example Domain
PY

# Second nav TIMEOUT
browser-harness <<'PY'
new_tab("https://httpbin.org/ip")
PY
# TimeoutError: timed out at _ipc.py line 99

cat /tmp/bu-default.log
# conn: Connection lost

Workaround

browser-harness <<'PY'
js("window.location.href = 'https://example.com'")
import time; time.sleep(2)
print(page_info())  # ✅ Works
PY

Environment

macOS 26.4.1 | Chrome 147 & 148 | Python 3.11.15 | browser-harness 0.1.0 | cdp-use 1.4.5 | websockets 15.0.1 | Both Way 1 & Way 2 identical behavior | chrome-devtools-mcp (Node.js) works perfectly

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions