{"record":{"id":"28fb0f16582db0a9","repo":"GoogleChrome/lighthouse","slug":"lcp-all-frames-not-implemented-in-lantern","errorCode":null,"errorMessage":"LCP All Frames not implemented in lantern","messagePattern":"LCP All Frames not implemented in lantern","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"core/computed/metrics/largest-contentful-paint-all-frames.js","lineNumber":21,"sourceCode":" * Copyright 2020 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Computed Largest Contentful Paint (LCP) for all frames.\n */\n\nimport {makeComputedArtifact} from '../computed-artifact.js';\nimport {NavigationMetric} from './navigation-metric.js';\nimport {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}","sourceCodeStart":3,"sourceCodeEnd":39,"githubUrl":"https://github.com/GoogleChrome/lighthouse/blob/9515cd4e58ebed69f78742d932b501c2cab8ad8f/core/computed/metrics/largest-contentful-paint-all-frames.js#L3-L39","documentation":"Thrown as a plain Error from LargestContentfulPaintAllFrames.computeSimulatedMetric() because Lantern simulation for LCP-all-frames has not been implemented. The method body is a single throw statement, marked with a TODO comment ('Simulate LCP all frames in lantern'). The observed path (computeObservedMetric) functions normally.","triggerScenarios":"Calling LargestContentfulPaintAllFrames.request() with settings.throttlingMethod === 'simulate'. The computed artifact framework dispatches to computeSimulatedMetric(), which throws unconditionally before any logic runs.","commonSituations":"Running Lighthouse programmatically or via config with simulated throttling while requesting the LCP All Frames metric. Using a custom Lighthouse config that includes the all-frames variant under simulation mode. This is a library limitation, not a page-level problem.","solutions":["Switch to throttlingMethod: 'devtools' or 'provided' to use the observed computation path","Use the standard LargestContentfulPaint metric instead, which has full Lantern support","Wrap the artifact request in a try-catch if your pipeline must use simulation, and fall back to standard LCP"],"exampleFix":"// before\nconst settings = { throttlingMethod: 'simulate' };\nconst lcpAllFrames = await LargestContentfulPaintAllFrames.request(data, context);\n\n// after\nconst settings = { throttlingMethod: 'devtools' };\nconst lcpAllFrames = await LargestContentfulPaintAllFrames.request(data, context);","handlingStrategy":"validation","validationCode":"// Check throttling method before requesting LCP All Frames\nif (settings.throttlingMethod === 'simulate') {\n  // LCP All Frames has no Lantern implementation\n  return undefined;\n}\nconst lcpAllFrames = await LargestContentfulPaintAllFrames.request(data, context);","typeGuard":null,"tryCatchPattern":"try {\n  const lcp = await LargestContentfulPaintAllFrames.request(data, context);\n} catch (e) {\n  if (e.message === 'LCP All Frames not implemented in lantern') {\n    // Not implemented for simulation — fall back to standard LCP\n    return undefined;\n  }\n  throw e;\n}","preventionTips":["Never request LCP All Frames under simulated throttling — it will always throw","Use standard LargestContentfulPaint for simulation mode","Gate all-frames metric requests on throttlingMethod !== 'simulate'","Track the TODO upstream if you need Lantern support for this metric"],"tags":["lcp","lantern","throttling","metrics","not-implemented"],"backgroundTag":null,"analyzedSha":"9515cd4e58ebed69f78742d932b501c2cab8ad8f","analyzedAt":"2026-08-13T06:28:10.346Z","schemaVersion":2},"datasetVersion":"2026-08-13T09:17:06.757Z"}