[MCP] browser_tabs list/select indices diverge across HTTP sessions with --shared-browser-context
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 22/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- devtools, playwright, typescript
- Lĩnh vực
- backend-api-design, devtools
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 100k
- Fork
- 6.9k
- Merge trung bình
- 16 giờ 8 phút
- Pull request đã merge (30 ngày)
- 281
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/playwright
-
[MCP]: page snapshots in .playwright-mcp/ are not git-ignored (.playwright-cli/ is, since #42318)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
microsoft/playwright#44289 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agent-triage-done
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
microsoft/playwright#44264 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] WebKit keeps every removed iframe's JS heap alive (memory grows until the page crashes)Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
microsoft/playwright#44290 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Regression]: requestFullscreen() in a popup rejects with "not granted" in 1.65 (Chromium 159)Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 22/100
microsoft/playwright#44288 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: page.goto never returns for a load started as a newer service worker takes over (Chromium)Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
microsoft/playwright#44287 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của microsoft/playwright
Issue tương tự
-
good first issue
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
blamechris/chroxy#9272 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
no-repo-link tool-submission
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 66/100
BraveOPotato/NoSignups#2458 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
drmrd/vernacular#1061 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug] PUT /profiles/{id} silently drops design_prompt — designed voice profiles cannot be editedĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100