GoogleChrome / GoogleChrome/lighthouse
Custom gatherer not executed
- Dominant language
- JavaScript
- Stars
- 30.8k
- Forks
- 9.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 20
Description
Hey there,
I'm trying to create a custom gatherer that is executed when Lighthouse is running.
I have the following setup:
```js
const chrome = await launch({
chromeFlags: ["--headless"],
});
const result = await lighthouse(
"https://www.example.com",
{
port: chrome.port,
logLevel: "warn",
output: "json",
},
{
extends: "lighthouse:default",
artifacts: [
{
id: "my-artifact",
gatherer: "./custom-gatherer.js",
},
]
}
```
I see that the gatherer file is loaded but not executed.
As soon as I remove the `extends: "lighthouse:default"`, it's running.
Is this intended?
Another thing I noticed:
Even if I load the full config (instead of just doing `extends: "lighthouse:default"`), it's not running. The only way I made it work was to create a fake audit with a fake category, only then, the gatherer was running.
Appreciate any points or insights, it would be great to avoid the fake audit/category!
Contributor guide
Research direction
Start with the provided Lighthouse configuration, `custom-gatherer.js`, and the behavior of `extends: "lighthouse:default"`; compare it with the full config and the fake audit/category workaround. Confirm that a custom gatherer is executed without requiring a fake audit or category, and add or update coverage for that configuration path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- devtools, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100