{"record":{"id":"adb1b6468204a3a7","repo":"GoogleChrome/lighthouse","slug":"no-lcp-all-frames","errorCode":"NO_LCP_ALL_FRAMES","errorMessage":"The page did not display content that qualifies as a Largest Contentful Paint (LCP). Ensure the page has a valid LCP element and then try again. ({errorCode})","messagePattern":"The page did not display content that qualifies as a Largest Contentful Paint \\(LCP\\)\\. Ensure the page has a valid LCP element and then try again\\. \\((.+?)\\)","errorType":"exception","errorClass":"LighthouseError","httpStatus":null,"severity":"error","filePath":"core/computed/metrics/largest-contentful-paint-all-frames.js","lineNumber":31,"sourceCode":"import {LighthouseError} from '../../lib/lh-error.js';\n\nclass LargestContentfulPaintAllFrames extends NavigationMetric {\n  /**\n   * TODO: Simulate LCP all frames in lantern.\n   * @return {Promise<LH.Artifacts.LanternMetric>}\n   */\n  static async computeSimulatedMetric() {\n    throw new Error('LCP All Frames not implemented in lantern');\n  }\n\n  /**\n   * @param {LH.Artifacts.NavigationMetricComputationData} data\n   * @return {Promise<LH.Artifacts.Metric>}\n   */\n  static async computeObservedMetric(data) {\n    const {processedNavigation} = data;\n    if (processedNavigation.timings.largestContentfulPaintAllFrames === undefined) {\n      throw new LighthouseError(LighthouseError.errors.NO_LCP_ALL_FRAMES);\n    }\n\n    return {\n      timing: processedNavigation.timings.largestContentfulPaintAllFrames,\n      timestamp: processedNavigation.timestamps.largestContentfulPaintAllFrames,\n    };\n  }\n}\n\nconst LargestContentfulPaintAllFramesComputed = makeComputedArtifact(\n  LargestContentfulPaintAllFrames,\n  ['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL', 'SourceMaps', 'HostDPR']\n);\nexport {LargestContentfulPaintAllFramesComputed as LargestContentfulPaintAllFrames};\n","sourceCodeStart":13,"sourceCodeEnd":46,"githubUrl":"https://github.com/GoogleChrome/lighthouse/blob/9515cd4e58ebed69f78742d932b501c2cab8ad8f/core/computed/metrics/largest-contentful-paint-all-frames.js#L13-L46","documentation":"Thrown as a LighthouseError with code NO_LCP_ALL_FRAMES when computeObservedMetric() for LargestContentfulPaintAllFrames finds that processedNavigation.timings.largestContentfulPaintAllFrames is undefined. This is the all-frames variant of the standard NO_LCP error — it means no LCP candidate was found across any frame (including iframes) in the page. The all-frames metric requires Chrome to have reported LCP for the entire frame tree.","triggerScenarios":"Calling LargestContentfulPaintAllFrames.request() in observed mode on a trace where no frame emitted an LCP event. This occurs on pages with no visible content, pages in hidden/background tabs, or when Chrome version does not support cross-frame LCP reporting.","commonSituations":"Auditing pages that are entirely behind authentication with no rendered content. Headless Chrome runs where paint events are suppressed. Older Chrome versions that don't fully support LCP across all frames. Pages where all content is in iframes that load after the trace window closes.","solutions":["Ensure visible content renders above the fold in the main frame or a child frame before the trace ends","Use a recent Chrome version (90+) that fully supports LCP all-frames reporting","Avoid running Lighthouse in headless mode if paint events are being suppressed, or use --headless=new","If iframes are lazy-loaded, consider whether the trace window captures their paint events"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Pre-check LCP all-frames timing before requesting the metric\nconst processedNavigation = await ProcessedNavigation.request(trace, context);\nif (processedNavigation.timings.largestContentfulPaintAllFrames === undefined) {\n  // No all-frames LCP — skip metric computation\n  return { timing: undefined };\n}","typeGuard":"/** @type {(nav: LH.Artifacts.ProcessedNavigation) => boolean} */\nfunction hasLCPAllFrames(nav) {\n  return typeof nav.timings.largestContentfulPaintAllFrames === 'number';\n}","tryCatchPattern":"try {\n  const lcp = await LargestContentfulPaintAllFrames.request(data, context);\n} catch (e) {\n  if (e instanceof LighthouseError && e.code === 'NO_LCP_ALL_FRAMES') {\n    // No LCP across any frame — metric not applicable\n    return { notApplicable: true };\n  }\n  throw e;\n}","preventionTips":["Ensure visible content renders in at least one frame during the trace","Use Chrome 90+ for reliable cross-frame LCP reporting","Use --headless=new or headed mode to preserve paint events","Pre-check processedNavigation.timings.largestContentfulPaintAllFrames before requesting the metric"],"tags":["lcp","trace","performance","metrics","all-frames"],"backgroundTag":null,"analyzedSha":"9515cd4e58ebed69f78742d932b501c2cab8ad8f","analyzedAt":"2026-08-13T06:28:10.346Z","schemaVersion":2},"datasetVersion":"2026-08-13T09:17:06.757Z"}