-
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
Can't reuse chrome-canary instance between lighthouse runs #14736
Comments
Also, if anyone has some extra time to explain, would someone mind explaining to me what Fraggle Rock is? I don't see it defined here, and although I see it referenced everywhere, I have a hard time understanding what it is. |
TLDR try out a dev release which should make this work.
I don't personally know the exact reasoning but I imagine it was a design feature that just stuck because Lighthouse was only interested in testing a single navigation in isolation (@paulirish is this correct?). In any case, Lighthouse has evolved a lot which brings me to your second question...
It started off as a mostly internal project name for adding user flow support (#11313), but it also includes several changes to the classic Lighthouse API that are relevant for your use case. One of these changes to the classic API was that we would create a new tab in the browser for every Lighthouse run, which should make your use case possible. This change hasn't been officially released yet but you can test it out in one of our dev releases. |
Previously, it was set to reuse them to save time. Sometime between Christmas and now, the chrome people changed something in chrome (or chrome devtools protocol) that makes it so that lighthouse can no longer reuse chrome instances. When I got back it just stopped working (I didn't change the lighthouse version but chrome probably auto-updated). [I opened an issue on lighthouse](GoogleChrome/lighthouse#14736), but there does not seem to be an easy resolution (other than that their @next version works). I am reluctant to make lighthouse-parade dependent on the lighthouse prerelease version. So, for now, each chrome instance is used once and then thrown away.
FAQ
URL
https://github.com (irrelevant, happens with any url)
What happened?
I am not sure if this is a bug, or something that was never supposed to work, previously did, but doesn't now.
This is something that worked previously (Dec. 2022) and doesn't work now. I did not change the lighthouse version (it is and was 9.6.8), but it is possible/likely that chrome-canary updated since then.
I would like to reuse the chrome-canary instance between runs of lighthouse on different pages.
What did you expect?
I expect it to run lighthouse on the first page, then run lighthouse on the 2nd page.
Here is what happens (this error message appears after running the first lighthouse report; during the 2nd lighthouse call:
I see that @paulirish has removed the code that displays this error message, but it looks like that change hasn't been released:
https://github.com/GoogleChrome/lighthouse/pull/14012/files
If I apply Paul's change to that file in my node_modules (commenting out the catch clause), this is the error I get instead:
Can you clarify whether it is intended to be possible to reuse a chrome instance between lighthouse runs like this, and if not, can the error message be updated to be more clear?
What have you tried?
No response
How were you running Lighthouse?
node
Lighthouse Version
9.6.8
Chrome Version
112.0.5566.0 (Official Build) canary (x86_64)
Node Version
Node.js v18.3.0
OS
Mac
Relevant log output
No response
The text was updated successfully, but these errors were encountered: