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

The final-screenshot audit extracts the last screenshot frame from Chrome's trace. If no screenshot frames exist in the trace and the run mode is not 'timespan' (where empty frames are acceptable and return notApplicable), Lighthouse throws a LighthouseError with code NO_SCREENSHOTS. This is flagged as an lhrRuntimeError, meaning it surfaces in the Lighthouse Result's runtimeError field. The audit cannot complete because the trace contains no visual frames to select a final screenshot from.

Source

Thrown at core/audits/final-screenshot.js:43

  /**
   * @param {LH.Artifacts} artifacts
   * @param {LH.Audit.Context} context
   * @return {Promise<LH.Audit.Product>}
   */
  static async audit(artifacts, context) {
    const trace = artifacts.Trace;
    const processedTrace = await ProcessedTrace.request(trace, context);
    const screenshots = await Screenshots.request(trace, context);
    const {timeOrigin} = processedTrace.timestamps;
    const finalScreenshot = screenshots[screenshots.length - 1];

    if (!finalScreenshot) {
      // If a timespan didn't happen to contain frames, that's fine. Just mark not applicable.
      if (artifacts.GatherContext.gatherMode === 'timespan') return {notApplicable: true, score: 1};

      // If it was another mode, that's a fatal error.
      throw new LighthouseError(LighthouseError.errors.NO_SCREENSHOTS);
    }

    return {
      score: 1,
      details: {
        type: 'screenshot',
        timing: Math.round((finalScreenshot.timestamp - timeOrigin) / 1000),
        timestamp: finalScreenshot.timestamp,
        data: finalScreenshot.datauri,
      },
    };
  }
}

export default FinalScreenshot;

View on GitHub (pinned to 9515cd4e58)

Solutions

  1. Manually open the target URL in Chrome and confirm visible content renders before first paint
  2. Update Chrome to a stable, compatible version (Lighthouse documents its supported Chrome range)
  3. In headless/CI environments, ensure --chrome-flags includes '--use-gl=swiftshader' or '--enable-gpu' for rendering
  4. Check if the page returns an error status or redirects to a blank page
  5. Retry the run — intermittent trace collection failures can occur under resource pressure

Example fix

# before
lighthouse https://example.com
# after (ensure GPU rendering in headless)
lighthouse https://example.com --chrome-flags="--use-gl=swiftshader --enable-webgl"
Defensive patterns

Strategy: fallback

Validate before calling

// Before running, verify Chrome can capture screenshots in the target environment
const { execSync } = require('child_process');
function verifyChromeScreenshotSupport(chromePath) {
  // Ensure Chrome version is compatible with Lighthouse
  const version = execSync(`"${chromePath}" --version`).toString();
  console.log('Chrome version:', version.trim());
  // In headless: ensure rendering flags are present
}

Try / catch

// When using the programmatic API, check the LHR for runtime errors
const result = await lighthouse(url, flags, config);
if (result.lhr.runtimeError && result.lhr.runtimeError.code === 'NO_SCREENSHOTS') {
  console.warn('No screenshots captured — retrying with rendering flags');
  flags.chromeFlags = (flags.chromeFlags || '') + ' --use-gl=swiftshader';
  // retry
}

Prevention

When it happens

Trigger: Running Lighthouse in navigation or snapshot mode against a page where Chrome's tracer produced zero screenshot events. This can happen when the page is blank, headless rendering fails to paint, the trace category for screenshots was excluded, or Chrome version incompatibilities prevent screenshot capture.

Common situations: Auditing a page that redirects to a blank page or errors out before first paint; headless Chrome configuration that disables screenshot capture; using a very old or very new Chrome version with trace format changes; running in environments where GPU compositing is disabled (some CI/Docker setups); pages with extremely fast redirects that prevent paint.

Related errors


AI-assisted analysis of GoogleChrome/lighthouse@9515cd4e58 (2026-08-13). Data as JSON: /api/errors/2677094397f9589d. Report an issue: GitHub.