GoogleChrome / GoogleChrome/lighthouse

Give an explanation for NO_LCP when content is all canvas/SVG

Open
#12,309 0 comments 0 reactions 0 assignees View on GitHub
P2
Dominant language
JavaScript
Stars
30.8k
Forks
9.8k
Avg merge
1d 14h
Merged PRs (30d)
20

Description

Another person ran into #11326: https://twitter.com/FredKSchott/status/1376606554061893633

But currently the error we give is "Something went wrong with recording the trace over your page load. Please run Lighthouse again. (`NO_LCP`)". In this case, running Lighthouse again will not produce a better result the second time.

I'm not sure if there's anything we can do for the null perf score as long as we require LCP and LCP is defined the way it is (https://github.com/WICG/element-timing/issues/47, https://github.com/WICG/element-timing/issues/56), but we can at least let the user know what's happening.

Hand waving the heuristics here, but if
- there's no LCP
- there is painted content
- all of that content is SVG or canvas

we should give a custom `NO_LCP` error to let them know the reason for the null score.

related: #11326

Contributor guide

Open the contributing guide

Research direction

Start by tracing where the NO_LCP error is generated and review related issue #11326. Confirm how Lighthouse identifies painted content and whether it is all SVG or canvas; done means this case receives an explanatory NO_LCP message instead of asking the user to rerun Lighthouse.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
performance
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.