Skip to content

docs(screenshots): document the 5s CDP ceiling and the full=True stall - #581

Open
cryptoshrine wants to merge 1 commit into
browser-use:mainfrom
cryptoshrine:docs/screenshot-timeout-ceiling
Open

docs(screenshots): document the 5s CDP ceiling and the full=True stall#581
cryptoshrine wants to merge 1 commit into
browser-use:mainfrom
cryptoshrine:docs/screenshot-timeout-ceiling

Conversation

@cryptoshrine

@cryptoshrine cryptoshrine commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Two distinct failure modes that both surface as the same unexplained TimeoutError, so they're easy to mistake for a dropped connection. Both are documented in interaction-skills/screenshots.md; no code changes.

1. Every CDP call has a hard five-second ceiling

_send() in helpers.py opens its socket with timeout=5.0, so any call needing longer than that fails. Not screenshot-specific:

call result
js() blocked 3s OK in 3.0s
js() blocked 7s TimeoutError at exactly 5.0s
same 7s call, socket timeout raised to 30s OK in 7.0s

The traceback ends in _ipc.py rather than naming the call that was made, which reads like a dead tab. It isn't — the daemon and tab are both fine, and the next call works.

2. full=True never returns when the window is hidden

full=True sets captureBeyondViewport, which needs a fresh composited frame for the whole scrollable area. A minimized or fully occluded window never produces one:

window state capture result
minimized viewport OK in 1.8s
minimized full=True still hanging past 2min, socket timeout raised to 90s
visible full=True OK in 0.4s

So it's a stall, not slowness — and it's invisible to anyone testing with the window on screen.

Measured on Windows 11 / Chrome 150 (Canary), harness at v0.1.8.

Note for maintainers

The 5s value is hard-coded and there's no way to raise it from a script without reaching past helpers._send into _ipc directly. If you'd take a patch making it configurable — an env var, or a per-call timeout= on cdp() — happy to follow up with one. I kept this PR docs-only since that's a behavioral change worth deciding separately.


Summary by cubic

Documented two screenshot timeouts/stalls: a hard 5s ceiling on all CDP calls due to _send() socket timeout=5.0, and full=True never returning when the window is minimized or fully hidden.
Adds guidance to raise the window or use viewport captures, and clarifies the TimeoutError from _ipc.py isn’t a dropped connection.

Written for commit 147dd6a. Summary will update on new commits.

Review in cubic

Two failure modes that both surface as an unexplained TimeoutError.

`_send()` opens its socket with `timeout=5.0`, so any CDP call needing
longer than five seconds dies. It is not screenshot-specific: a js()
expression blocked for 3s returns fine, the same one blocked for 7s
fails at exactly 5.0s, and succeeds when given a longer timeout. The
traceback ends in _ipc.py rather than naming the call that was made, so
it reads like a dropped connection instead of a slow operation.

Separately, `full=True` sets captureBeyondViewport, which needs a fresh
composited frame for the whole scrollable area. A minimized or fully
occluded window never produces one and the call never returns -- still
hanging past two minutes with the socket timeout raised to 90s.
Viewport-only capture on the same hidden window returns in ~2s, and the
same full-page capture takes <1s once the window is visible, so this is
a stall rather than slowness.

Measured on Windows 11 / Chrome 150.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B4CaXBAmveTDABUu8yXYoz
@browser-harness-review

Copy link
Copy Markdown

✅ Skill review passed

Reviewed 1 file(s) — no findings.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Re-trigger cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant