Skip to content

fix: validate local Chrome probe#522

Open
ShiroKSH wants to merge 1 commit into
browser-use:mainfrom
ShiroKSH:fix/validate-chrome-probe
Open

fix: validate local Chrome probe#522
ShiroKSH wants to merge 1 commit into
browser-use:mainfrom
ShiroKSH:fix/validate-chrome-probe

Conversation

@ShiroKSH

@ShiroKSH ShiroKSH commented Jul 14, 2026

Copy link
Copy Markdown

Summary

  • Validate the response from the local DevTools endpoint before treating it as Chrome.
  • Cover invalid HTTP payloads and a valid DevTools WebSocket response.

Root cause

Any HTTP 200 response on ports 9222 or 9223 blocked cloud auto-bootstrap, even when the service was not a CDP browser.

Checks

  • uv run --with pytest pytest tests/unit/test_run.py -q
  • git diff --check

Summary by cubic

Validate the local DevTools endpoint before treating it as Chrome by checking /json/version for a non-empty webSocketDebuggerUrl. Fixes false positives from services on ports 9222/9223 that blocked cloud auto-bootstrap.

  • Bug Fixes
    • Parse JSON from /json/version; require webSocketDebuggerUrl to be a non-empty string.
    • Ignore non-JSON or invalid payloads; catch OSError, TypeError, and ValueError.
    • Add unit tests to reject invalid responses and accept a valid DevTools response.

Written for commit fdf433c. Summary will update on new commits.

Review in cubic

@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 2 files

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