executeautomation/mcp-playwright

`playwright-mcp-server` references outdated Chromium path causing "Executable doesn't exist" error

Closed this issue · 1 comments

g8d3 commented

Description

When using the gemini CLI with @executeautomation/playwright-mcp-server configured via the Model Context Protocol (MCP), it failed with the following error:

MCP error -32603: browserType.launch: Executable doesn't exist at ~/.cache/ms-playwright/chromium-1161/chrome-linux/chrome

The error occurred because playwright-mcp-server referenced an outdated Chromium path (chromium-1161), while Playwright 1.53.1 uses a newer version (chromium-1179).

Environment

  • OS: Ubuntu 24.04.2 LTS
  • Node.js: v22.13.1
  • Playwright: 1.53.1
  • @executeautomation/playwright-mcp-server: 1.0.6
  • Gemini CLI: 0.1.12

Steps to Reproduce

  1. Install Playwright 1.53.1 and @executeautomation/playwright-mcp-server@1.0.6.
  2. Configure gemini with a settings.json file to use playwright-mcp-server:
    {
      "mcpServers": {
        "playwright": {
          "name": "playwright",
          "command": "npx",
          "args": ["@executeautomation/playwright-mcp-server"]
        }
      }
    }
  3. Clear or corrupt the Playwright cache (~/.cache/ms-playwright).
  4. Run a gemini command like echo "go to google" | gemini.

Expected Behavior

playwright-mcp-server should use the Chromium version matching Playwright 1.53.1 (chromium-1179) or reinstall browsers if the executable is missing.

Actual Behavior

playwright-mcp-server attempted to use a non-existent chromium-1161 path, causing the error.

Attempted Fix

Clear the cache and reinstall browsers:

rm -rf ~/.cache/ms-playwright
npx playwright install chromium --force

Alternatively, set PLAYWRIGHT_BROWSERS_PATH in settings.json to force the correct cache directory:

{
  "mcpServers": {
    "playwright": {
      "name": "playwright",
      "command": "npx",
      "args": ["@executeautomation/playwright-mcp-server"],
      "env": {
        "PLAYWRIGHT_BROWSERS_PATH": "~/.cache/ms-playwright"
      }
    }
  }
}
g8d3 commented

I could not find the reason why playwright looks for executable in ~/.cache/ms-playwright/chromium-1161

Here is the way to install revision 1161:

mkdir -p ~/.cache/ms-playwright/chromium-1161
wget https://playwright.azureedge.net/builds/chromium/1161/chromium-linux.zip
unzip chromium-linux.zip -d ~/.cache/ms-playwright/chromium-1161
rm chromium-linux.zip 

I suppose 1161 can be changed to any revision.