-
Notifications
You must be signed in to change notification settings - Fork 605
Description
Title: macOS ARM64: agent-browser fails to launch due to Playwright browser revision mismatch (expects chromium_headless_shell-1200, installed -1208)
1. Summary
On macOS Apple Silicon, agent-browser open fails because agent-browser looks for a Playwright-managed chromium_headless_shell binary in a cache directory ending in -1200, but agent-browser install installs the browser into a directory ending in -1208. This results in “Executable doesn’t exist” at launch time.
2. Error
text
Executable doesn't exist at
/Users/[USER]/Library/Caches/ms-playwright/chromium_headless_shell-1200/chrome-headless-shell-mac-arm64/chrome-headless-shell
3. Environment
OS: macOS (Darwin 25.2.0)
Architecture: ARM64 (Apple Silicon)
agent-browser: latest (replace with exact version if known)
Playwright browser revision: 1208 (installed by agent-browser install)
4. Steps to reproduce
Install agent-browser.
Run agent-browser install.
Run: agent-browser open https://example.com
Observe error: executable not found in a path containing chromium_headless_shell-1200.
5. Expected behavior
agent-browser should locate and launch the Playwright-installed browser binary that exists on disk, without assuming a specific browser revision directory name.
6. Actual behavior
agent-browser attempts to launch from:
/Users/[USER]/Library/Caches/ms-playwright/chromium_headless_shell-1200/
but the installed Playwright browser is located at:
/Users/[USER]/Library/Caches/ms-playwright/chromium_headless_shell-1208/
7. Workaround
Create a symlink so the expected directory name points to the installed revision:
bash
ln -sf "/Users/[USER]/Library/Caches/ms-playwright/chromium_headless_shell-1208"
"/Users/[USER]/Library/Caches/ms-playwright/chromium_headless_shell-1200"
7.1 Why this isn’t ideal
Requires manual intervention.
Likely to break on future Playwright browser revision updates.
Doesn’t address the underlying path resolution logic.
8. Suggested fix
agent-browser should avoid hardcoding a Playwright browser revision in its executable path. Options:
Use Playwright’s own launch/path resolution (e.g., chromium.launch() and let Playwright pick the executable).
If agent-browser must manage paths, dynamically discover the installed chromium_headless_shell-* directory (or read the revision from Playwright metadata) and use that.
9. Impact
Severity: Medium (workaround exists, but it’s brittle).
Frequency: Reproducible whenever the installed Playwright browser revision differs from the revision agent-browser expects.
Users affected: macOS ARM64 at minimum; possibly other platforms if the revision is assumed there as well.
- Related / context
This may be related to how agent-browser integrates with Playwright’s browser management. Consider relying on Playwright’s built-in path resolution:
js
const { chromium } = require('playwright');
const browser = await chromium.launch(); // Playwright handles path resolution