-
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: suppress protocol timeout for app manifest bug in LR #7184
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -423,9 +423,20 @@ class GatherRunner { | |
* @return {Promise<LH.Artifacts.Manifest|null>} | ||
*/ | ||
static async getWebAppManifest(passContext) { | ||
const response = await passContext.driver.getAppManifest(); | ||
if (!response) return null; | ||
return manifestParser(response.data, response.url, passContext.url); | ||
try { | ||
const response = await passContext.driver.getAppManifest(); | ||
if (response) return manifestParser(response.data, response.url, passContext.url); | ||
} catch (err) { | ||
// LR will timeout fetching the app manifest in some cases | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
maybe just add ", move on without one." to this line, delete the lines after this, and link to the full |
||
// for example, long polling (http://uninterested-badge.surge.sh/index4.html) | ||
// or web workers (rarely https://exterkamp.codes/) | ||
// see #7147 or b/124008171 | ||
// instead of failing completely by throwing a protocol timeout error, | ||
// just pretend there is no app manifest. | ||
log.error('Failed fetching manifest', err); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. need a |
||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should the catch only apply for a |
||
|
||
return null; | ||
} | ||
|
||
/** | ||
|
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.
this should move below the catch so we aren't accidentally hiding errors in the parser