Skip to content

Bug: browser tool times out despite CDP connection working (Playwright can connect directly) #72653

Closed

Description

@sylviazhang2006-design

Bug Description

The browser tool consistently times out with error "timed out. Restart the OpenClaw gateway. Do NOT retry the browser tool", despite the CDP endpoint being fully functional.

Environment

  • OpenClaw: 2026.4.24 (upgraded from 2026.4.15, issue existed in both versions)
  • OS: Ubuntu 24.04 (Linux 6.8.0-101-generic x64)
  • Node.js: v22.22.2
  • Chromium: 145.0.7632.6 (Playwright chromium-1208)
  • CDP endpoint: http://localhost:9222 (headless, no-sandbox)

Steps to Reproduce

  1. Start Chromium with CDP
  2. browser status returns cdpReady: true, cdpHttp: true
  3. browser open / browser snapshot / browser navigate all timeout

What Works

  • curl http://localhost:9222/json returns page targets correctly
  • Playwright connecting directly to the same CDP endpoint works perfectly (opens Google, gets title)

What Does Not Work

  • All browser tool operations (open, snapshot, navigate) timeout

Troubleshooting Done

  • Added --disable-dev-shm-usage - no effect
  • Added --disable-gpu - no effect
  • Verified page targets exist - not missing
  • Changed attachOnly to false - no effect
  • Restarted Chromium multiple times - no effect
  • Upgraded OpenClaw 2026.4.15 to 2026.4.24 - no effect
  • Playwright direct CDP connection works - confirms CDP is fine

Suspicion

The OpenClaw browser plugin may have a bug in its CDP transport/handshake layer that causes it to hang despite the underlying connection being available.

Activity

  1. clawsweeper commented on Apr 30, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 28, 2026, 4:15 AM ET / 08:15 UTC.

    Summary
    Keep open. Current main and v2026.6.10 still do not prove the Ubuntu external-CDP all-action timeout is fixed; source still shows an overlapping persistent Playwright remote-tab listing path without an OpenClaw operation timeout, and the active narrower repair is still open and conflicting. The FSB comment is useful workaround/comparison context, but it is external to the OpenClaw browser tool path.

    Reproducibility: no. high-confidence live reproduction was established for the reporter's exact Ubuntu external-CDP all-action timeout. Source inspection does show an overlapping current-main path where persistent Playwright remote tab enumeration is awaited without an OpenClaw operation timeout.

    Ways to help us reproduce this

    • Add a screenshot or short recording showing the behavior.
    • Add expected vs actual behavior.

    Next step
    An open conflicting PR already owns the narrower source-reproducible remote tab-enumeration path, and the broader external-CDP all-action timeout still needs live maintainer validation before a new automated fix is safe.

    Review details

    Best possible solution:

    Keep this as the live-repro tracker for the external-CDP all-action timeout, land or replace the narrower remote-enumeration fix if it applies, then verify open, navigate, snapshot, status, and direct Playwright against the same endpoint.

    Do we have a high-confidence way to reproduce the issue?

    No high-confidence live reproduction was established for the reporter's exact Ubuntu external-CDP all-action timeout. Source inspection does show an overlapping current-main path where persistent Playwright remote tab enumeration is awaited without an OpenClaw operation timeout.

    Is this the best way to solve the issue?

    No, closing or queueing a speculative new fix is not the best path yet. The maintainable path is live reproduction plus review, repair, or replacement of the active narrower PR if it covers this failing boundary.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • No live Ubuntu 24.04 external-CDP reproduction was run against current main, so the exact failing boundary for open, navigate, and snapshot remains unproven.
    • The open related PR may fix the overlapping remote tab-enumeration hang, but it is unmerged, conflicting, and narrower than this all-action report.
    • The merged snapshot timeout propagation fix is shipped, but it explicitly did not cover this Linux/all-action path.

    Codex review notes: model internal, reasoning high; reviewed against 9c95abd49d45.

    Label changes

    Label justifications:

    • P1: The report describes core browser tool open, navigate, and snapshot workflows becoming unusable against a CDP endpoint that direct Playwright can use.
    • impact:crash-loop: The issue is about repeated browser tool hangs/timeouts with gateway-restart recovery guidance, which is an availability failure.
    Evidence reviewed

    What I checked:

    • Repository policy read: Root AGENTS.md and scoped extensions/AGENTS.md were read; their source-proof, plugin-boundary, and no-mutation review guidance affected this read-only decision. (AGENTS.md:1, 9c95abd49d45)
    • Live issue context: Live GitHub still shows this issue open with no assignees, external reporter status, and the same cdpReady/cdpHttp-true but all-actions-timeout report; a comment links FSB as an external workaround/comparison point, not an OpenClaw core fix.
    • Status does not prove page action health: Current status reports cdpHttp/cdpReady from short HTTP and transport probes; the reported status success can coexist with later action-path failures. (extensions/browser/src/browser/routes/basic.ts:139, 9c95abd49d45)
    • Browser actions use separate paths: The browser tool dispatches snapshot through executeSnapshotAction and navigate through the control route/client path, so the merged snapshot-only fix does not prove open and navigate are healthy. (extensions/browser/src/browser-tool.ts:777, 9c95abd49d45)
    • Current remote Playwright tab listing lacks an operation timeout: listPagesViaPlaywright currently accepts only cdpUrl and ssrfPolicy and awaits connectBrowser/getAllPages/page reads without an OpenClaw timeout option. (extensions/browser/src/browser/pw-session.ts:1659, 9c95abd49d45)
    • Current caller does not pass the remote CDP timeout budget: The persistent Playwright remote-profile tab path calls listPagesViaPlaywright with only cdpUrl and ssrfPolicy, while remote CDP action timeout budgets are only applied to the HTTP/CDP target fallback path nearby. (extensions/browser/src/browser/server-context.tab-ops.ts:215, 9c95abd49d45)

    Likely related people:

    • mukhtharcm: The persistent Playwright remote profile tab operation commit added listPagesViaPlaywright and the remote profile tab-operation path that overlaps this report. (role: introduced behavior; confidence: high; commits: 02a4de0029d4; files: extensions/browser/src/browser/pw-session.ts, extensions/browser/src/browser/server-context.tab-ops.ts)
    • steipete: History shows hardening of the original remote tab work and the later move of browser ownership into the bundled plugin surface. (role: feature-history owner and recent area contributor; confidence: high; commits: bbef30daa5c7, 8eeb7f082975, 663c1858b80e; files: extensions/browser/src/browser/pw-session.ts, extensions/browser/src/browser/server-context.tab-ops.ts, src/browser/pw-session.ts)
    • drobison00: Recent merged tab-route work touched Playwright-backed tab operations, CDP endpoint policy checks, and adjacent browser tab-route behavior in the same surface. (role: recent adjacent contributor; confidence: medium; commits: 48c034792117; files: extensions/browser/src/browser/pw-session.ts, extensions/browser/src/browser/server-context.tab-ops.ts)
    • HemantSudarshan: Authored the open PR proposing timeout handling and scoped connection cleanup for the narrower remote tab-enumeration hang that may overlap this issue. (role: overlapping candidate-fix author; confidence: medium; commits: abf9c793dd95; files: extensions/browser/src/browser/pw-session.ts, extensions/browser/src/browser/server-context.tab-ops.ts, extensions/browser/src/browser/pw-session.connections.test.ts)
    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  2. LakshmanTurlapati commented on May 13, 2026

    @LakshmanTurlapati

    One practical workaround while this gets debugged is to keep the browser bridge outside the OpenClaw gateway path.

    I have been building FSB for that shape: Chrome extension plus MCP tools, with owned tabs, DOM snapshots, and real Chrome session access.

    https://github.com/LakshmanTurlapati/FSB

    It may also give a useful comparison point here since your CDP endpoint works but the OpenClaw browser tool path times out.

  3. added
    P1High-priority user-facing bug, regression, or broken workflow.
    impact:crash-loopCrash, hang, restart loop, or process-level availability failure.
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    on May 20, 2026
  4. openclaw-barnacle commented on Jun 4, 2026

    @openclaw-barnacle

    This issue has been automatically marked as stale due to inactivity.
    Please add updates or it will be closed.

  5. added and removed
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    on Jun 4, 2026
  6. added
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.
    clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    and removed
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    clawsweeper:needs-infoClawSweeper needs more reporter information before it can verify this issue.
    issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.
    on Jun 14, 2026
  7. steipete commented on Jul 5, 2026

    @steipete
    Contributor

    Fixed by PR #80147, landed as bacd1c512a4f922c645da8944f0055bf3b7139f9.

    The failure class was the persistent Playwright remote-profile tab enumeration path: CDP HTTP health could remain responsive while page enumeration waited indefinitely. The maintained fix bounds that work by the configured remote CDP timeout, cancels late connections without replacing the live cache, and prevents an abandoned read from evicting a healthy successor.

    Verification covered focused regressions, the path-scoped changed gate, and a real isolated Dev Gateway with OpenAI gpt-5.5 talking through Browser to remote Chrome. In the live failure test, CDP HTTP and Browser.getVersion remained healthy while the connected Chromium process was suspended; the Gateway returned Playwright page enumeration timed out after 1000ms rather than hanging. Resuming Chrome restored the tabs immediately, and a fresh agent successfully snapshotted the recovered page.

    Supported operation remains remote CDP with the existing timeout and SSRF controls; no browser functionality or trust boundary was relaxed. If a current release still times out after this fix with a healthy direct-Playwright connection, please open a fresh report with the OpenClaw version, CDP endpoint shape (redacted), action, and Gateway timeout log so we can distinguish a different CDP phase.

  8. locked as resolved and limited conversation to collaborators on Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions