-
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
core(fetcher): ensure fetch doesn't cause unhandled promise #11036
Conversation
lighthouse-core/gather/fetcher.js
Outdated
|
||
this.driver.evaluateAsync(`${injectIframe}(${JSON.stringify(url)})`, { | ||
useIsolation: true, | ||
}).catch(err => console.error(err)); |
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.
should we bother logging this?
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.
why not just put it into a Promise.all([racePromise, injectPromise])
to get into the normal control flow?
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 don't see how. Send PR?
#11033 doesn't effect canary chrome or LR*. We should follow up with a 6.1.1 release just for npm. @patrickhulce and I don't know why Node 12 crashes on this error :o * still need to confirm. @mikedijkstra can you provide some more URLs where this crash occurs? |
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.
also need to add reject on errors on the two .sendCommand
that are dangling atm
a test would be nice for this, though I'm not entirely sure how to add one 🤔
maybe our super ancient sentry client is doing the exiting instead of node? we can probably just disable that and/or upgrade it
lighthouse-core/gather/fetcher.js
Outdated
|
||
this.driver.evaluateAsync(`${injectIframe}(${JSON.stringify(url)})`, { | ||
useIsolation: true, | ||
}).catch(err => console.error(err)); |
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.
why not just put it into a Promise.all([racePromise, injectPromise])
to get into the normal control flow?
yeah I don't know why it's exiting #11033 hasn't landed yet... |
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.
fix for the dangling sendCommand
too? I can't suggest on those, but basically in lines 110 and 131
this.driver.sendCommand(...).catch(reject)
Co-authored-by: Patrick Hulce <[email protected]>
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.
Co-authored-by: Patrick Hulce <[email protected]>
Co-authored-by: Patrick Hulce <[email protected]>
Fixes #11033