{"record":{"id":"2677094397f9589d","repo":"GoogleChrome/lighthouse","slug":"no-screenshots","errorCode":"NO_SCREENSHOTS","errorMessage":"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})","messagePattern":"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\\. \\((.+?)\\)","errorType":"exception","errorClass":"LighthouseError","httpStatus":null,"severity":"error","filePath":"core/audits/final-screenshot.js","lineNumber":43,"sourceCode":"\n  /**\n   * @param {LH.Artifacts} artifacts\n   * @param {LH.Audit.Context} context\n   * @return {Promise<LH.Audit.Product>}\n   */\n  static async audit(artifacts, context) {\n    const trace = artifacts.Trace;\n    const processedTrace = await ProcessedTrace.request(trace, context);\n    const screenshots = await Screenshots.request(trace, context);\n    const {timeOrigin} = processedTrace.timestamps;\n    const finalScreenshot = screenshots[screenshots.length - 1];\n\n    if (!finalScreenshot) {\n      // If a timespan didn't happen to contain frames, that's fine. Just mark not applicable.\n      if (artifacts.GatherContext.gatherMode === 'timespan') return {notApplicable: true, score: 1};\n\n      // If it was another mode, that's a fatal error.\n      throw new LighthouseError(LighthouseError.errors.NO_SCREENSHOTS);\n    }\n\n    return {\n      score: 1,\n      details: {\n        type: 'screenshot',\n        timing: Math.round((finalScreenshot.timestamp - timeOrigin) / 1000),\n        timestamp: finalScreenshot.timestamp,\n        data: finalScreenshot.datauri,\n      },\n    };\n  }\n}\n\nexport default FinalScreenshot;\n","sourceCodeStart":25,"sourceCodeEnd":59,"githubUrl":"https://github.com/GoogleChrome/lighthouse/blob/9515cd4e58ebed69f78742d932b501c2cab8ad8f/core/audits/final-screenshot.js#L25-L59","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Manually open the target URL in Chrome and confirm visible content renders before first paint","Update Chrome to a stable, compatible version (Lighthouse documents its supported Chrome range)","In headless/CI environments, ensure --chrome-flags includes '--use-gl=swiftshader' or '--enable-gpu' for rendering","Check if the page returns an error status or redirects to a blank page","Retry the run — intermittent trace collection failures can occur under resource pressure"],"exampleFix":"# before\nlighthouse https://example.com\n# after (ensure GPU rendering in headless)\nlighthouse https://example.com --chrome-flags=\"--use-gl=swiftshader --enable-webgl\"","handlingStrategy":"fallback","validationCode":"// Before running, verify Chrome can capture screenshots in the target environment\nconst { execSync } = require('child_process');\nfunction verifyChromeScreenshotSupport(chromePath) {\n  // Ensure Chrome version is compatible with Lighthouse\n  const version = execSync(`\"${chromePath}\" --version`).toString();\n  console.log('Chrome version:', version.trim());\n  // In headless: ensure rendering flags are present\n}","typeGuard":null,"tryCatchPattern":"// When using the programmatic API, check the LHR for runtime errors\nconst result = await lighthouse(url, flags, config);\nif (result.lhr.runtimeError && result.lhr.runtimeError.code === 'NO_SCREENSHOTS') {\n  console.warn('No screenshots captured — retrying with rendering flags');\n  flags.chromeFlags = (flags.chromeFlags || '') + ' --use-gl=swiftshader';\n  // retry\n}","preventionTips":["Ensure Chrome can render by adding --use-gl=swiftshader in headless/CI environments","Confirm the target page has visible content that paints before the audit completes","Use a Chrome version within Lighthouse's supported range","Avoid auditing pages that immediately redirect to blank or error pages"],"tags":["runtime","chrome","screenshots","trace","headless"],"backgroundTag":null,"analyzedSha":"9515cd4e58ebed69f78742d932b501c2cab8ad8f","analyzedAt":"2026-08-13T06:28:10.346Z","schemaVersion":2},"datasetVersion":"2026-08-13T09:17:06.757Z"}