Skip to content

Playwright MCP fails to launch when Chrome is already running on Windows #24144

Description

@MMM1970

Bug Description

The Playwright MCP server (plugin:playwright) fails to launch a browser when Google Chrome is already running on Windows. Playwright is configured to use Chrome (channel: "chrome"), but Chrome on Windows does not support multiple simultaneous instances with different user data directories — the second launch attaches to the existing session and immediately exits.

Environment

  • OS: Windows 11 (Build 26200)
  • Claude Code: v2.1.37 (npm global install)
  • Playwright MCP: @playwright/mcp@latest (v0.0.64)
  • Chrome: v144.0.7559.133

Steps to Reproduce

  1. Have Google Chrome open (normal browsing session)
  2. Start Claude Code CLI
  3. Use any Playwright MCP tool (e.g., browser_navigate, browser_take_screenshot)
  4. Playwright tries to launch Chrome with its own --user-data-dir and --remote-debugging-port
  5. Chrome detects the existing instance, prints "Opening in existing browser session", and exits

Error Output

browserType.launchPersistentContext: Failed to launch the browser process.

<launching> C:\Program Files\Google\Chrome\Application\chrome.exe --disable-field-trial-config ... --user-data-dir=C:\Users\bigfa\AppData\Local\ms-playwright\mcp-chrome-0e6d30e --remote-debugging-port=57745 about:blank
<launched> pid=25256
[pid=25256][out] Opening in existing browser session.
[pid=25256] <process did exit: exitCode=0, signal=null>

Expected Behavior

Playwright should be able to launch its own isolated browser instance even when Chrome is already running. Possible solutions:

  1. Use Chromium instead of Chrome — Playwright's bundled Chromium can run independently alongside Chrome
  2. Connect to the existing Chrome via CDP — Instead of launching a new process, connect to Chrome's existing remote debugging port
  3. Use --new-window flag or other mechanism to coexist with the running Chrome instance

Workaround

Close all Chrome windows before using Playwright MCP tools, then reopen Chrome afterward. This is disruptive to the user's browsing session.

Notes

This is particularly problematic when both Playwright MCP and Claude in Chrome are configured, since Claude in Chrome requires Chrome to be running, while Playwright MCP requires Chrome to not be running — making them mutually exclusive on Windows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:mcpbugSomething isn't workinghas reproHas detailed reproduction stepsplatform:windowsIssue specifically occurs on Windows

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions