Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Client roots from a WSL2 client are dropped by a Windows-side server (fileURLToPath ERR_INVALID_FILE_URL_PATH)

Open Beginner friendly
#2,839 2 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@nroscino is already working on this.

Since Oct 1, 2026.

  • #2840 by @Yi-111-a — closed without merging
  • #3380 by @jaeminbird — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
node.js, typescript
Domain
backend, devtools

Research direction

Start in McpContext.js at the client-root handling that calls fileURLToPath, then reproduce the WSL2-to-Windows case described in the issue. Verify that a POSIX root is retained alongside the server workspace and that take_screenshot accepts a filePath under it, while existing Windows roots continue to work.

Written by the indexing model from the issue text.

Description

confirmed p3
Description of the bug

When a client running in WSL2 (Claude Code, for example) launches chrome-devtools-mcp on the Windows side through WSL interop (Windows node.exe, Windows Chrome), the client's MCP roots are POSIX file URLs such as file:///home/user/project. On Windows, Node's fileURLToPath rejects these with ERR_INVALID_FILE_URL_PATH: File URL path must be absolute. The failed roots are dropped silently, only os.tmpdir() is left, and every filePath inside the project is refused:

Access denied: path /home/user/project/shot.png (canonical: \\wsl.localhost\Ubuntu-24.04\home\user\project\shot.png) is not within any of the configured workspace roots.

The requested path resolves correctly, against the server's UNC working directory, to \\wsl.localhost\…. Only the root never makes it into the allowed list.

Reproduction
  1. In WSL2, register the server with a Windows command, for example "command": "node.exe", "args": ["C:\\…\\chrome-devtools-mcp\\build\\src\\bin\\chrome-devtools-mcp.js"].
  2. Start the client in a WSL project directory (/home/user/project). The client advertises roots.
  3. Call take_screenshot with filePath: "/home/user/project/shot.png".
  4. The call is refused as above. The same call with a path under Windows %TEMP% succeeds.
Where

In 1.9.0, McpContext.js:

const rootPath = path.resolve(fileURLToPath(rootPathUri));

This runs inside Promise.allSettled, so the throw only logs Could not resolve configured root … and the root is skipped. Checked on Windows Node 24.20.0:

> require('url').fileURLToPath('file:///home/user/project')
Uncaught TypeError [ERR_INVALID_FILE_URL_PATH]: File URL path must be absolute
Possible fix

Parse client roots with fileURLToPath(uri, { windows: false }) when the URI has no drive letter or host, then path.resolve the result. With the server's working directory on \\wsl.localhost\<distro>\…, path.resolve('/home/user/project') gives \\wsl.localhost\<distro>\home\user\project, which is the same canonical form validatePath produces for the requested file. playwright-mcp hit the identical bug and fixed it with the same pattern: microsoft/playwright-mcp#1172.

Workaround

--workspace=\\wsl.localhost\<distro>\home\<user> on the server's args. It works because the server-side root is a Windows path.

Environment
  • chrome-devtools-mcp 1.9.0 (1.10.x's CHANGELOG lists no roots change)
  • Windows Node 24.20.0, Windows 11 build 26200
  • WSL 2.6.3 (Ubuntu 24.04)
  • Claude Code 2.1.282 in WSL2

Related but distinct: #2808, a / root that doubles the separator.

Dominant language
TypeScript
Stars
54.1k
Forks
6.3k
Avg merge
1d 16h
Merged PRs (30d)
233

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ChromeDevTools/chrome-devtools-mcp

All issues in ChromeDevTools/chrome-devtools-mcp

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.