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

clients(lr): modify puppeteer connector to work with new tab targets #15674

Merged
merged 2 commits into from
Dec 8, 2023

Conversation

connorjclark
Copy link
Collaborator

b/314831962

https://github.com/puppeteer/puppeteer/releases/tag/puppeteer-core-v21.4.0 modified how Puppeteer does target discovery, excluding the page targets and connecting to tab targets instead.

Our LR glue code to get a Puppeteer page was stalling at Puppeteer's CdpBrowser.create, in a "wait for initial targets" phase, since our target filter ended up excluding every target. Previously, it would correctly filter to just the "main" target, but that no longer happens (mainTargetInfo no longer matches any target id we see).

Instead, allow the Puppeteer connection to connect to all target types. With this change, LR now works w/ this Puppeteer version, and Smokerider is all green.

Additionally, it was pointed out that the relevant tab target / puppeteer Page may not exist by the time we are checking for it, so I modified the function to check multiple times (but w/ a 5s timeout).

@connorjclark connorjclark requested a review from a team as a code owner December 7, 2023 23:20
@connorjclark connorjclark requested review from adamraine and removed request for a team December 7, 2023 23:20
@connorjclark connorjclark merged commit 45c5370 into main Dec 8, 2023
29 checks passed
@connorjclark connorjclark deleted the lr-tab-target branch December 8, 2023 02:58
@paulirish
Copy link
Member

@connorjclark With your work here are we back to compatibility with latest pptr releases?

Also thanks!

@connorjclark
Copy link
Collaborator Author

yup, we all good

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

Successfully merging this pull request may close these issues.

None yet

4 participants