{"record":{"id":"9ffa3d75ef66e006","repo":"GoogleChrome/lighthouse","slug":"no-screenshots-9ffa3d","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/computed/speedline.js","lineNumber":36,"sourceCode":"   */\n  static async compute_(trace, context) {\n    // speedline() may throw without a promise, so we resolve immediately\n    // to get in a promise chain.\n    return ProcessedTrace.request(trace, context).then(processedTrace => {\n      // Use a shallow copy of traceEvents so speedline can sort as it pleases.\n      // See https://github.com/GoogleChrome/lighthouse/issues/2333\n      const traceEvents = trace.traceEvents.slice();\n      // Force use of timeOrigin as reference point for speedline\n      // See https://github.com/GoogleChrome/lighthouse/issues/2095\n      const timeOrigin = processedTrace.timestamps.timeOrigin;\n      return speedline(traceEvents, {\n        timeOrigin,\n        fastMode: true,\n        include: 'speedIndex',\n      });\n    }).catch(err => {\n      if (/No screenshots found in trace/.test(err.message)) {\n        throw new LighthouseError(LighthouseError.errors.NO_SCREENSHOTS);\n      }\n\n      throw err;\n    }).then(speedline => {\n      if (speedline.frames.length === 0) {\n        throw new LighthouseError(LighthouseError.errors.NO_SPEEDLINE_FRAMES);\n      }\n\n      if (speedline.speedIndex === 0) {\n        throw new LighthouseError(LighthouseError.errors.SPEEDINDEX_OF_ZERO);\n      }\n\n      return speedline;\n    });\n  }\n}\n\nconst SpeedlineComputed = makeComputedArtifact(Speedline, null);","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/GoogleChrome/lighthouse/blob/9515cd4e58ebed69f78742d932b501c2cab8ad8f/core/computed/speedline.js#L18-L54","documentation":"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.","triggerScenarios":"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.","commonSituations":"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'.","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"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Pre-check trace for screenshot events before requesting Speedline\nfunction hasScreenshotEvents(trace) {\n  return trace.traceEvents.some(e => e.name === 'Screenshot' || e.cat?.includes('screenshot'));\n}\nif (!hasScreenshotEvents(trace)) {\n  // No screenshots — Speed Index unavailable\n  return { notApplicable: true };\n}","typeGuard":null,"tryCatchPattern":"try {\n  const speedline = await Speedline.request(trace, context);\n} catch (e) {\n  if (e instanceof LighthouseError && e.code === 'NO_SCREENSHOTS') {\n    // No screenshots in trace — Speed Index not available\n    return { notApplicable: true, reason: 'NO_SCREENSHOTS' };\n  }\n  throw e;\n}","preventionTips":["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"],"tags":["speedline","screenshots","trace","performance","metrics"],"backgroundTag":null,"analyzedSha":"9515cd4e58ebed69f78742d932b501c2cab8ad8f","analyzedAt":"2026-08-13T06:28:10.346Z","schemaVersion":2},"datasetVersion":"2026-08-13T09:17:06.757Z"}