Skip to content

Instantly share code, notes, and snippets.

@ElRochito
Last active May 25, 2026 09:34
Show Gist options
  • Select an option

  • Save ElRochito/f251a4231213679f31a6c97d5b8ab625 to your computer and use it in GitHub Desktop.

Select an option

Save ElRochito/f251a4231213679f31a6c97d5b8ab625 to your computer and use it in GitHub Desktop.
Electron 42 / macOS 26 arm64 — helper app crash reproduction (Unable to find helper app)

Reproduction — Electron 42 / macOS 26 arm64: "Unable to find helper app"

Step 1 — Verify the app works in dev mode

Load this Gist in Electron Fiddle and click Run. The app should launch without any error.

Step 2 — Reproduce the crash

Run reproduce.sh directly from your terminal (macOS 26, arm64 required):

bash <(curl -s https://gist.githubusercontent.com/ElRochito/f251a4231213679f31a6c97d5b8ab625/raw/reproduce.sh)

The script:

  1. Installs Electron 42 locally
  2. Launches it with the original helper names → no crash
  3. Renames the helpers to simulate what a packager does (Electron Helper.appTestApp Helper.app)
  4. Launches again → exit 133 (SIGTRAP), Unable to find helper app

No extra dependencies needed beyond Node.js and npm.

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Reproduction — Electron helper crash</title>
<style>
body { font-family: system-ui, sans-serif; padding: 24px; max-width: 640px; line-height: 1.6; }
h2 { margin-top: 0; }
code, pre { background: #f4f4f4; border-radius: 4px; font-size: 13px; }
code { padding: 2px 6px; }
pre { padding: 12px; overflow-x: auto; }
.ok { color: green; font-weight: bold; }
.warn { color: crimson; font-weight: bold; }
</style>
</head>
<body>
<h2>Reproduction — "Unable to find helper app" (macOS 26, arm64)</h2>
<p>
<span class="ok">✓ Step 1 passed</span> — this app launches correctly in dev mode (Electron Fiddle).
</p>
<p>
<span class="warn">Step 2</span> — to reproduce the crash, run the following command
in a terminal on <strong>macOS 26 arm64</strong>:
</p>
<pre>bash &lt;(curl -s https://gist.githubusercontent.com/ElRochito/f251a4231213679f31a6c97d5b8ab625/raw/reproduce.sh)</pre>
<p>
The script installs Electron 42, renames the helper apps to simulate what a packager does,
then launches the binary — expected result: <code>exit 133 (SIGTRAP)</code>,
<code>Unable to find helper app</code>.
</p>
</body>
</html>
const { app, BrowserWindow } = require('electron')
const path = require('path')
function createWindow() {
const win = new BrowserWindow({
width: 600,
height: 400,
webPreferences: {
preload: path.join(__dirname, 'preload.js'),
},
})
win.loadFile('index.html')
}
app.whenReady().then(createWindow)
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') app.quit()
})
// Empty preload — no Node.js APIs needed for this reproduction
#!/usr/bin/env bash
# Reproduction script for:
# [Bug] Helper app lookup uses hardcoded "Electron Helper" name
# Tested on: macOS 26.5 (Darwin 25.5.0), arm64, Electron 42.2.0
#
# Requirements: Node.js, pnpm (or npm/yarn)
#
# Run: bash reproduce.sh
set -e
ELECTRON_VERSION="42.2.0"
WORK_DIR="$(mktemp -d)"
echo "Working in $WORK_DIR"
# 1. Install Electron locally
cd "$WORK_DIR"
cat > package.json <<'JSON'
{ "name": "repro", "version": "1.0.0", "devDependencies": { "electron": "42.2.0" } }
JSON
npm install --silent
ELECTRON_APP="node_modules/electron/dist/Electron.app"
# 2. Verify the app works as-is (helpers still named "Electron Helper")
echo ""
echo "=== Step 1: launching with original helper names (should NOT crash) ==="
xattr -dr com.apple.quarantine "$ELECTRON_APP" 2>/dev/null || true
timeout 4 "$ELECTRON_APP/Contents/MacOS/Electron" --no-sandbox 2>&1 || true
echo "→ OK, no crash"
# 3. Copy the app and rename helpers (simulate what electron-builder does)
cp -R "$ELECTRON_APP" "$WORK_DIR/TestApp.app"
FRAMEWORKS="$WORK_DIR/TestApp.app/Contents/Frameworks"
for SUFFIX in "" " (GPU)" " (Plugin)" " (Renderer)"; do
SRC="$FRAMEWORKS/Electron Helper${SUFFIX}.app"
DST="$FRAMEWORKS/TestApp Helper${SUFFIX}.app"
if [ -d "$SRC" ]; then
mv "$SRC" "$DST"
mv "$DST/Contents/MacOS/Electron Helper${SUFFIX}" \
"$DST/Contents/MacOS/TestApp Helper${SUFFIX}" 2>/dev/null || true
fi
done
xattr -dr com.apple.quarantine "$WORK_DIR/TestApp.app" 2>/dev/null || true
# 4. Launch with renamed helpers — should crash
echo ""
echo "=== Step 2: launching with renamed helpers (SHOULD crash with exit 133) ==="
"$WORK_DIR/TestApp.app/Contents/MacOS/Electron"
EXIT_CODE=$?
echo "Exit code: $EXIT_CODE"
if [ "$EXIT_CODE" -eq 133 ]; then
echo "✓ Reproduced: exit 133 (SIGTRAP) — Unable to find helper app"
else
echo "✗ Could not reproduce on this system (exit $EXIT_CODE)"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment