GoogleChrome / web-vitals-extension

A Chrome extension to measure essential metrics for a healthy site
https://chrome.google.com/webstore/detail/web-vitals/ahfhijdlegdabablpippeagghigmibma?hl=en
Apache License 2.0
2.35k stars 105 forks source link

WebVitals measures different LCP than Google Lighthouse #96

Closed SkaiiiDSO closed 2 years ago

SkaiiiDSO commented 3 years ago

Hi all,

i've come across following Bug with the WebVitals-Extension

Describe the bug When Running a Lighthouse-Test on a Webpage and viewing the Web Vitals through the WebVitals Extensions the resulting LCP in Lighthouse and WebVitals-Extension differs in some Cases. EDIT: This seems to happen on mostly clientside rendered pages (for example: https://www.imwalking.de/damenschuhe/pumps/#als=true&highlight=98130727)

To Reproduce

Expected behavior Largest-Contentful-Paint Values should be equal in the Web-Vitals-Extension and Lighthouse-Reports

Version:

Additional context, screenshots, screencasts Screenshot 2021-07-23 122637

rviscomi commented 3 years ago

Not sure this is a bug with the extension, as its CWV data is based on the web-vitals.js library. AFAIK Lighthouse uses the native APIs directly and not the wv library so that may be a source of discrepancy. cc @philipwalton @paulirish

paulirish commented 3 years ago

Lighthouse's LCP (as of 8.0) includes all subframes, too. (matching CrUX). As I'm guessing the extension doesn't also gather the values from subframes, this may explain the discrepancy.

If it's not a matter of subframes, this is unexpected. (I'm 85% sure our time origin definitions match up, but that'd be my next guess)

rviscomi commented 2 years ago

Seems like this is WAI. Closing.