GoogleChrome/lighthouse · error · LighthouseError
NO_SCREENSHOTS
NO_SCREENSHOTS
Error message
Chrome didn't collect any screenshots during the page load. Please make sure there is content visible on the page, and then try re-running Lighthouse. ({errorCode}) What it means
Thrown as a LighthouseError with code NO_SCREENSHOTS from Speedline.compute_() when the underlying speedline library rejects with a message matching /No screenshots found in trace/. This means Chrome did not capture any screenshot frames during the page load, so the Speed Index and Visual Progress metrics cannot be computed. The error is caught from speedline's promise rejection and re-thrown as a structured LighthouseError.
Source
Thrown at core/computed/speedline.js:36
*/
static async compute_(trace, context) {
// speedline() may throw without a promise, so we resolve immediately
// to get in a promise chain.
return ProcessedTrace.request(trace, context).then(processedTrace => {
// Use a shallow copy of traceEvents so speedline can sort as it pleases.
// See https://github.com/GoogleChrome/lighthouse/issues/2333
const traceEvents = trace.traceEvents.slice();
// Force use of timeOrigin as reference point for speedline
// See https://github.com/GoogleChrome/lighthouse/issues/2095
const timeOrigin = processedTrace.timestamps.timeOrigin;
return speedline(traceEvents, {
timeOrigin,
fastMode: true,
include: 'speedIndex',
});
}).catch(err => {
if (/No screenshots found in trace/.test(err.message)) {
throw new LighthouseError(LighthouseError.errors.NO_SCREENSHOTS);
}
throw err;
}).then(speedline => {
if (speedline.frames.length === 0) {
throw new LighthouseError(LighthouseError.errors.NO_SPEEDLINE_FRAMES);
}
if (speedline.speedIndex === 0) {
throw new LighthouseError(LighthouseError.errors.SPEEDINDEX_OF_ZERO);
}
return speedline;
});
}
}
const SpeedlineComputed = makeComputedArtifact(Speedline, null);View on GitHub (pinned to 9515cd4e58)
Solutions
- Use --headless=new (new headless mode) or run Chrome in headed mode to ensure screenshot capture
- If collecting traces manually, include the 'disabled-by-default-devtools.screenshot' trace category
- Ensure the page actually renders visible content during the trace window
- Re-run the audit — screenshot capture can occasionally fail transiently
Defensive patterns
Strategy: try-catch
Validate before calling
// Pre-check trace for screenshot events before requesting Speedline
function hasScreenshotEvents(trace) {
return trace.traceEvents.some(e => e.name === 'Screenshot' || e.cat?.includes('screenshot'));
}
if (!hasScreenshotEvents(trace)) {
// No screenshots — Speed Index unavailable
return { notApplicable: true };
} Try / catch
try {
const speedline = await Speedline.request(trace, context);
} catch (e) {
if (e instanceof LighthouseError && e.code === 'NO_SCREENSHOTS') {
// No screenshots in trace — Speed Index not available
return { notApplicable: true, reason: 'NO_SCREENSHOTS' };
}
throw e;
} Prevention
- Use --headless=new or headed Chrome to ensure screenshot capture
- Include 'disabled-by-default-devtools.screenshot' in trace categories for manual collection
- Ensure the page renders visible content during the trace window
- Re-run audits on transient screenshot capture failures
When it happens
Trigger: Speedline.request() calls the speedline() function with trace events. If speedline finds zero screenshot events in the trace data, it rejects with 'No screenshots found in trace', which the .catch handler at line 36 matches and converts to a LighthouseError with NO_SCREENSHOTS.
Common situations: Running Lighthouse in headless mode without screenshot support (--headless=old suppressed screenshots). Chrome configured to disable the screenshot trace category. A page that loads with no visible content (blank/white). Traces collected with custom trace category configurations that omit 'disabled-by-default-devtools.screenshot'.
Related errors
AI-assisted analysis of GoogleChrome/lighthouse@9515cd4e58 (2026-08-13).
Data as JSON: /api/errors/9ffa3d75ef66e006.
Report an issue: GitHub.