ITADN

Investigate sporadic Electron build failures on Node.js 24 (extract-zip postinstall race)

#17570Openndoschek 创建于 2026-05-28
cielectron-build
N
ndoschekcommented
<!-- Please provide a detailed description of the bug. --> <!-- Note: This template is not meant for security vulnerabilities disclosure --> <!-- Any such issue, created in this repo, will be deleted on sight --> <!-- Instead please report vulnerabilities to the Eclipse Foundation's security team --> <!-- For more details, please read SECURITY.md in the repository root --> ### Bug Description: CI runs on Node.js 24 sporadically fail because `extract-zip@2.0.1` (used by Electron's, Puppeteer's and Playwright's postinstall) races against filesystem durability under Node.js 24's stream-cleanup semantics. The race manifests in three different places: - Electron postinstall drops `dist/version`, causing `theia build` to fail with `ENOENT: ... node_modules/electron/dist/version`. Example: https://github.com/eclipse-theia/theia/actions/runs/26540977150/attempts/1 - Puppeteer's Chrome install drops the Chrome executable, surfacing as `Could not find Chrome (ver. ...)` on Windows runners. Example: https://github.com/eclipse-theia/theia/actions/runs/26560102741/job/78249318351?pr=17569 - Playwright's Chromium install hangs after the download completes (extract-zip code is bundled into `playwright-core`'s `zipBundleImpl.js`, so npm `overrides` cannot reach it). Example: https://github.com/eclipse-theia/theia/actions/runs/26560102805/job/78249327941?pr=17569 A defensive workaround for the Electron symptom has been merged in #17569: `readElectronVersion` falls back to the version string in `electron/package.json` when `dist/version` is unreadable. This unblocks the majority of flaky CI run but does not address the underlying bug, and it does not cover the Puppeteer and Playwright failures yet. This issue is for investigating the situation more deeply: confirming the root cause, deciding what (if anything) to do for the Puppeteer and Playwright variants, and tracking removal of the Electron workaround once a proper fix lands. <!-- Please provide clear steps to reproduce the bug. --> ### Steps to Reproduce: 1. Remove the workaround from `dev-packages/ffmpeg/src/replace-ffmpeg.ts` (`readElectronVersion`). 2. Observe CI runs on Node.js 24 sporadically failing with the symptoms above. The race is not really reproducible locally; only the hosted CI runners trigger it reliably enough to observe. <!-- Please provide any additional information available. --> <!-- Additional information can be in the form of logs, screenshots, screencasts. --> ### Additional Information - Operating System: Windows Server 2022, Ubuntu 22.04 (GitHub Actions hosted runners). Not reproduced on macOS. - Node.js: 24.x (not reproduced on 22.x). - Theia Version: observed on CI since roughly 2026-05-26 - Related PR: #17569 <!-- 💙 Eclipse Theia is community-supported. If you find it valuable, consider sponsoring the project: https://theia-ide.org/support/ -->
0 条评论