Version
1.59.1 (also present in 1.60.0)
Steps to reproduce
- Clone https://github.com/Jozef833/playwright-mcp-bug-repro
npm install
npm run reproduce
- You should see
Error: EACCES: permission denied, mkdir '<PLAYWRIGHT_BROWSERS_PATH>/mcp-chrome-for-testing-<hash>'
Expected behavior
The MCP server should launch a browser and navigate to the requested URL.
Actual behavior
The MCP server fails with:
Error: EACCES: permission denied, mkdir '<PLAYWRIGHT_BROWSERS_PATH>/mcp-chrome-for-testing-<hash>'
Additional context
createUserDataDir creates browser profile directories inside registryDirectory, which resolves to PLAYWRIGHT_BROWSERS_PATH when that env var is set. Without it, registryDirectory defaults to defaultRegistryDirectory ($XDG_CACHE_HOME/ms-playwright or ~/.cache/ms-playwright), which is writable and works correctly.
This means any environment where PLAYWRIGHT_BROWSERS_PATH points to a read-only location will fail: NixOS (immutable Nix store), read-only Docker mounts, shared filesystem browser caches, etc. The nixpkgs playwright-mcp wrapper is one such case.
The only current workaround is PWMCP_PROFILES_DIR_FOR_TEST, which is only referenced in browserFactory.ts and tests/fixtures.ts.
Environment
System:
OS: Linux 6.6.114.1-microsoft-standard-WSL2, NixOS 26.05 (Yarara)
CPU: (32) x86_64
Binaries:
Node: v24.14.1
Packages:
playwright-core: 1.59.1
playwright-mcp: 0.0.69 (via nixpkgs)
Version
1.59.1 (also present in 1.60.0)
Steps to reproduce
npm installnpm run reproduceError: EACCES: permission denied, mkdir '<PLAYWRIGHT_BROWSERS_PATH>/mcp-chrome-for-testing-<hash>'Expected behavior
The MCP server should launch a browser and navigate to the requested URL.
Actual behavior
The MCP server fails with:
Error: EACCES: permission denied, mkdir '<PLAYWRIGHT_BROWSERS_PATH>/mcp-chrome-for-testing-<hash>'Additional context
createUserDataDircreates browser profile directories insideregistryDirectory, which resolves toPLAYWRIGHT_BROWSERS_PATHwhen that env var is set. Without it,registryDirectorydefaults todefaultRegistryDirectory($XDG_CACHE_HOME/ms-playwrightor~/.cache/ms-playwright), which is writable and works correctly.This means any environment where
PLAYWRIGHT_BROWSERS_PATHpoints to a read-only location will fail: NixOS (immutable Nix store), read-only Docker mounts, shared filesystem browser caches, etc. The nixpkgsplaywright-mcpwrapper is one such case.The only current workaround is
PWMCP_PROFILES_DIR_FOR_TEST, which is only referenced inbrowserFactory.tsandtests/fixtures.ts.Environment