-
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
Intermittent connection reset events #1931
Comments
+1, We only poll for Chrome to be ready when we launch it ourselves, but would be nice to support this for passed in ports too with a reasonable timeout. |
We can easily replace |
at the moment waitUntilReady is configured to retry 10 and poll on an interval of 500ms but we can easily make the retry count editable to support skip-autolaunch |
Also seeing this on Mac when running const launcher = new ChromeLauncher({port: 9222, additionalFlags: [ '--headless']});
launcher.run()
.then(() => lighthouse(url, flags))
.then(results => {
return new Promise(resolve => {
setTimeout(() => {
resolve(results);
}, 10); // Introduce slight delay before killing Chrome.
});
})
.then(results => launcher.kill().then(() => results))
.catch(err => {
return launcher.kill().then(() => {
throw err;
});
}); |
Can likely dupe to ECONNECTREFUSED bug.. and resolved with https://github.com/GoogleChrome/lighthouse/compare/browserws |
Nearly certain this is fixed by now. Launcher is a lot more robust. Holler if its still an issue. :) |
It seems to only impact Windows but connecting to an already-running Chrome instance sometimes throws:
It always throws at the same point and time (when initially connecting) and sometimes adding a delay before running lighthouse helps but sometimes not.
Right now WebPageTest polls the /json dev tools interface waiting for the browser to become available before launching lighthouse (otherwise it gets the same error reliably).
It might be worthwhile to add some redundancy to the initial connection establishment when passed an explicit port and retry for several seconds until it is successfully connected.
The text was updated successfully, but these errors were encountered: