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
Which Electron Fuses can electron-builder 26 set at pack time, and which are safe for this app: it spawns bundled RAxML binaries from static/bin, ships universal macOS builds with mergeASARs: false, reads __static, and auto-updates via electron-updater. Any interaction between ASAR integrity / OnlyLoadAppFromAsar and universal builds or the e2e launch in e2e/?
electron-builder 26 sets fuses through the electronFuses config key (added in 26.0.0-alpha.2). It flips them after afterPack and right before signing. For arch: universal it flips them once, on the merged app. The repo's electron-builder 24.13.3 has no such key, so this waits for the 24 to 26 upgrade.
Fuse (electronFuses key)
What it does
raxmlGUI
runAsNode
Honors ELECTRON_RUN_AS_NODE. Off breaks fork.
false: safe. Binaries run through execFile, and nothing uses fork, including electron-updater.
enableCookieEncryption
Encrypts cookies with OS keys. One-way.
true: safe, but low value (no cookies). Never flip it back.
enableNodeOptionsEnvironmentVariable
Honors NODE_OPTIONS and NODE_EXTRA_CA_CERTS.
false: safe.
enableNodeCliInspectArguments
Honors --inspect* and SIGUSR1.
false: safe for shipped builds. Playwright always passes --inspect=0, so a fused build can't be driven by e2e. Current e2e runs the unfused dev binary on out/main/index.js, so it is unaffected.
enableEmbeddedAsarIntegrityValidation
Validates the app.asar header hash. A mismatch kills the app.
true: safe on eb 26. eb 26 writes the hash for mac and win. For the universal build, @electron/universal rehashes every asar in Resources into Info.plist. Linux: no effect.
onlyLoadAppFromAsar
Loads only app.asar.
true: safe (asar is on). Integrity needs it.
loadBrowserProcessSpecificV8Snapshot
Custom main-process snapshot.
Leave unset.
grantFileProtocolExtraPrivileges
Extra privileges for file:// pages.
Leave enabled for now. The renderer is Vite ES modules loaded from file://. Whether they load with this fuse off is untested, so it needs a packaged smoke test first.
wasmTrapHandlers
WASM bounds trapping.
No eb 26 key. Leave it at the default.
Universal with mergeASARs: false: if the x64 and arm64 asars are the same, the build keeps one app.asar. If they differ, it writes app-x64.asar and app-arm64.asar plus a shim app.asar. All of them get integrity entries, so integrity and onlyLoadAppFromAsar still hold. static/bin sits outside the asar (extraResources): no fuse affects execFile on it, and integrity does not cover it (the macOS code signature does). electron-updater: Squirrel.Mac checks the signature, and the fuses are inside the signed binary. The RC check should run npx @electron/fuses read --app … after the auto-update.
Suggested config: runAsNode:false, enableCookieEncryption:true, enableNodeOptionsEnvironmentVariable:false, enableNodeCliInspectArguments:false, enableEmbeddedAsarIntegrityValidation:true, onlyLoadAppFromAsar:true. This matches the Electron Forge template defaults.
New open question (unrelated to fuses):electron.vite.config.js sets __static to an absolute build-machine path. In a packaged app, binaryDir may then point at the CI checkout instead of Resources/static/bin. This needs checking on a packaged build.
Sources: electronjs.org fuses and asar-integrity; electron-builder v26.0.20 source (configuration.ts, platformPackager.ts, macPackager.ts, electronMac.ts, electronWin.ts) and its CHANGELOG; @electron/universal v2.0.3 (index.ts, integrity.ts, has-asar.ts); Forge vite template; playwright-core electron.ts.
Activity
jtklein-agents commentedon Nov 24, 2026
Answer
electron-builder 26 sets fuses through the
electronFusesconfig key (added in 26.0.0-alpha.2). It flips them afterafterPackand right before signing. Forarch: universalit flips them once, on the merged app. The repo's electron-builder 24.13.3 has no such key, so this waits for the 24 to 26 upgrade.electronFuseskey)runAsNodeELECTRON_RUN_AS_NODE. Off breaksfork.execFile, and nothing usesfork, including electron-updater.enableCookieEncryptionenableNodeOptionsEnvironmentVariableNODE_OPTIONSandNODE_EXTRA_CA_CERTS.enableNodeCliInspectArguments--inspect*andSIGUSR1.--inspect=0, so a fused build can't be driven by e2e. Current e2e runs the unfused dev binary onout/main/index.js, so it is unaffected.enableEmbeddedAsarIntegrityValidationapp.asarheader hash. A mismatch kills the app.Info.plist. Linux: no effect.onlyLoadAppFromAsarapp.asar.loadBrowserProcessSpecificV8SnapshotgrantFileProtocolExtraPrivilegesfile://pages.file://. Whether they load with this fuse off is untested, so it needs a packaged smoke test first.wasmTrapHandlersUniversal with
mergeASARs: false: if the x64 and arm64 asars are the same, the build keeps oneapp.asar. If they differ, it writesapp-x64.asarandapp-arm64.asarplus a shimapp.asar. All of them get integrity entries, so integrity andonlyLoadAppFromAsarstill hold.static/binsits outside the asar (extraResources): no fuse affectsexecFileon it, and integrity does not cover it (the macOS code signature does). electron-updater: Squirrel.Mac checks the signature, and the fuses are inside the signed binary. The RC check should runnpx @electron/fuses read --app …after the auto-update.Suggested config:
runAsNode:false, enableCookieEncryption:true, enableNodeOptionsEnvironmentVariable:false, enableNodeCliInspectArguments:false, enableEmbeddedAsarIntegrityValidation:true, onlyLoadAppFromAsar:true. This matches the Electron Forge template defaults.New open question (unrelated to fuses):
electron.vite.config.jssets__staticto an absolute build-machine path. In a packaged app,binaryDirmay then point at the CI checkout instead ofResources/static/bin. This needs checking on a packaged build.Sources: electronjs.org fuses and asar-integrity; electron-builder v26.0.20 source (
configuration.ts,platformPackager.ts,macPackager.ts,electronMac.ts,electronWin.ts) and its CHANGELOG; @electron/universal v2.0.3 (index.ts,integrity.ts,has-asar.ts); Forge vite template; playwright-coreelectron.ts.Full notes: https://github.com/jtklein-agents/raxmlGUI/blob/research/electron-fuses/docs/research/electron-fuses.md