You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "JasonBuildAI (via GitHub)" <gi...@apache.org> on 2026/10/11 12:10:21 UTC
[I] build: npm install hangs when the Electron download stalls [maka]
JasonBuildAI opened a new issue, #6063:
URL: https://github.com/apache/maka/issues/6063
### What happened
`npm install` / `npm ci` can hang indefinitely during the root `postinstall` when the Electron download stalls. `scripts/install-electron-with-retry.mjs` (added in #2594 for #2402) is meant to retry transient Electron download failures, but it only classifies failures that make the child process exit with a structured context line on fd 3 (`{"kind":"fetch","code":...}` / `{"kind":"http","status":...}`, emitted by `scripts/run-electron-installer.cjs`).
When the download connection stays open but stops making progress (throttled CDN, or an established connection that never delivers), the child neither exits nor emits a context line. `spawnSync` has no timeout, so nothing retries and nothing fails: npm appears frozen indefinitely, and even `DEBUG=@electron/get*` shows nothing after `Downloading <url> to <tmp>` because the child's stderr is only written through after it exits.
Expected: an attempt that stops making progress should be abandoned, classified as retryable, and retried within the existing five-attempt backoff budget; a stall should end in a clear failure instead of a hang.
### How to reproduce
Deterministic, no external network required:
1. Serve the artifact from a local HTTP server that replies `200` with a large `content-length` and then trickles a few bytes indefinitely without ever completing the body (for example 4 KB every 45 s, which stays below the runtime's body-idle timeout).
2. Force the installer to download instead of reusing the installed copy: `ELECTRON_MIRROR=http://127.0.0.1:8391/ electron_config_cache=<fresh dir> ELECTRON_OVERRIDE_DIST_PATH=<missing dir> node scripts/install-electron-with-retry.mjs` (the fresh cache makes it a cache miss; the missing dist path skips `isInstalled()`).
3. At commit fa26868 the run produces no output, prints no `[install-electron]` retry line, and is still running when externally bounded at 120 s:
```text
[BOUNDED] still running after 120s; killing process tree of pid 18556
SUCCESS: The process with PID 3188 (child process of PID 18556) has been terminated.
[BOUNDED] exited code=1 signal=null after 120.4s
```
Observed in the wild on the same machine: the real release URL `https://github.com/electron/electron/releases/download/v43.4.1/electron-v43.4.1-win32-x64.zip` stalls after the `Downloading ... to <tmp>` debug line with no further output for 10+ minutes and the idle process has to be killed by hand before `npm install` fails with `code 4294967295`; the same install completes in seconds when the artifact is fetched through a mirror.
### Environment
- Maka commit: fa26868 (upstream main)
- OS: Windows 11 (10.0.26200); Node.js v24.21.0; npm 11.19.0
- Surface: repository install (root `postinstall`), also used by CI dependency setup
- Network: direct GitHub release-CDN downloads stall on this connection
### Logs, screenshots, or additional context
The hang is silent: the wrapper captures the child's stderr and only writes it through after the child exits, so a stalled attempt shows no progress, no error, and no retry.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [I] build: npm install hangs when the Electron download stalls [maka]
Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han closed issue #6063: build: npm install hangs when the Electron download stalls
URL: https://github.com/apache/maka/issues/6063
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org