[MCP] browser_tabs list/select indices diverge across HTTP sessions with --shared-browser-context
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 22/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- devtools, playwright, typescript
- Ambito
- backend-api-design, devtools
Direzione di ricerca
The report is about per-MCP-session tab registry and current-tab state in the browser_tabs tool under --shared-browser-context, so start in the MCP server's session handling and tab-index bookkeeping. Reproduce with two HTTP sessions: create a tab, list it, then select the same index from a new session. Done means indices resolve consistently across sessions or the scoping is documented; the issue has no comments or decision yet, so confirm with maintainers before changing behavior.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Environment
@playwright/[email protected]- macOS (Apple Silicon), Chrome Stable, Playwright Chrome extension
- Server flags:
--extension --shared-browser-context --background --host 127.0.0.1 --port 8931 - MCP client reaches the HTTP endpoint through an authenticated tunnel; successive tool calls can establish new HTTP MCP sessions.
Observed behavior
With the same extension-backed Chrome browser:
- Tool call:
browser_tabs({action:"new", url:"about:blank"})reports the new tab (e.g. index 1). - Subsequent tool call:
browser_tabs({action:"list"})displays index 1. - Subsequent tool call, under another MCP session ID:
browser_tabs({action:"select", index:1}). - Actual:
Error: Tab 1 not found.
In our test environment the tab exists in Chrome and shows in the returned listing. --shared-browser-context appears to share the underlying browser context without making the tool's per-MCP-session tab registry and current-tab state stable across new sessions.
Control / workaround
Using one persistent upstream MCP session, keeping the same Mcp-Session-Id across calls, the sequence new -> list -> select -> close passes on the same installation. A small single-operator local intermediary that holds one upstream session resolved the symptom.
The intermediary is not safe multi-tenant isolation: unrelated clients should not share unrestricted browser control. We are not asking to grant cross-client tab access implicitly.
Request
Could the behavior be clarified in documentation and/or improved with stable/selectable tab identifiers across reconnects where explicitly authorized? If list results are MCP-session-local, it would help to document the need for a persistent Mcp-Session-Id and avoid giving the impression that positional indices are usable across independently created client sessions.
Related issues
- https://github.com/microsoft/playwright-mcp/issues/1109 — similar list/select inconsistency in 0.0.41 (closed).
- https://github.com/microsoft/playwright/issues/42961 — per-client tab ownership in shared browser contexts.
We can share a minimal HTTP harness if additional reproduction details would help.
- Lingua principale
- TypeScript
- Stelle
- 100k
- Fork
- 6.9k
- Merge medio
- 16h 8m
- PR unite (30g)
- 281
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/playwright
-
[MCP]: page snapshots in .playwright-mcp/ are not git-ignored (.playwright-cli/ is, since #42318)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
microsoft/playwright#44289 ·
I maintainer di solito rispondono entro 1 giorno
-
agent-triage-done
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
microsoft/playwright#44264 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] WebKit keeps every removed iframe's JS heap alive (memory grows until the page crashes)Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 12/100
microsoft/playwright#44290 ·
I maintainer di solito rispondono entro 1 giorno
-
[Regression]: requestFullscreen() in a popup rejects with "not granted" in 1.65 (Chromium 159)Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
microsoft/playwright#44288 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: page.goto never returns for a load started as a newer service worker takes over (Chromium)Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 12/100
microsoft/playwright#44287 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di microsoft/playwright
Issue simili
-
good first issue
Difficoltà 2/5 Mezza giornata Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
blamechris/chroxy#9272 ·
I maintainer di solito rispondono entro 1 giorno
-
no-repo-link tool-submission
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 66/100
BraveOPotato/NoSignups#2458 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
drmrd/vernacular#1061 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] PUT /profiles/{id} silently drops design_prompt — designed voice profiles cannot be editedAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100