Skip to content

./setup hangs on "Installing Playwright Chromium" (macOS arm64); re-running spawns multiple stuck processes #2136

Description

@francoag17

Environment

  • gstack: v1.58.5.0 (commit 11de390)
  • macOS 15 (Darwin 25.5.0), Apple Silicon (arm64)
  • bun 1.3.14, node v24.16.0
  • Fresh install via the documented one-liner

What happens
./setup reaches Installing Playwright Chromium... and never returns. The browser binary (browse/dist/browse) builds fine and Chromium downloads to 100% on the first run, but the step does not complete, so the script never reaches the Claude skill-linking block (link_claude_skill_dirs, setup line ~983). Result: only the gstack router skill is registered — none of the flat-name skills (/qa, /ship, /review, …) get linked into ~/.claude/skills/.

Re-running ./setup to retry makes it worse: each invocation launches another bash ./setup + node .../playwright install chromium + oopDownloadBrowserMain.js that also hangs, so several stuck process trees accumulate:

node .../node_modules/.bin/playwright install chromium
bash ./setup --host claude --no-prefix
node .../playwright-core/lib/server/registry/oopDownloadBrowserMain.js

Likely root cause
ensure_playwright_browser() (setup line 252) verifies Chromium on macOS with a bun-based launch:

bun --eval 'import { chromium } from "playwright"; const browser = await chromium.launch(); await browser.close();'

This appears to fail/hang on macOS arm64 (similar to the Bun pipe bug oven-sh/bun#4253 that the code already works around with Node on Windows). Because the check returns non-zero, setup believes Chromium is missing on every run and re-enters bunx playwright install chromium (line 483), which itself hangs — an effectively permanent reinstall loop. Chromium is in fact already present under ~/Library/Caches/ms-playwright/.

Workaround that fixed it
Kill the stuck processes, then link skills directly without touching the Chromium step:

pkill -f "gstack/setup"; pkill -f "playwright install chromium"; pkill -f oopDownloadBrowserMain
~/.claude/skills/gstack/bin/gstack-relink   # "Relinked 53 skills as flat names"

After this, all skills (/qa, etc.) register correctly.

Suggested fixes

  1. Use the Node-based launch check on macOS too (not only Windows), or add a timeout around the bun chromium.launch() probe so a hung probe can't force a reinstall.
  2. Guard the install step against re-entry / wrap bunx playwright install chromium in a timeout, and detect an already-downloaded Chromium in ~/Library/Caches/ms-playwright/ before reinstalling.
  3. Consider running link_claude_skill_dirs before the Chromium step (or in a trap/finally) so a browser-download failure doesn't leave skills unregistered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions