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
feat: use CDP's auto-attach mechanism #8520
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OrKoN
force-pushed
the
waitForDebugger
branch
6 times, most recently
from
June 15, 2022 10:59
c96f7f6
to
5eaa531
Compare
OrKoN
force-pushed
the
waitForDebugger
branch
23 times, most recently
from
June 28, 2022 09:16
a0cec05
to
a6a59a5
Compare
OrKoN
changed the title
chore: wip waitForDebugger auto-attach
feat: use CDP's auto-attach mechanism
Jun 28, 2022
OrKoN
added a commit
that referenced
this pull request
Jul 22, 2022
* feat: use CDP's auto-attach mechanism In this PR, we refactor Puppeteer to make use of the CDP's auto-attach mechanism. This allows the backend to pause new targets and give Puppeteer a chance to configure them properly. This fixes the flakiness related to dealing with OOPIFs and should fix some other issues related to the network interception and navigations. If those are not fixed completely by this PR, the PR serves a solid base for fixing them. Closes #8507, #7990 Unlocks #3667 BREAKING CHANGE: With Chromium, Puppeteer will now attach to page/iframe targets immediately. Browser.connect requires an explicit product name when connecting to Firefox since Firefox does not support CDP's auto-attach.
OrKoN
added a commit
that referenced
this pull request
Aug 2, 2022
This PR implements automatic detection of the Firefox product when the `.connect()` method is used. This partially undoes the breaking change in #8520 but it's also a breaking change on its own since we don't accept an explicit product name anymore (it does not look like it was used anyway).
This was referenced Aug 2, 2022
jrandolf
pushed a commit
that referenced
this pull request
Aug 2, 2022
* feat: use CDP's auto-attach mechanism In this PR, we refactor Puppeteer to make use of the CDP's auto-attach mechanism. This allows the backend to pause new targets and give Puppeteer a chance to configure them properly. This fixes the flakiness related to dealing with OOPIFs and should fix some other issues related to the network interception and navigations. If those are not fixed completely by this PR, the PR serves a solid base for fixing them. Closes #8507, #7990 Unlocks #3667 BREAKING CHANGE: With Chromium, Puppeteer will now attach to page/iframe targets immediately to allow reliable configuration of targets.
jrandolf
pushed a commit
that referenced
this pull request
Aug 2, 2022
This PR implements automatic detection of the Firefox product when the `.connect()` method is used. This partially undoes the breaking change in #8520 but it's also a breaking change on its own since we don't accept an explicit product name anymore (it does not look like it was used anyway).
OrKoN
added a commit
that referenced
this pull request
Sep 13, 2022
With #8520 Puppeteer is now aware of all targets it connects to. In order to have a not flaky init, Puppeteer waits for all existing targets to be configured during the connection process. This does not work well in case of concurrent connections because while one connection might initializing a target the other one might be closed it. In general, that is expected because we can only be eventually consistent about the target state but we also should not crash the init if some targets have been closed. This PR implements checks to see if the errors are caused by the target or session closures and supresses them if it's the case.
OrKoN
added a commit
that referenced
this pull request
Sep 13, 2022
With #8520 Puppeteer is now aware of all targets it connects to. In order to have a not flaky init, Puppeteer waits for all existing targets to be configured during the connection process. This does not work well in case of concurrent connections because while one connection might initializing a target the other one might be closed it. In general, that is expected because we can only be eventually consistent about the target state but we also should not crash the init if some targets have been closed. This PR implements checks to see if the errors are caused by the target or session closures and supresses them if it's the case.
OrKoN
added a commit
that referenced
this pull request
Sep 13, 2022
With #8520 Puppeteer is now aware of all targets it connects to. In order to have a not flaky init, Puppeteer waits for all existing targets to be configured during the connection process. This does not work well in case of concurrent connections because while one connection might initializing a target the other one might be closed it. In general, that is expected because we can only be eventually consistent about the target state but we also should not crash the init if some targets have been closed. This PR implements checks to see if the errors are caused by the target or session closures and supresses them if it's the case.
OrKoN
added a commit
that referenced
this pull request
Sep 14, 2022
With #8520 Puppeteer is now aware of all targets it connects to. In order to have a not flaky init, Puppeteer waits for all existing targets to be configured during the connection process. This does not work well in case of concurrent connections because while one connection might initializing a target the other one might be closed it. In general, that is expected because we can only be eventually consistent about the target state but we also should not crash the init if some targets have been closed. This PR implements checks to see if the errors are caused by the target or session closures and supresses them if it's the case.
OrKoN
added a commit
that referenced
this pull request
Sep 14, 2022
With #8520 Puppeteer is now aware of all targets it connects to. In order to have a not flaky init, Puppeteer waits for all existing targets to be configured during the connection process. This does not work well in case of concurrent connections because while one connection might initializing a target the other one might be closed it. In general, that is expected because we can only be eventually consistent about the target state but we also should not crash the init if some targets have been closed. This PR implements checks to see if the errors are caused by the target or session closures and supresses them if it's the case.
jrandolf
pushed a commit
that referenced
this pull request
Sep 15, 2022
With #8520 Puppeteer is now aware of all targets it connects to. In order to have a not flaky init, Puppeteer waits for all existing targets to be configured during the connection process. This does not work well in case of concurrent connections because while one connection might initializing a target the other one might be closed it. In general, that is expected because we can only be eventually consistent about the target state but we also should not crash the init if some targets have been closed. This PR implements checks to see if the errors are caused by the target or session closures and suppresses them if it's the case.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In this PR, we refactor Puppeteer to make use of the CDP's auto-attach mechanism. This allows the backend to pause
new targets and give Puppeteer a chance to configure them properly. This fixes the flakiness related to dealing with
OOPIFs and should fix some other issues related to the network interception and navigations. If those are not fixed completely by this PR, the PR serves a solid base for fixing them.
Closes #8507, #7990
Unlocks #3667
BEGIN_COMMIT_OVERRIDE
feat: use CDP's auto-attach mechanism
BREAKING CHANGE: With Chromium, Puppeteer will now attach to page/iframe targets immediately to allow reliable configuration of targets.
END_COMMIT_OVERRIDE
BREAKING CHANGE: With Chromium, Puppeteer will now attach to page/iframe targets immediately to allow reliable configuration of targets.