navigate_page and handle_dialog report failures with isError: false

Aperta
#3,348 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

  • #3355 di @lisa0314 — chiusa senza merge

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
typescript
Ambito
devtools

Direzione di ricerca

The issue points to src/tools/pages.ts and describes the catches in navigate_page and handle_dialog. Read those handlers and compare their error behavior with the --slim navigation variant and blocked URL handling. Done means failed navigation and dialog actions produce MCP results with isError: true; the issue includes a navigation reproduction to check, and linked pull request #3355 is already open.

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

Descrizione

collecting-feedback

Version: 1.11.0 (same code in src/tools/pages.ts at v1.12.0), default (non --slim) tool set.

Two tools report failure as a successful result:

  1. navigate_page (type = url / back / forward / reload): the catch appends Unable to navigate ...: ${error.message}. as a normal response line. The MCP result has isError: false. Repro: navigate_page {type: "url", url: "http://127.0.0.1:9/"} returns isError: false with net::ERR_UNSAFE_PORT in the text. (The --slim variant throws, which is the behaviour we would expect everywhere.)

  2. handle_dialog: dialog.accept() / dialog.dismiss() failures are caught, logged, and followed by Successfully accepted the dialog / Successfully dismissed the dialog. The tool says it succeeded when it did not.

Agents and test harnesses that branch on isError treat both as success and continue on the wrong page or with a dialog still open.

Suggestion: throw from those catch blocks (the tool handler already turns a thrown error into isError: true, as it does for blocked URLs). We run a local patch doing that; the navigation repro above then returns isError: true.

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.