-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Description of the bug
On WSL2 (Linux), when chrome-devtools-mcp is started without an explicit --executablePath, it may launch the Windows Chrome executable under /mnt/c/.../chrome.exe.
Shortly after launch, the CDP pipe connection resets (read ECONNRESET), and tool calls fail with:
Protocol error (Target.setDiscoverTargets): Target closed
If I force the Linux Chrome binary (e.g. --executablePath /usr/bin/google-chrome), the same tool calls work as expected.
Reproduction
-
Configure the MCP server (no --executablePath) and enable a log file:
command = "npx"
args = ["-y", "chrome-devtools-mcp@latest", "--headless", "--isolated", "--logFile", "https://github.com/home/xxx/tmp/chrome-devtools-mcp-wsl.log"] -
Start an MCP client (Codex CLI) and call:
- chrome-devtools.new_page({ "url": "https://github.com/", "timeout": 60000 })
- chrome-devtools.list_pages({})
-
Observe failure:
Protocol error (Target.setDiscoverTargets): Target closed -
Check /home/xxx/tmp/chrome-devtools-mcp-wsl.log. It shows:
- Launching /mnt/c/Users/xxx/AppData/Local/Google/Chrome/Application/chrome.exe ...
- read ECONNRESET / ConnectionClosedError / TargetCloseError
Expectation
On Linux/WSL, if a Linux Chrome binary is available (e.g. /usr/bin/google-chrome), default executable selection should prefer it.
At minimum, if a Windows .exe under /mnt/c is selected, the server should emit a clear warning explaining this is likely to break CDP and recommend using --executablePath.
MCP configuration
[mcp_servers.chrome-devtools]
command = "npx"
args = [
"-y",
"chrome-devtools-mcp@latest",
"--headless",
"--isolated",
"--logFile",
"https://github.com/home/xxx/tmp/chrome-devtools-mcp-wsl.log",
]
startup_timeout_sec = 30.0
Chrome DevTools MCP version
0.12.1
Chrome version
Linux Chrome: Google Chrome 143.0.7499.109 Windows Chrome: /mnt/c/Users/xxx/AppData/Local/Google/Chrome/Application/chrome.exe (seen in log)
Coding agent version
codex-cli 0.73.0
Model version
gpt-5.2 (reasoning: high)
Chat log
I can attach: - /home/xxx/tmp/chrome-devtools-mcp-wsl.log Key excerpts include: - the "Launching ..." line showing /mnt/c/.../chrome.exe - read ECONNRESET - TargetCloseError stack trace
Node version
v24.11.1
Operating system
Linux
Extra checklist
- I want to provide a PR to fix this bug