Skip to content

fix(install-browsers): stop hanging on silent playwright install#121

Open
rarmatei wants to merge 5 commits into
mainfrom
investigate-timeouts-with-browser-step-7cf12e5d
Open

fix(install-browsers): stop hanging on silent playwright install#121
rarmatei wants to merge 5 commits into
mainfrom
investigate-timeouts-with-browser-step-7cf12e5d

Conversation

@rarmatei
Copy link
Copy Markdown
Contributor

@rarmatei rarmatei commented May 26, 2026

  • Download hits 100%, then silence; runner kills after 10m no-output
  • Root cause: async exec pipes stdio; playwright spawns helpers (npx wrapper, unzip, host validators) that inherit those pipe fds and outlive the immediate child, so the 'close' event never fires

this PR:

  • Drop the pipes: execSync with stdio: 'inherit'
  • Matches the Cypress branch directly below and every other install step in this repo (install-aws-cli, install-mise, install-node, install-node-modules)
  • No pipes to wait on, output streams live, file shrinks from ~250 → ~35 lines

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented May 26, 2026

View your CI Pipeline Execution ↗ for commit 5cff3b7

Command Status Duration Result
nx affected -t test ✅ Succeeded <1s View ↗
nx run-many -t build ✅ Succeeded 1s View ↗

☁️ Nx Cloud last updated this comment at 2026-05-26 16:31:01 UTC

@rarmatei rarmatei force-pushed the investigate-timeouts-with-browser-step-7cf12e5d branch from a340a42 to 7cb51ad Compare May 26, 2026 10:54
rarmatei added 2 commits May 26, 2026 13:39
Replace async exec with execSync + stdio: 'inherit', matching the
Cypress branch directly below and the install-aws-cli step. The hang
was Node waiting on stdio pipes inherited by playwright's grandchild
processes; with no pipes there's nothing to wait on.
…spect package manager

Wrap playwright/cypress install in a retry helper modeled on
install-node-modules: 3 attempts by default (NX_CLOUD_INPUT_max_retries),
exponential backoff, per-attempt timeout bounded by a 10-minute total
deadline so a stalled CDN download can't hang the step indefinitely.

Forward execSync's .status on final failure so playwright's exit code
isn't silently rewritten to 1 (restores #105).

Pick the right launcher (npx / yarn / pnpm exec) based on the lockfile
instead of hardcoding npx.
@rarmatei rarmatei force-pushed the investigate-timeouts-with-browser-step-7cf12e5d branch from 445f802 to c9dba4d Compare May 26, 2026 12:40
rarmatei added 3 commits May 26, 2026 15:50
….json

- switch from execSync to spawn with a stderr tee: live progress
  streams to the parent while we still accumulate stderr for the
  apt-recovery regex (and no 1 MB maxBuffer ceiling)
- drop the silent return on malformed package.json so a parse error
  surfaces via the top-level catch (exit 1) as it did before
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant