Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: subscribing to specific CDP events does not work for user-facing CDP sessions #2422

Open
OrKoN opened this issue Jul 17, 2024 · 1 comment
Labels
enhancement New feature or request P3

Comments

@OrKoN
Copy link
Collaborator

OrKoN commented Jul 17, 2024

Puppeteer allows creating custom CDP sessions via page.createCDPSession(). The user gets direct access to the raw session this way. Currently, bidi+ requires subscribing to individual cdp events or the entire CDP module (per browsing context), but the session ultimately gives access to sub-sessions which might not be browsing contexts at all. The ideal solution would be to forward all events on CDP sessions not owned by chromium-bidi implementation because the CDP session itself is responsible for enabling CDP domains and does not need a WebDriver event configuration.

cc @sadym-chromium @Lightning00Blade

@OrKoN
Copy link
Collaborator Author

OrKoN commented Jul 17, 2024

To support this, we should listen for CDP events on the browserCdpClient and emit the bidi+ event for all external (unknown) session IDs on the mapper server's CDP connection.

Alternative design we might consider for Puppeteer is to stop using bidi+ for user-facing CDP sessions and instead create a second browser-level CDP connection for these use cases omitting the mapper. cc @Lightning00Blade

@OrKoN OrKoN added enhancement New feature or request P3 labels Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P3
Projects
None yet
Development

No branches or pull requests

1 participant