GoogleChrome/lighthouse · error · Error

LCP All Frames not implemented in lantern

Error message

LCP All Frames not implemented in lantern

What it means

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.

Source

Thrown at core/computed/metrics/largest-contentful-paint-all-frames.js:21

 * Copyright 2020 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */

/**
 * @fileoverview Computed Largest Contentful Paint (LCP) for all frames.
 */

import {makeComputedArtifact} from '../computed-artifact.js';
import {NavigationMetric} from './navigation-metric.js';
import {LighthouseError} from '../../lib/lh-error.js';

class LargestContentfulPaintAllFrames extends NavigationMetric {
  /**
   * TODO: Simulate LCP all frames in lantern.
   * @return {Promise<LH.Artifacts.LanternMetric>}
   */
  static async computeSimulatedMetric() {
    throw new Error('LCP All Frames not implemented in lantern');
  }

  /**
   * @param {LH.Artifacts.NavigationMetricComputationData} data
   * @return {Promise<LH.Artifacts.Metric>}
   */
  static async computeObservedMetric(data) {
    const {processedNavigation} = data;
    if (processedNavigation.timings.largestContentfulPaintAllFrames === undefined) {
      throw new LighthouseError(LighthouseError.errors.NO_LCP_ALL_FRAMES);
    }

    return {
      timing: processedNavigation.timings.largestContentfulPaintAllFrames,
      timestamp: processedNavigation.timestamps.largestContentfulPaintAllFrames,
    };
  }
}

View on GitHub (pinned to 9515cd4e58)

Solutions

  1. Switch to throttlingMethod: 'devtools' or 'provided' to use the observed computation path
  2. Use the standard LargestContentfulPaint metric instead, which has full Lantern support
  3. Wrap the artifact request in a try-catch if your pipeline must use simulation, and fall back to standard LCP

Example fix

// before
const settings = { throttlingMethod: 'simulate' };
const lcpAllFrames = await LargestContentfulPaintAllFrames.request(data, context);

// after
const settings = { throttlingMethod: 'devtools' };
const lcpAllFrames = await LargestContentfulPaintAllFrames.request(data, context);
Defensive patterns

Strategy: validation

Validate before calling

// Check throttling method before requesting LCP All Frames
if (settings.throttlingMethod === 'simulate') {
  // LCP All Frames has no Lantern implementation
  return undefined;
}
const lcpAllFrames = await LargestContentfulPaintAllFrames.request(data, context);

Try / catch

try {
  const lcp = await LargestContentfulPaintAllFrames.request(data, context);
} catch (e) {
  if (e.message === 'LCP All Frames not implemented in lantern') {
    // Not implemented for simulation — fall back to standard LCP
    return undefined;
  }
  throw e;
}

Prevention

When it happens

Trigger: Calling LargestContentfulPaintAllFrames.request() with settings.throttlingMethod === 'simulate'. The computed artifact framework dispatches to computeSimulatedMetric(), which throws unconditionally before any logic runs.

Common situations: 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.

Related errors


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