Skip to content

Commit

Permalink
ignore protocol error from closing tab after Chrome has been killed
Browse files Browse the repository at this point in the history
  • Loading branch information
brendankenny committed Feb 1, 2017
1 parent 0a14015 commit 574f864
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lighthouse-core/gather/gather-runner.js
Expand Up @@ -105,8 +105,12 @@ class GatherRunner {
// We dont need to hold up the reporting for the reload/disconnect,
// so we will not return a promise in here.
log.log('status', 'Disconnecting from browser...');
driver.disconnect().catch(e => {
log.error('gather-runner disconnect', e);
driver.disconnect().catch(err => {
// Ignore disconnecting error if browser was already closed.
// See https://github.com/GoogleChrome/lighthouse/issues/1583
if (!(/close\/.*status: 500$/.test(err.message))) {
log.error('GatherRunner disconnect', err.message);
}
});
}

Expand Down

0 comments on commit 574f864

Please sign in to comment.