App won't start after unzipping on Mac Catalina
See original GitHub issue- Version: 22.4.0
- Target: Mac / Zip
Description:
After building an electron app for macOS with Zip target, it won’t open after unzipping it by default Archive Utility app on Catalina.
Steps to reproduce:
- Build an electron app with the next build config:
"build": {
"mac": {
"target": "zip",
"icon": "./images/electron-icon-mac.icns",
"category": "Development",
"identity": null,
"sign": false
}
}
-
Run build command
electron-builder -m --x64
. -
Unzip created zip on Mac (Catalina 10.15) using Archive Utility app.
-
Try to open the unzipped
.app
file.
Actual result:
Can’t open .app
file.
Notes:
-
If unzip app with any other archiver as Better Zip or The Unarchiver, the app file works. But most MacOS users use the default Archive Utility app, so this is a major issue.
-
As I have noticed the problem occurs because of bad symlinks for Electron Framework, Libraries, and Resources in
my_electron_app.app/Contents/Frameworks/Electron Framework.framework
Not working version:
Working version:
- Also, I tried to remove line 65 in my
node_modules/app-builder-lib
here: https://github.com/electron-userland/electron-builder/blob/master/packages/app-builder-lib/src/targets/ArchiveTarget.ts#L65
if (this.isWriteUpdateInfo && format === "zip") {
// updateInfo = await (0, _differentialUpdateInfoBuilder().appendBlockmap)(artifactPath);
}
After I removed that line and built the app (zip), the symlinks were created correctly and the app started successfully.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:16
- Comments:13 (4 by maintainers)
Top GitHub Comments
Still relevant.
@kjg this is the only workaround so far: https://github.com/electron-userland/electron-builder/issues/4299#issuecomment-557316888