garrytan / garrytan/gstack

`playwright install` hangs on Node 24.16+ — bump pinned playwright from `^1.58.2` to `^1.60.0`

Open
#1,703 4 comments 20 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
133k
Forks
19.9k
Avg merge
18h 46m
Merged PRs (30d)
26

Description

## Summary

gstack's `./setup` calls `playwright install chromium`, which hangs indefinitely on Node 24.16.0+ (and Node 26.x) due to a yauzl extraction-hang bug in Playwright versions < 1.60.0. gstack pins `playwright ^1.58.2` in `package.json`, so it inherits the bug. Fix is a one-line version bump.

## Symptoms

Running `cd ~/.claude/skills/gstack && ./setup` (or the gstack `setup` script via any wrapper) hangs at:

```
Downloading Chrome for Testing 145.0.7632.6 (playwright chromium v1208) from https://cdn.playwright.dev/...
179.6 MiB [====================] 100% 0.0s
```

The download completes (100%), then extraction silently stalls. Inspecting the cache after ~5 min shows only the large `chrome` binary was written; all other files in the bundle (locales, resources, `icudtl.dat`, etc.) are missing:

```bash
$ ls ~/.cache/ms-playwright/chromium-1208/chrome-linux/
chrome vk_swiftshader_icd.json
$ du -sh ~/.cache/ms-playwright/chromium-1208/
428M . # should be ~600 MB
```

The download worker processes die silently mid-extraction, leaving the parent (`bunx playwright install`) hanging on stale IPC pipes.

## Environment

- gstack: current HEAD of main (last reproduced 2026-05-25)
- Host: macOS arm64 (Apple Silicon) with Docker Desktop devcontainer
- Container: `node:24.16.0` (rolled forward from `node:24.15.0` sometime between May 23–25, 2026)
- Playwright in `~/.claude/skills/gstack/node_modules/`: 1.58.2 (matches `package.json` pin of `^1.58.2`)

## Root cause

This is microsoft/playwright#40724 — a yauzl stream-destruction regression that hangs `for await` over `openReadStream` on Node 24.16.0+ and Node 26.x. The issue reporter saw it on Node 26.1.0; a comment in that thread provides a clean repro showing the bug bisects to Node 24.16.0:

```bash
# WEDGES at "100% of 183 MiB" then silence forever:
docker run --rm node:24.16.0 bash -c 'npm install playwright@1.59.1; npx playwright install chromium'

# WORKS in seconds:
docker run --rm node:24.15.0 bash -c 'npm install playwright@1.59.1; npx playwright install chromium'
```

Fix vendored into Playwright **1.60.0** via microsoft/playwright#40747 (merged 2026-05-09).

## Suggested fix

One-line bump in `package.json`:

```diff
- "playwright": "^1.58.2",
+ "playwright": "^1.60.0",
```

Plus matching update in `bun.lockb` (or `bun install` after the bump). I'm happy to send a PR if helpful.

## Workarounds (for anyone hitting this before the bump lands)

1. **Pin Node** to 24.15.0 in your environment (one-line Dockerfile change for devcontainer users): `FROM node:24` → `FROM node:24.15.0`.
2. **Pre-install chromium** with a fixed Playwright before invoking gstack's setup — the dir-exists check in Playwright's install will then skip the buggy extraction:
```bash
PLAYWRIGHT_BROWSERS_PATH="$HOME/.cache/ms-playwright" \
npx -y playwright@1.60.0 install chromium chromium-headless-shell
cd ~/.claude/skills/gstack && ./setup
```
(Caveat: 1.60.0 ships chromium build 1223; gstack's vendored `browse` binary expects 1208. If gstack's runtime strictly validates the build number you'd need to fetch 1208 manually via `curl` + `unzip` to bypass yauzl entirely.)

## Related

- microsoft/playwright#40724 — upstream issue
- microsoft/playwright#40747 — upstream fix
- (Separate concern worth a follow-up issue: `./setup` gates `playwright install` on `NEEDS_BUILD=1`, so any caller that pre-builds binaries — e.g. to dodge the bun virtiofs bug — accidentally suppresses Playwright install. Happy to file as a separate issue if useful.)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.