You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
macOS: a Gutenberg build fills the Dock with "exec" icons, one per Electron-as-Node worker that sets its process title #518
On macOS, a Gutenberg build (full build, npm run dev, a PR apply, a trunk update) fills the Dock with black icons titled exec, up to a dozen at a time, one per build worker. They come and go with the build. A Core build shows none. The macOS sibling of #497 (Windows console windows): same origin, Electron running as Node below npm, different symptom.
Pinned cause. Every node the build runs is the app's shim, which execs Contents/MacOS/WordPress Contributor Toolkit with ELECTRON_RUN_AS_NODE=1. When such a process sets process.title (libuv's darwin implementation checks the process in with LaunchServices to do it), LaunchServices registers it under the bundle's Info.plist, and the main bundle has no LSUIElement, so it is a Foreground app and the Dock shows it. npm sets its title (npm run dev appears in lsappinfo list as a Foreground entry of that binary), and Gutenberg's build workers set theirs to exec. Core's grunt sets none, which is why it never showed one.
Verified on the v1.2.0-beta.1 build (621d3d5 artifact), macOS 27:
Without a process.title assignment neither binary registers, spawning children included, so it is the title, not the spawn.
Fix. On macOS, run Electron-as-Node through the Helper bundle, whose Info.plist carries LSUIElement, instead of the main binary. It is the same Electron (process.versions identical: node 24.18.0, electron 43.2.0). One resolver, nodeExecPath() beside nodeShim in src/node-shims.cjs (Helper path derived from process.execPath on darwin when it exists, process.execPath otherwise), used by the shims ensureNodeShimDir writes and by the runner spawn in main.js (spawn(process.execPath, [runnerPath…])), so the runners themselves stop registering too. Windows and Linux keep process.execPath. The runners set npm_node_execpath from process.execPath (install-runner.js, script-runner.js); once they run on the Helper that is already the Helper.
Step-by-step reproduction instructions
macOS, Gutenberg site past the install step.
Run full build, or Start build watch.
Expected: nothing new in the Dock. Actual: black exec icons appear during the transpile/bundle phases and vanish when the build ends.
Operating system
macOS 27.0 (Apple Silicon). Not applicable to Windows (#497 covers it) or Linux.
App version
v1.2.0-beta.1 and trunk at 621d3d5. Seen during the manual pass of #516. Pre-existing: the macOS shim is unchanged since #395 (v1.1.0), and Core builds never set a title.
Activity
[Tests] Pin the runners and the shims to nodeExecPath, and say when m…
[Fix] Pass NODE_OPTIONS to Electron as arguments in the macOS shims (#…
[Fix] Run Electron as Node through the Helper bundle on macOS so buil…