electron-builder
electron-builder copied to clipboard
Error "Unable to find helper app" when "productName" and "exectuableName" set to different names
- Electron-Builder Version: 23.1.0
- Node Version: 16.14.0
- Electron Version: 19.0.4
- Electron Type (current, beta, nightly): current
- Target: macOS
I created an example project to help understanding the problem I met, please run the following command to build a macOS bundle from my example project:
git clone https://github.com/haoxi911/electron-builder-test.git
cd electron-builder-test
npm install
npm run app:dir
This project sets "productName" to "My App" and "executableName" to "MyAppForMac", it creates a macOS bundle named "MyAppForMac.app", but it can't be launched, see:
➜ electron-builder-test git:(master) ✗ ./dist/mac/MyAppForMac.app/Contents/MacOS/MyAppForMac
[0626/175227.941996:FATAL:electron_main_delegate_mac.mm(71)] Unable to find helper app
[1] 84344 trace trap ./dist/mac/MyAppForMac.app/Contents/MacOS/MyAppForMac
If I remove "executableName" from electron-builder settings, it will create a macOS bundle named "My App.app" and won't crash. My question is, is it possible to set both fields with different values?
Looks like that code is deep in electron source code, I'm not sure what electron-builder can do for this issue other than not allow productName
and executableName
to be different on Mac. That being said, I'm surprised this wasn't reported sooner 🤔
Hello, is there any workaround for this issue? I would like to rename the execute from "A very very very long product name" to "shortname". Thank you.
Also running into the same issue, this is causing a fatal crash on all macOS versions for end users... See my last comment here: https://github.com/electron/electron/issues/34253#issuecomment-1669054462 for how to reproduce.