GoogleChrome/lighthouse · error · LighthouseError

NO_LCP

NO_LCP

Error message

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})

What it means

Thrown as a LighthouseError with code NO_LCP from LCPBreakdown.compute_() at line 29. This code path handles the 'simulate' throttling method: it requests ProcessedNavigation and checks if the observed LCP timing exists. If largestContentfulPaint is undefined, it throws because LCP breakdown subparts (TTFB, load delay, load duration, render delay) cannot be decomposed without an LCP event.

Source

Thrown at core/computed/metrics/lcp-breakdown.js:29

import {TimeToFirstByte} from './time-to-first-byte.js';
import {LCPImageRecord} from '../lcp-image-record.js';
import {NavigationInsights} from '../navigation-insights.js';

/**
 * Note: this omits renderDelay for simulated throttling.
 */
class LCPBreakdown {
  /**
   * @param {LH.Artifacts.MetricComputationDataInput} data
   * @param {LH.Artifacts.ComputedContext} context
   * @return {Promise<{ttfb: number, loadDelay?: number, loadDuration?: number, renderDelay?: number}>}
   */
  static async compute_(data, context) {
    if (data.settings.throttlingMethod === 'simulate') {
      const processedNavigation = await ProcessedNavigation.request(data.trace, context);
      const observedLcp = processedNavigation.timings.largestContentfulPaint;
      if (observedLcp === undefined) {
        throw new LighthouseError(LighthouseError.errors.NO_LCP);
      }
      const timeOrigin = processedNavigation.timestamps.timeOrigin / 1000;

      const {timing: ttfb} = await TimeToFirstByte.request(data, context);

      const lcpRecord = await LCPImageRecord.request(data, context);
      if (!lcpRecord) {
        return {ttfb};
      }

      // Official LCP^tm. Will be lantern result if simulated, otherwise same as observedLcp.
      const {timing: metricLcp} = await LargestContentfulPaint.request(data, context);
      const throttleRatio = metricLcp / observedLcp;

      const unclampedLoadStart = (lcpRecord.networkRequestTime - timeOrigin) * throttleRatio;
      const loadDelay = Math.max(ttfb, Math.min(unclampedLoadStart, metricLcp));

      const unclampedLoadEnd = (lcpRecord.networkEndTime - timeOrigin) * throttleRatio;

View on GitHub (pinned to 9515cd4e58)

Solutions

  1. Ensure the page renders visible content to produce an LCP event
  2. Switch to observed throttling (devtools/provided) if the simulation path is problematic, though the root cause is missing LCP
  3. Verify the trace includes LCP-related categories if collecting manually
  4. Handle this error gracefully if the page legitimately has no LCP (e.g., a 404 page)
Defensive patterns

Strategy: try-catch

Validate before calling

// Pre-check LCP for simulation path before requesting breakdown
if (data.settings.throttlingMethod === 'simulate') {
  const processedNavigation = await ProcessedNavigation.request(data.trace, context);
  if (processedNavigation.timings.largestContentfulPaint === undefined) {
    // No LCP — skip breakdown
    return { ttfb: undefined };
  }
}

Try / catch

try {
  const breakdown = await LCPBreakdown.request(data, context);
} catch (e) {
  if (e instanceof LighthouseError && e.code === 'NO_LCP') {
    // No LCP to break down — return partial or skip
    return { notApplicable: true };
  }
  throw e;
}

Prevention

When it happens

Trigger: Calling LCPBreakdown.request() with settings.throttlingMethod === 'simulate' on a trace that has no LCP event. The simulation path still needs an observed LCP from the trace to decompose; without it, the throw at line 29 fires.

Common situations: Running LCP breakdown analysis on pages with no visible content. Pages rendered entirely by JavaScript that fails. Background/hidden tabs. This mirrors the same root cause as the standard NO_LCP error but is specifically in the LCP breakdown subpart computation.

Related errors


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