-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
deps(puppeteer): upgrade to 9.1.1 #12284
Conversation
@@ -133,7 +132,7 @@ | |||
"cpy": "^7.0.1", | |||
"cross-env": "^7.0.2", | |||
"csv-validator": "^0.0.3", | |||
"devtools-protocol": "0.0.805376", | |||
"devtools-protocol": "0.0.863986", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i only upgraded in the hopes that the type error from session.js would be resolved, but it wasn't. might as well keep it tho?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, may as well. Similar change was made in #12199 but I don't know when we will be able to merge that (once timing issues are resolved).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If pptr is going to be the new way of doing things, can we align with their devtools-protocol
? That should eliminate this error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would put a limit on how soon we can adopt new protocol types: only as soon as Puppeteer does a release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree we can't let puppeteer types dictate when we update our version of the protocol, but maybe we can come up with a policy in the near future since we're hitching our wagon to puppeteer and we'll have to figure out an update cadence for that (and/or puppeteer-core) anyways (it makes sense to use its types since we'll use puppeteer as our protocol manager, but we're also deviating from puppeteer's suggested Chrome version policy, so the protocol types don't necessarily need to be what puppeteer ships with).
For just this change, though:
- we should avoid suppressing an error if there's not much downside to avoiding the error
- the protocol definitions are huge, and typescript has to compile and check both versions. Looking at the
tsc
diagnostics, it's an extra 18k types and (in totally unscientific testing) an extra second of type check time just for the doubled protocol file and comparison insession.js
. - we're updating the protocol definitions for non-pressing reasons after six months of no issues, so one-month old definitions seem fine to use for now (they still include everything core(fetcher): fetch over protocol #12199 will need)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree we can't let puppeteer types dictate when we update our version of the protocol ...
we should avoid suppressing an error if there's not much downside to avoiding the error
I don't understand how to take these two statements. If we drop devtools-protocol for puppeteer types, we are immediately tying ourselves to puppeteer. As soon as a change in the protocol comes in that we need (ex: the next Issue type), we are stuck unless Puppeteer updates in-sync.
If we want to move towards this we should ask Puppeteer if there's a way to make puppeteer use devtools-protocol
directly, then we could override the transitive dep in our package.json.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree we can't let puppeteer types dictate when we update our version of the protocol ...
we should avoid suppressing an error if there's not much downside to avoiding the error
I don't understand how to take these two statements.
can take them like:
I agree we can't let puppeteer types dictate when we update our version of the protocol, but maybe we can come up with a policy in the near future...
For just this change, though: we should avoid suppressing an error if there's not much downside to avoiding the error
:D
I'm not suggesting we give up protocol decisions to puppeteer as a policy going forward, I'm suggesting we use [email protected]
for this update in particular since that's what puppeteer 8 is using, there's no downsides to using that version, and it avoids the _session.send()
error for now.
request interception seems to be broken for XHR (fetch) ... bisected to v2.0.0 https://github.com/puppeteer/puppeteer/releases/tag/v2.0.0 . I don't think it is related to puppeteer code, it must be a regression in Chrome because using 1.19.0 but with latest Chrome/canary results in the same error :( broke somewhere here: |
@@ -133,7 +132,7 @@ | |||
"cpy": "^7.0.1", | |||
"cross-env": "^7.0.2", | |||
"csv-validator": "^0.0.3", | |||
"devtools-protocol": "0.0.805376", | |||
"devtools-protocol": "0.0.863986", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, may as well. Similar change was made in #12199 but I don't know when we will be able to merge that (once timing issues are resolved).
I bisected with this script (and using puppeteer v8):
But it immediately failed because |
Not sure if I missed this before, or if the newest version fixed something, but here's the error message I see now:
Setting a header fixed the tests. Searched briefly for why this change in behavior happened, but couldn't find anything. |
rimraf "^2.6.1" | ||
ws "^6.1.0" | ||
proxy-from-env "^1.1.0" | ||
rimraf "^3.0.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pssssst @brendankenny :)
ref #12145 (comment)
Wow, that's a lot of major version bumps.
I also removed the
@types
module, since puppeteer now has its own types.