Skip to content

fix: avoid CDP attachment when listing connected pages - #127

Open
mr-karan wants to merge 1 commit into
SawyerHood:mainfrom
mr-karan:fix/chromium-restricted-target-attach
Open

fix: avoid CDP attachment when listing connected pages#127
mr-karan wants to merge 1 commit into
SawyerHood:mainfrom
mr-karan:fix/chromium-restricted-target-attach

Conversation

@mr-karan

Copy link
Copy Markdown

Chromium's remote debugging setting can allow page control while rejecting Target.attachToTarget. browser.listPages() currently opens a page-level CDP session for every attached tab, so one rejected attachment makes the whole call fail.

This change uses stable, daemon-local page IDs for connected browsers. IDs returned by listPages() still work with getPage(id), stay scoped to the browser that produced them, and are removed when the page closes. Browsers launched by dev-browser continue to return their native CDP target IDs.

Tested with:

  • pnpm exec vitest run (155 tests)
  • pnpm run build
  • pnpm run format:check

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