Trace summary says "no data for this page in CrUX" when CrUX lookups are disabled

Aperta
#2,997 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

  • #3074 di @lorenzozanee — chiusa senza merge
  • #3133 di @trukhinyuri — chiusa senza merge

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
56/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
observability

Direzione di ricerca

Start with src/tools/performance.ts around stopTracingAndAppendOutput and populateCruxData, then inspect the bundled PerformanceTraceFormatter at third_party/devtools-frontend/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts and the configuration description in docs/configuration.md. Reproduce with --no-performance-crux and a loopback page. Done when the summary no longer implies a lookup found no data when none was requested, while the enabled-lookup no-data message remains appropriate.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

confirmed p3
Description of the bug

With --no-performance-crux, the server does not query the CrUX API, yet every performance trace summary prints Metrics (field / real users): n/a – no data for this page in CrUX. The line states that a lookup ran and found nothing, which is false for this configuration. An agent can pass that on as a fact about the page ("this page has no real-user data") when no lookup was made.

Actual behavior

Both builds, excerpt of the trace summary:

## insight set id: NAVIGATION_0
URL: http://127.0.0.1:PORT/min.html
...
  - CLS: 0.00
Metrics (field / real users): n/a – no data for this page in CrUX
Available insights:
Reproduction
  1. Serve any HTML page from a loopback HTTP server at http://127.0.0.1:PORT/min.html (for example <!doctype html><title>min</title><h1>Hello</h1>).

  2. Start the server under test with the flags above (including --no-performance-crux) and send:

{"name":"new_page","arguments":{"url":"http://127.0.0.1:PORT/min.html"}}
{"name":"performance_start_trace","arguments":{"pageId":2}}

The sequence was run once per build with identical results; every other untruncated trace summary recorded with --no-performance-crux (one more run per build in this investigation, earlier runs on both builds, and two further earlier runs on the release build) contained the same line. The default (--performance-crux enabled) was not exercised, because it sends the page URL to the CrUX API.

Expectation

docs/configuration.md describes --performanceCrux / --performance-crux as "Set to false to disable sending URLs from performance traces to CrUX API to get field performance data." With the lookup disabled, the summary should not claim that CrUX has no data for the page; it should say that field data was not requested (or omit the field-data line).

MCP configuration

--headless --isolated --no-usage-statistics --no-performance-crux unless the reproduction states otherwise (update checks disabled with CHROME_DEVTOOLS_MCP_NO_UPDATE_CHECKS=1).

Chrome DevTools MCP version

1.10.1 (npm) and main 5ddb0a3110c5059f8e5513e566196cce2a35c6d1 (local build)

Chrome version

154.0.8037.98 (stable)

Node version

v22.23.2

Operating system

macOS 27.0

Environment details
  • chrome-devtools-mcp 1.10.1 from npm (the release build).
  • chrome-devtools-mcp built from main at commit 5ddb0a3110c5059f8e5513e566196cce2a35c6d1 (the main build).
  • Google Chrome 154.0.8037.98 stable, headless; Node v22.23.2; macOS 27.
  • Both builds were started with --headless --isolated --no-usage-statistics --no-performance-crux and CHROME_DEVTOOLS_MCP_NO_UPDATE_CHECKS=1, and driven by a scripted stdio MCP client.
Evidence
  • Expected source: --performanceCrux description in docs/configuration.md (both builds).
  • Failure source: scripted MCP runs above on both builds. On the main build, stopTracingAndAppendOutput calls populateCruxData only when context.isCruxEnabled() (src/tools/performance.ts:230-232), and the summary text comes from the bundled DevTools PerformanceTraceFormatter, which prints Metrics (field / real users): n/a – no data for this page in CrUX whenever it has no CrUX field data for the insight set (third_party/devtools-frontend/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts:217-221), without distinguishing "not requested" from "no data".
  • Evidence provenance: observed
  • Local verification: reproduced
  • Reproduction completeness: complete
Fix check

With the steps above and --no-performance-crux, the trace summary no longer says "no data for this page in CrUX"; it states that field data was not requested or omits the field-data line. As a control, with CrUX enabled and a URL that CrUX has no data for, the existing "no data for this page in CrUX" text is still appropriate.

Additional context

The full open and closed issue and PR corpus was screened as of 2026-10-06; no issue covers this text. The string is produced by the DevTools frontend formatter that this package bundles, so the change may need to happen in how the server invokes or post-processes that formatter rather than in the formatter itself.

Lingua principale
TypeScript
Stelle
59.8k
Fork
4.8k
Merge medio
2g 10h
PR unite (30g)
162

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ChromeDevTools/chrome-devtools-mcp

Tutte le issue di ChromeDevTools/chrome-devtools-mcp

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.