codebytere

#53831: fix: don't start an app instance when a helper is executed without --type

Merged
Created: Sep 11, 2026, 2:41:34 PM
Merged: Sep 11, 2026, 7:46:29 PM
3 comments
Target: main

Description of Change

On macOS the helper executables link the same framework as the main binary, so running one without a --type argument boots it as a full browser process from inside the helper bundle. That process derives its child helper paths from its own name (App Helper (Plugin) (GPU).app, ...), so its GPU and renderer launches fail and its sandboxed utilities abort in OverrideChildProcessPath with "Unable to find helper app", relaunching in a loop. The easiest way to get there today is child_process.fork() in an app that has the runAsNode fuse disabled: the fork wrapper points execPath at the helper and sets ELECTRON_RUN_AS_NODE=1, the fuse ignores the variable, and the helper starts as an app.

Two changes:

  • Helper executables now exit with EX_USAGE and a message when started without --type, the same guard Chrome has in ChromeMainDelegate ("Helper application requires --type"). Every legitimate helper launch from content carries --type.
  • child_process.fork() throws when the runAsNode fuse is disabled instead of spawning a process that cannot work. The fuses tutorial already said fork "will not function as expected" in that configuration; it now says it throws.

Checklist

Release Notes

Notes: Fixed helper executables on macOS starting a second app instance when launched without a process type, for example through child_process.fork() with the runAsNode fuse disabled; fork() now throws in that configuration.

Backports

44-x-y
Merged
PR Number
#53840
Merged At
Sep 11, 2026, 10:17:43 PM
Released In
Not yet
Release Date
Not yet
45-x-y
Merged
PR Number
#53839
Merged At
Sep 11, 2026, 10:17:45 PM
Released In
Not yet
Release Date
Not yet

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron