-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Closed
Labels
Description
FAQ
- Yes, my issue is not about variability or throttling.
- Yes, my issue is not about a specific accessibility audit (file with axe-core instead).
URL
Any URL
What happened?
Lighthouse report fails to generate when used along with the User Flow API, with the following error:
node_modules\lighthouse\lighthouse-core\fraggle-rock\config\validation.js:190
throw new Error(`could not find ${auditRef.id} audit for category ${categoryId}`);
^
Error: could not find uses-responsive-images-snapshot audit for category performance
To reproduce, simply import the startFlow function from lighthouse/lighthouse-core/fraggle-rock/api.js, and run normal lighthouse report
Simple repro:
const puppeteer = require("puppeteer");
const fs = require("fs");
const { startFlow } = require("lighthouse/lighthouse-core/fraggle-rock/api.js");
const lighthouse = require("lighthouse");
async function createReportWithBrowser(
page,
browser,
url,
options = { output: "html" }
) {
const endpoint = browser.wsEndpoint();
const endpointURL = new URL(endpoint);
return lighthouse(
url,
Object.assign(
{},
{
port: endpointURL.port,
},
options
)
);
}
async function measure() {
const browser = await puppeteer.launch({ args: ["--no-sandbox"] });
const page = await browser.newPage();
await page.setViewport({ width: 1440, height: 1080 });
await page.setUserAgent(
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36"
);
const result = await createReportWithBrowser(
page,
browser,
"https://www.google.com"
);
fs.writeFileSync(`lighthouse_report.html`, result.report, "utf-8");
}
measure().then(() => {
console.log("done");
});
If I remove the startFlow import, it starts working again. Is there a way to use the new User Flows API along with normal lighthouse reports?
What did you expect?
Lighthouse report generation without errors.
What have you tried?
No response
How were you running Lighthouse?
node
Lighthouse Version
8.6.0
Chrome Version
No response
Node Version
No response
OS
No response
Relevant log output
node_modules\lighthouse\lighthouse-core\fraggle-rock\config\validation.js:190
throw new Error(`could not find ${auditRef.id} audit for category ${categoryId}`);
^
Error: could not find uses-responsive-images-snapshot audit for category performance