Skip to content

fix: allow delayed auto-connect DevTools handshake#1368

Open
SUSINDRAREDDY wants to merge 1 commit into
vercel-labs:mainfrom
SUSINDRAREDDY:fix-auto-connect-delayed-devtools
Open

fix: allow delayed auto-connect DevTools handshake#1368
SUSINDRAREDDY wants to merge 1 commit into
vercel-labs:mainfrom
SUSINDRAREDDY:fix-auto-connect-delayed-devtools

Conversation

@SUSINDRAREDDY
Copy link
Copy Markdown

Summary

  • extend the direct DevTools WebSocket verification window used by --auto-connect
  • keep the active-port WebSocket path preferred before HTTP discovery
  • add a regression test for delayed WebSocket handshakes, matching Chrome remote-debugging permission approval latency

Fixes #1365.

Verification

  • cargo test --manifest-path cli/Cargo.toml native::cdp::chrome::tests::
  • cargo fmt --manifest-path cli/Cargo.toml -- --check
  • cargo clippy --manifest-path cli/Cargo.toml --all-targets -- -D warnings
  • git diff --check

Copilot AI review requested due to automatic review settings May 15, 2026 19:27
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 15, 2026

@SUSINDRAREDDY is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Extends the WebSocket verification timeout used by --auto-connect from 2 seconds to 30 seconds so users have enough time to approve Chrome's remote-debugging permission prompt (#1365).

Changes:

  • Introduce AUTO_CONNECT_WS_VERIFY_TIMEOUT constant (30s) and pass it through to verify_ws_endpoint.
  • Make verify_ws_endpoint accept the timeout as a parameter instead of a hardcoded 2s value.
  • Add a regression test simulating a delayed (~2.2s) handshake.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

--auto-connect fails too quickly when Chrome asks for remote debugging permission

2 participants