GoogleChrome / lighthouse

Automated auditing, performance metrics, and best practices for the web.
https://developer.chrome.com/docs/lighthouse/overview/
Apache License 2.0
28.4k stars 9.38k forks source link

`NO_SCREENSHOTS` / `SPEEDINDEX_OF_ZERO` with Chrome M118 #15556

Closed LazareBoddaert closed 1 year ago

LazareBoddaert commented 1 year ago

Edit: duplicate. see #15460


https://www.foryoumaquillage.fr/

What happened?

I'm trying to improve the performance of my website ( https://foryoumaquillage.fr). I recently made a lot of changes in my code, and now the results give me errors when trying to test.

The errors are different from time to time. Most of the time I got a "NO_SCREENSHOTS", but sometimes it's "SPEEDINDEX_OF_ZERO" or "NO_NAVSTART". And really few times I got no error at all. What is consistent is that all screenshots from the tests are blank pages.

I'm pretty sure the problem comes from my code. But as a junior dev, I don't know how to find what is creating those errors.

What did you expect?

Performance score without error message

What have you tried?

I tried testing via chrome devtool / cli command / PageSpeed Insight, all gave me the same results and errors.

How were you running Lighthouse?

CLI, PageSpeed Insights, Chrome DevTools

Lighthouse Version

11.2.0

Chrome Version

118.0.5993.88

Node Version

v19.5.0

OS

Mac

Relevant log output

LH:ChromeLauncher Waiting for browser. +0ms
  LH:ChromeLauncher Waiting for browser... +1ms
  LH:ChromeLauncher Waiting for browser..... +553ms
  LH:ChromeLauncher Waiting for browser.....✓ +6ms
  LH:status Connecting to browser +2s
  LH:status Navigating to about:blank +20ms
  LH:status Benchmarking machine +34ms
  LH:status Preparing target for navigation mode +1s
  LH:status Navigating to about:blank +20ms
  LH:status Preparing target for navigation +24ms
  LH:status Cleaning origin data +61ms
  LH:status Cleaning browser cache +20ms
  LH:status Preparing network conditions +178ms
  LH:status Navigating to https://foryoumaquillage.fr/ +85ms
  LH:Navigation:error Provided URL (https://foryoumaquillage.fr/) did not match initial navigation URL (about:blank) +3s
  LH:status Getting artifact: DevtoolsLog +545ms
  LH:status Getting artifact: Trace +0ms
  LH:status Getting artifact: DevtoolsLog +2ms
  LH:status Getting artifact: Trace +0ms
  LH:status Getting artifact: Accessibility +0ms
  LH:status Getting artifact: AnchorElements +579ms
  LH:status Getting artifact: ConsoleMessages +207ms
  LH:status Getting artifact: CSSUsage +0ms
  LH:status Getting artifact: Doctype +468ms
  LH:status Getting artifact: DOMStats +1ms
  LH:status Getting artifact: EmbeddedContent +7ms
  LH:status Getting artifact: FontSize +3ms
  LH:status Getting artifact: Inputs +42ms
  LH:status Getting artifact: GlobalListeners +4ms
  LH:status Getting artifact: ImageElements +3ms
  LH:status Getting artifact: InstallabilityErrors +645ms
  LH:status Get webapp installability errors +0ms
  LH:status Getting artifact: InspectorIssues +1ms
  LH:status Getting artifact: JsUsage +1ms
  LH:status Getting artifact: LinkElements +0ms
  LH:status Getting artifact: MainDocumentContent +11ms
  LH:status Getting artifact: MetaElements +4ms
  LH:status Getting artifact: NetworkUserAgent +5ms
  LH:status Getting artifact: OptimizedImages +1ms
  LH:status Getting artifact: ResponseCompression +0ms
  LH:status Getting artifact: RobotsTxt +1ms
  LH:status Getting artifact: Scripts +40ms
  LH:status Getting artifact: SourceMaps +1ms
  LH:status Getting artifact: Stacks +220ms
  LH:status Collect stacks +0ms
  LH:status Getting artifact: TagsBlockingFirstPaint +72ms
  LH:status Getting artifact: TapTargets +3ms
  LH:status Getting artifact: TraceElements +49ms
  LH:status Getting artifact: ViewportDimensions +59ms
  LH:status Getting artifact: WebAppManifest +3ms
  LH:status Get webapp manifest +0ms
  LH:status Getting artifact: devtoolsLogs +11ms
  LH:status Getting artifact: traces +0ms
  LH:status Getting artifact: FullPageScreenshot +0ms
  LH:status Getting artifact: BFCacheFailures +2s
  LH:status Analyzing and running audits... +310ms
  LH:status Auditing: Uses HTTPS +3ms
  LH:status Auditing: Has a `<meta name="viewport">` tag with `width` or `initial-scale` +6ms
  LH:status Auditing: First Contentful Paint +5ms
  LH:status Auditing: Largest Contentful Paint +32ms
  LH:status Auditing: First Meaningful Paint +13ms
  LH:status Auditing: Speed Index +12ms
  LH:speed-index:warn Caught exception: SPEEDINDEX_OF_ZERO +275ms
  LH:status Auditing: Screenshot Thumbnails +4ms
  LH:screenshot-thumbnails:warn Caught exception: SPEEDINDEX_OF_ZERO +2ms
  LH:status Auditing: Final Screenshot +0ms
  LH:status Auditing: Total Blocking Time +5ms
  LH:status Auditing: Max Potential First Input Delay +23ms
  LH:status Auditing: Cumulative Layout Shift +15ms
  LH:status Auditing: No browser errors logged to the console +14ms
  LH:status Auditing: Initial server response time was short +114ms
  LH:status Auditing: Time to Interactive +2ms
  LH:status Auditing: User Timing marks and measures +2ms
  LH:status Auditing: Avoid chaining critical requests +2ms
  LH:status Auditing: Avoid multiple page redirects +5ms
  LH:status Auditing: Web app manifest and service worker meet the installability requirements +3ms
  LH:status Auditing: Configured for a custom splash screen +13ms
  LH:status Auditing: Sets a theme color for the address bar. +2ms
  LH:status Auditing: Manifest has a maskable icon +2ms
  LH:status Auditing: Content is sized correctly for the viewport +1ms
  LH:status Auditing: Displays images with correct aspect ratio +2ms
  LH:status Auditing: Serves images with appropriate resolution +3ms
  LH:status Auditing: Fonts with `font-display: optional` are preloaded +3ms
  LH:status Auditing: Avoids deprecated APIs +2ms
  LH:status Auditing: Minimizes main-thread work +1ms
  LH:status Auditing: JavaScript execution time +9ms
  LH:status Auditing: Preload key requests +8ms
  LH:status Auditing: Preconnect to required origins +1ms
  LH:status Auditing: All text remains visible during webfont loads +3ms
  LH:status Auditing: Diagnostics +5ms
  LH:status Auditing: Network Requests +1ms
  LH:status Auditing: Network Round Trip Times +4ms
  LH:status Auditing: Server Backend Latencies +2ms
  LH:status Auditing: Tasks +1ms
  LH:status Auditing: Metrics +1ms
  LH:metrics:warn Caught exception: SPEEDINDEX_OF_ZERO +0ms
  LH:status Auditing: Performance budget +1ms
  LH:status Auditing: Timing budget +2ms
  LH:timing-budget:warn Caught exception: SPEEDINDEX_OF_ZERO +0ms
  LH:status Auditing: Minimize third-party usage +1ms
  LH:status Auditing: Lazy load third-party resources with facades +4ms
  LH:status Auditing: Largest Contentful Paint element +6ms
  LH:status Auditing: Largest Contentful Paint image was not lazily loaded +4ms
  LH:status Auditing: Avoid large layout shifts +2ms
  LH:status Auditing: Avoid long main-thread tasks +1ms
  LH:status Auditing: Avoids `unload` event listeners +11ms
  LH:status Auditing: Avoid non-composited animations +1ms
  LH:status Auditing: Image elements have explicit `width` and `height` +2ms
  LH:status Auditing: Page has valid source maps +2ms
  LH:status Auditing: Preload Largest Contentful Paint image +2ms
  LH:status Auditing: Ensure CSP is effective against XSS attacks +3ms
  LH:status Auditing: Script Treemap Data +4ms
  LH:status Auditing: Site works cross-browser +42ms
  LH:status Auditing: Page transitions don't feel like they block on the network +1ms
  LH:status Auditing: Each page has a URL +0ms
  LH:status Auditing: `[accesskey]` values are unique +2ms
  LH:status Auditing: `[aria-*]` attributes match their roles +1ms
  LH:status Auditing: Values assigned to `role=""` are valid ARIA roles. +4ms
  LH:status Auditing: `button`, `link`, and `menuitem` elements have accessible names +5ms
  LH:status Auditing: Elements with `role="dialog"` or `role="alertdialog"` have accessible names. +1ms
  LH:status Auditing: `[aria-hidden="true"]` is not present on the document `<body>` +2ms
  LH:status Auditing: `[aria-hidden="true"]` elements do not contain focusable descendents +4ms
  LH:status Auditing: ARIA input fields have accessible names +4ms
  LH:status Auditing: ARIA `meter` elements have accessible names +1ms
  LH:status Auditing: ARIA `progressbar` elements have accessible names +2ms
  LH:status Auditing: `[role]`s have all required `[aria-*]` attributes +1ms
  LH:status Auditing: Elements with an ARIA `[role]` that require children to contain a specific `[role]` have all required children. +4ms
  LH:status Auditing: `[role]`s are contained by their required parent element +2ms
  LH:status Auditing: `[role]` values are valid +2ms
  LH:status Auditing: Elements with the `role=text` attribute do not have focusable descendents. +4ms
  LH:status Auditing: ARIA toggle fields have accessible names +11ms
  LH:status Auditing: ARIA `tooltip` elements have accessible names +3ms
  LH:status Auditing: ARIA `treeitem` elements have accessible names +5ms
  LH:status Auditing: `[aria-*]` attributes have valid values +3ms
  LH:status Auditing: `[aria-*]` attributes are valid and not misspelled +6ms
  LH:status Auditing: Buttons have an accessible name +5ms
  LH:status Auditing: The page contains a heading, skip link, or landmark region +12ms
  LH:status Auditing: Background and foreground colors have a sufficient contrast ratio +13ms
  LH:status Auditing: `<dl>`'s contain only properly-ordered `<dt>` and `<dd>` groups, `<script>`, `<template>` or `<div>` elements. +17ms
  LH:status Auditing: Definition list items are wrapped in `<dl>` elements +33ms
  LH:status Auditing: Document has a `<title>` element +8ms
  LH:status Auditing: `[id]` attributes on active, focusable elements are unique +16ms
  LH:status Auditing: ARIA IDs are unique +12ms
  LH:status Auditing: All heading elements contain content. +8ms
  LH:status Auditing: No form fields have multiple labels +4ms
  LH:status Auditing: `<frame>` or `<iframe>` elements have a title +2ms
  LH:status Auditing: Heading elements appear in a sequentially-descending order +4ms
  LH:status Auditing: `<html>` element has a `[lang]` attribute +8ms
  LH:status Auditing: `<html>` element has a valid value for its `[lang]` attribute +4ms
  LH:status Auditing: `<html>` element has an `[xml:lang]` attribute with the same base language as the `[lang]` attribute. +24ms
  LH:status Auditing: Identical links have the same purpose. +25ms
  LH:status Auditing: Image elements have `[alt]` attributes +13ms
  LH:status Auditing: Image elements do not have `[alt]` attributes that are redundant text. +11ms
  LH:status Auditing: Input buttons have discernible text. +4ms
  LH:status Auditing: `<input type="image">` elements have `[alt]` text +2ms
  LH:status Auditing: Elements with visible text labels have matching accessible names. +2ms
  LH:status Auditing: Form elements have associated labels +3ms
  LH:status Auditing: Document has a main landmark. +3ms
  LH:status Auditing: Links have a discernible name +8ms
  LH:status Auditing: Links are distinguishable without relying on color. +4ms
  LH:status Auditing: Lists contain only `<li>` elements and script supporting elements (`<script>` and `<template>`). +5ms
  LH:status Auditing: List items (`<li>`) are contained within `<ul>`, `<ol>` or `<menu>` parent elements +4ms
  LH:status Auditing: The document does not use `<meta http-equiv="refresh">` +4ms
  LH:status Auditing: `[user-scalable="no"]` is not used in the `<meta name="viewport">` element and the `[maximum-scale]` attribute is not less than 5. +3ms
  LH:status Auditing: `<object>` elements have alternate text +14ms
  LH:status Auditing: Select elements have associated label elements. +3ms
  LH:status Auditing: Skip links are focusable. +5ms
  LH:status Auditing: No element has a `[tabindex]` value greater than 0 +3ms
  LH:status Auditing: Tables have different content in the summary attribute and `<caption>`. +4ms
  LH:status Auditing: Tables use `<caption>` instead of cells with the `[colspan]` attribute to indicate a caption. +5ms
  LH:status Auditing: Touch targets have sufficient size and spacing. +3ms
  LH:status Auditing: `<td>` elements in a large `<table>` have one or more table headers. +14ms
  LH:status Auditing: Cells in a `<table>` element that use the `[headers]` attribute refer to table cells within the same table. +3ms
  LH:status Auditing: `<th>` elements and elements with `[role="columnheader"/"rowheader"]` have data cells they describe. +3ms
  LH:status Auditing: `[lang]` attributes have a valid value +8ms
  LH:status Auditing: `<video>` elements contain a `<track>` element with `[kind="captions"]` +3ms
  LH:status Auditing: Custom controls have associated labels +3ms
  LH:status Auditing: Custom controls have ARIA roles +0ms
  LH:status Auditing: User focus is not accidentally trapped in a region +0ms
  LH:status Auditing: Interactive controls are keyboard focusable +1ms
  LH:status Auditing: Interactive elements indicate their purpose and state +0ms
  LH:status Auditing: The page has a logical tab order +0ms
  LH:status Auditing: The user's focus is directed to new content added to the page +0ms
  LH:status Auditing: Offscreen content is hidden from assistive technology +0ms
  LH:status Auditing: HTML5 landmark elements are used to improve navigation +0ms
  LH:status Auditing: Visual order on the page follows DOM order +0ms
  LH:status Auditing: Uses efficient cache policy on static assets +0ms
  LH:status Auditing: Avoids enormous network payloads +3ms
  LH:status Auditing: Defer offscreen images +5ms
  LH:status Auditing: Eliminate render-blocking resources +10ms
  LH:status Auditing: Minify CSS +4ms
  LH:status Auditing: Minify JavaScript +99ms
  LH:status Auditing: Reduce unused CSS +37ms
  LH:status Auditing: Reduce unused JavaScript +6ms
  LH:status Auditing: Serve images in next-gen formats +7ms
  LH:status Auditing: Efficiently encode images +13ms
  LH:status Auditing: Enable text compression +7ms
  LH:status Auditing: Properly size images +12ms
  LH:status Auditing: Use video formats for animated content +14ms
  LH:status Auditing: Remove duplicate modules in JavaScript bundles +4ms
  LH:status Auditing: Avoid serving legacy JavaScript to modern browsers +7ms
  LH:status Auditing: Page has the HTML doctype +23ms
  LH:status Auditing: Properly defines charset +1ms
  LH:status Auditing: Avoids an excessive DOM size +1ms
  LH:status Auditing: Avoids requesting the geolocation permission on page load +3ms
  LH:status Auditing: No issues in the `Issues` panel in Chrome Devtools +2ms
  LH:status Auditing: Avoids `document.write()` +1ms
  LH:status Auditing: Detected JavaScript libraries +1ms
  LH:status Auditing: Avoids requesting the notification permission on page load +1ms
  LH:status Auditing: Allows users to paste into input fields +2ms
  LH:status Auditing: Use HTTP/2 +1ms
  LH:status Auditing: Uses passive listeners to improve scrolling performance +5ms
  LH:status Auditing: Document has a meta description +1ms
  LH:status Auditing: Page has successful HTTP status code +1ms
  LH:status Auditing: Document uses legible font sizes +2ms
  LH:status Auditing: Links have descriptive text +2ms
  LH:status Auditing: Links are crawlable +1ms
  LH:status Auditing: Page isn’t blocked from indexing +2ms
  LH:status Auditing: robots.txt is valid +3ms
  LH:status Auditing: Tap targets are sized appropriately +1ms
  LH:status Auditing: Document has a valid `hreflang` +4ms
  LH:status Auditing: Document avoids plugins +1ms
  LH:status Auditing: Document has a valid `rel=canonical` +1ms
  LH:status Auditing: Structured data is valid +1ms
  LH:status Auditing: Page didn't prevent back/forward cache restoration +1ms
  LH:status Generating results... +1ms
LazareBoddaert commented 1 year ago

Sorry if it wasn't clear. My question is: if errors in lighthouse test results come from problems in my website code, is there a way to find which function in my code creates those errors?

adamraine commented 1 year ago

The NO_SCREENSHOTS and SPEEDINDEX_OF_ZERO errors actually appear to be a bug in Chrome M118 that was fixed in M119. You can use Chrome Beta or Chrome Canary to resolve these issues until M119 is released to stable.

I haven't been able to reproduce the NO_NAVSTART issues locally, however we do have an issue tracking that as it appears in our CI tests a lot https://github.com/GoogleChrome/lighthouse/issues/15382. This one is likely a bug in Chrome as well.

edit: see https://github.com/GoogleChrome/lighthouse/issues/15460#issuecomment-1775760096

adamraine commented 1 year ago

Closing, see https://github.com/GoogleChrome/lighthouse/issues/15460#issuecomment-1775760096