Skip to content

Commit

Permalink
core: suppress protocol timeout for app manifest bug in LR (#7184)
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjclark authored and paulirish committed Feb 8, 2019
1 parent c4313e7 commit 5c0483c
Showing 1 changed file with 14 additions and 1 deletion.
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

0 comments on commit 5c0483c

Please sign in to comment.