iOS builds hang silently until max-duration: PREBUILD's trailing install spawn has no inactivity watchdog
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 236
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 91
Description
## Summary
The PREBUILD phase ends by awaiting a second workingdir package-manager install. That spawn resolves on the child's `close` event and has **no inactivity watchdog**. When the package manager wedges after printing its final line, the build produces zero further output and runs silently until the max-duration cap kills it. The neighboring phases both protect against exactly this: INSTALL_DEPENDENCIES and INSTALL_PODS carry 15/30-minute inactivity watchdogs. The PREBUILD trailing install is the unprotected sibling.
## What happened
Four consecutive iOS builds of our SDK 56 pnpm monorepo hung with the same signature:
- Last log line: `Done in Xs using pnpm v11.5.2` (the PREBUILD workingdir install finishing).
- No `End phase: PREBUILD` marker. INSTALL_PODS never logs a single line.
- Silence until the max-duration cap cancels the build (45 min free tier, 120 min paid).
- `--clear-cache` changed nothing. Verbose env changed nothing. Android built the same commits fine.
Build IDs (project `5e6bf560-6110-4ca1-8268-b4076dc2fc7b`, account `groundtruth`):
- `398a904d-be61-487d-8924-0a18fc611e5f` (killed at 45 min)
- `b7f0505f-6630-4089-b252-085627b2fe44` (killed at 120 min)
- `8133efff-d281-44b1-8caf-42cd6ee5975c` (killed at 120 min, `--clear-cache`)
- `d9e54ed1-25ef-4233-b658-15f2bd1d6b74` (self-canceled at 20 min during diagnosis)
## Root cause
pnpm 11.5.2 on the darwin worker completes the install, prints `Done`, and never exits. This matches a known pnpm bug family (for example pnpm/pnpm#9530: install hangs indefinitely after showing done). Because the spawn resolves on `close` and nothing watches it, the build waits forever with no output.
Pinning `packageManager: "pnpm@11.21.0"` fixed it immediately. The identical build now finishes in under 20 minutes.
## Request
Add the same inactivity watchdog that INSTALL_DEPENDENCIES and INSTALL_PODS already have to the PREBUILD trailing install spawn. A wedged package manager should fail fast with a clear error instead of burning the full build window in silence. A stuck build at this boundary is very hard to diagnose from the outside: the log looks like a successful install with nothing after it.
## Environment
- eas-cli 12.x, iOS, `production` profile, Expo SDK 56, RN 0.85.3
- pnpm workspace monorepo, `nodeLinker: hoisted`, app in `apps/mobile`
- Failing pnpm: 11.5.2. Working pnpm: 11.21.0. Same commit otherwise.
Contributor guide
Research direction
Start at the PREBUILD trailing install spawn and compare its lifecycle with the inactivity watchdogs in INSTALL_DEPENDENCIES and INSTALL_PODS. Reproduce an iOS build with the reported hanging package-manager behavior, then verify that silence at this boundary produces a clear failure before the max-duration cap and that normal installs still reach the End phase: PREBUILD marker.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- ci-cd, mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100