electron-builder: Operation not permitted during dmg building on macOS 11 Big Sur
- Version: electron-builder@22.9.1
- Electron Version:electron@11.0.4
- Electron Type (current, beta, nightly):current
- Electron updater: electron-updater@4.3.1
- Target:
dmgfor macOS
After setting DEBUG=electron-builder DEBUG_DMG=true, the console logs error during copy:
2020-12-10 11:45:43.585 copy-helper[54295:350710] About to copy "/path/app.app".
2020-12-10 11:45:44.255 copy-helper[54295:350710] copy error (canceling): /Volumes/img/app.app/Contents/Resources/app.asar.unpacked/node_modules/npm/node_modules/libnpmorg/.BC.T_K9LSTf: Operation not permitted
2020-12-10 11:45:44.255 copy-helper[54295:350710] Copy finished with error 1 (Operation not permitted).
................................Error 1 (Operation not permitted).
could not access /Volumes/img/app.app/Contents/Resources/app.asar.unpacked/node_modules/npm/node_modules/libnpmorg/.BC.T_K9LSTf - Operation not permitted
Then building ultimately failed with:
2020-12-10 11:45:45.386 diskimages-helper[54280:350655] *useEffectiveIDs**** euid/egid changed to 501,20 (uid/gid is 501,20)
DIHLDiskImageCreate() returned 1
hdiutil: create: returning 1
hdiutil: create failed - Operation not permitted
...
⨯ hdiutil exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE stackTrace=
Error: hdiutil exited with code ERR_ELECTRON_BUILDER_CANNOT_EXECUTE
at ChildProcess.<anonymous> (/Users/gnattu/src/poi/node_modules/builder-util/src/util.ts:243:14)
at Object.onceWrapper (node:events:483:26)
at ChildProcess.emit (node:events:376:20)
at maybeClose (node:internal/child_process:1063:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:295:5)
I can create an image with appdmg for the same app.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 25 (2 by maintainers)
Commits related to this issue
- #5465: Switching from `isBinary` to `istextorbinary`. Exposing `getFilePathIfBinarySync` to app-builder-lib to consolidate binary detection logic — committed to mmaietta/electron-builder by deleted user 4 years ago
- #5465: Switching from `isBinary` to `istextorbinary`. Exposing `getFilePathIfBinarySync` to app-builder-lib to consolidate binary detection logic — committed to mmaietta/electron-builder by deleted user 4 years ago
- #5465: Switching from `isBinary` to `istextorbinary`. Exposing `getFilePathIfBinarySync` to app-builder-lib to consolidate binary detection logic — committed to mmaietta/electron-builder by deleted user 4 years ago
- fix: binary detection signing (#5493) * Check if each binary path exists, otherwise resolve all binaries from the artifact's app Contents path * #5465: Switching from `isBinary` to `istextorbinary... — committed to electron-userland/electron-builder by mmaietta 4 years ago
- Bump app-builder-lib from 22.9.1 to 22.10.5 in /desktop (#2072) Summary: allow-large-files Bumps [app-builder-lib](https://github.com/electron-userland/electron-builder) from 22.9.1 to 22.10.5. <deta... — committed to facebook/flipper by dependabot[bot] 3 years ago
- Bump electron-builder from 22.9.1 to 22.10.5 in /desktop (#2068) Summary: Bumps [electron-builder](https://github.com/electron-userland/electron-builder) from 22.9.1 to 22.10.5. <details> <summary>Re... — committed to facebook/flipper by dependabot[bot] 3 years ago
By removing “-fs”, “HFS+”, “-fsargs”, “-c c=64,a=16,e=16”, dmg creation does work on Big Sur. Looks like HFS+ image creation is broken.
@lutzroeder Yes, I can confirm that some files are incorrectly signed:
The file is just a text file indicating a PR template, but it is detected as a binary and got signed.