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

core: suppress protocol timeout for app manifest bug in LR #7184

Merged
merged 4 commits into from
Feb 8, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion lighthouse-core/gather/driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,20 @@ class Driver {
*/
async getAppManifest() {
this.setNextProtocolTimeout(3000);
const response = await this.sendCommand('Page.getAppManifest');
let response;
try {
response = await this.sendCommand('Page.getAppManifest');
} catch (err) {
if (err.code === 'PROTOCOL_TIMEOUT') {
// LR will timeout fetching the app manifest in some cases, move on without one.
// https://github.com/GoogleChrome/lighthouse/issues/7147#issuecomment-461210921
log.error('Driver', 'Failed fetching manifest', err);
return null;
}

throw err;
}

let data = response.data;

// We're not reading `response.errors` however it may contain critical and noncritical
Expand Down