playwright: force --browser chromium (v2 / 1.0.1)

default 'chrome' channel requires system Google Chrome, missing on slim
Linux hosts; use the postinstall-downloaded Chromium build instead
This commit is contained in:
Daniele
2026-08-19 18:20:13 +01:00
parent fa8bbcb808
commit f02bb78ebd
5 changed files with 14 additions and 9 deletions
+4
View File
@@ -20,6 +20,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Icons: official Playwright SVG (Microsoft catalog), sized 48/96. - Icons: official Playwright SVG (Microsoft catalog), sized 48/96.
- Tested E2E reproducing skald's path (`npm install --omit=dev` + `node index.js`): `initialize`, `tools/list` (24 tools), real `browser_navigate` + `browser_snapshot` on https://example.com ✅, verify probe ok ✅ - Tested E2E reproducing skald's path (`npm install --omit=dev` + `node index.js`): `initialize`, `tools/list` (24 tools), real `browser_navigate` + `browser_snapshot` on https://example.com ✅, verify probe ok ✅
### Fixed
- **playwright: default browser channel `chrome` → forced `--browser chromium` (v2 / 1.0.1)** — `@playwright/mcp` 0.0.79 defaults to the `chrome` channel, i.e. *system Google Chrome*: on slim Linux hosts (no `/opt/google/chrome/chrome`) every tool call failed with `Chromium distribution 'chrome' is not found at /opt/google/chrome/chrome`. It went unnoticed in local testing because macOS borrowed the installed system Chrome, and `verify.js` (plain `chromium.launch`, no channel) probes the OSS build — not the one the server would actually launch. The wrapper now passes `--browser chromium` (the Chrome-for-Testing build downloaded by the postinstall hook, same as the official Docker image). Confirmed via the browser session registry: `channel: chrome-for-testing` after the fix vs `chrome` before.
## 2026-08-10 ## 2026-08-10
### Fixed ### Fixed
+5 -5
View File
@@ -1270,8 +1270,8 @@
"type": "none" "type": "none"
}, },
"folder": "playwright", "folder": "playwright",
"version": 1, "version": 2,
"version_string": "1.0.0", "version_string": "1.0.1",
"version_release_date": "2026-08-19", "version_release_date": "2026-08-19",
"tools": [ "tools": [
{ {
@@ -1374,7 +1374,7 @@
"files": [ "files": [
{ {
"path": "connector.json", "path": "connector.json",
"sha256": "aa9e6ac53b7c7abaa595ce99fcf903e0fffffb28f385c4d9d5107d16be4c8978", "sha256": "9ebfaacc83fe8db6ddb115e7541f10cea9d146a4e65c55aae5cee3a39824ce7f",
"size": 4031 "size": 4031
}, },
{ {
@@ -1389,8 +1389,8 @@
}, },
{ {
"path": "index.js", "path": "index.js",
"sha256": "7bbdee60a27013fa3b4b139d90b83f3c72c25520693e76c6e8860d7085446dc8", "sha256": "16235e1124850536ce6435d6c13d1234893699901b6f9128b36c9937ff98f7f2",
"size": 1537 "size": 1719
}, },
{ {
"path": "package.json", "path": "package.json",
+2 -2
View File
@@ -45,8 +45,8 @@
"web", "web",
"scraping" "scraping"
], ],
"version": 1, "version": 2,
"version_string": "1.0.0", "version_string": "1.0.1",
"version_release_date": "2026-08-19", "version_release_date": "2026-08-19",
"tools": [ "tools": [
{ {
+2 -2
View File
@@ -22,8 +22,8 @@
"type": "none" "type": "none"
}, },
"folder": "playwright", "folder": "playwright",
"version": 1, "version": 2,
"version_string": "1.0.0", "version_string": "1.0.1",
"version_release_date": "2026-08-19", "version_release_date": "2026-08-19",
"tools": [ "tools": [
{ {
+1
View File
@@ -24,6 +24,7 @@ const packageDir = dirname(require.resolve("@playwright/mcp/package.json"));
process.argv = [ process.argv = [
process.argv[0], process.argv[0],
"playwright-mcp", "playwright-mcp",
"--browser", "chromium", // default is the "chrome" channel (system Google Chrome), which is not installed on slim hosts; use the Chromium build downloaded by the postinstall hook
"--headless", // no display in the container/host session "--headless", // no display in the container/host session
"--isolated", // in-memory profile: no shared cookies/login state on disk "--isolated", // in-memory profile: no shared cookies/login state on disk
"--no-sandbox", // Chromium sandbox cannot run inside containers "--no-sandbox", // Chromium sandbox cannot run inside containers