4 posts / 0 new
Last post
ahijleh
Build fails when attempting to sign the Plantronics macOS SDK
I've recently added the Plantronics macOS SDK (3.17.52868.13817) to my Electron project.   Without signing the application, the build is OK and the application runs well.   With signing, the build fails with this error:   > MY_APPLICATION@1.0.0 dist-mac /private/var/lib/jenkins/workspace/MY_BRANCH > electron-builder --config ./electron-builder.json --mac --x64 • electron-builder version=22.8.0 os=19.6.0 • artifacts will be published if draft release exists reason=CI detected • loaded configuration file=/private/var/lib/jenkins/workspace/MY_BRANCH/electron-builder.json • rebuilding native dependencies dependencies=@aabuhijleh/forcefocus@1.0.3, @aabuhijleh/native-reg@0.3.4, @aabuhijleh/windows-notification-state@1.3.4, @gnaudio/jabra-node-sdk@3.0.0, deskband@1.0.0, headsets@1.0.0, helpers@1.0.0, keytar@4.13.0, node-hid@1.1.0, robotjs@0.6.0, sqlite3@4.2.0, window-monitor@1.0.0 platform=darwin arch=x64 • packaging platform=darwin arch=x64 electron=9.0.4 appOutDir=compile/mac • signing file=compile/mac/MY_APPLICATION.app identityName=Developer ID Application: MY_DEVELOPER_ID identityHash=IDENTITY_HASH provisioningProfile=none тип Command failed: codesign --sign IDENTITY_HASH --force --timestamp --options runtime --entitlements ./setup/build/entitlements.mac.plist /private/var/lib/jenkins/workspace/MY_BRANCH/compile/mac/MY_APPLICATION.app/Contents/Frameworks/Spokes3GSDK.framework/Versions/A/Spokes3GSDK /private/var/lib/jenkins/workspace/MY_BRANCH/compile/mac/MY_APPLICATION.app/Contents/Frameworks/Spokes3GSDK.framework/Versions/A/Spokes3GSDK: replacing existing signature /private/var/lib/jenkins/workspace/MY_BRANCH/compile/mac/MY_APPLICATION.app/Contents/Frameworks/Spokes3GSDK.framework/Versions/A/Spokes3GSDK: Permission denied stackTrace= Error: Command failed: codesign --sign IDENTITY_HASH --force --timestamp --options runtime --entitlements ./setup/build/entitlements.mac.plist /private/var/lib/jenkins/workspace/MY_BRANCH/compile/mac/MY_APPLICATION.app/Contents/Frameworks/Spokes3GSDK.framework/Versions/A/Spokes3GSDK /private/var/lib/jenkins/workspace/MY_BRANCH/compile/mac/MY_APPLICATION.app/Contents/Frameworks/Spokes3GSDK.framework/Versions/A/Spokes3GSDK: replacing existing signature /private/var/lib/jenkins/workspace/MY_BRANCH/compile/mac/MY_APPLICATION.app/Contents/Frameworks/Spokes3GSDK.framework/Versions/A/Spokes3GSDK: Permission denied at ChildProcess.exithandler (child_process.js:290:12) at ChildProcess.emit (events.js:200:13) at maybeClose (internal/child_process.js:1021:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) From previous event: at processImmediate (internal/timers.js:439:21) From previous event: at MacPackager.signApp (/private/var/lib/jenkins/workspace/MY_BRANCH/node_modules/app-builder-lib/src/macPackager.ts:330:27) at MacPackager.doPack (/private/var/lib/jenkins/workspace/MY_BRANCH/node_modules/app-builder-lib/src/platformPackager.ts:244:16) at MacPackager.pack (/private/var/lib/jenkins/workspace/MY_BRANCH/node_modules/app-builder-lib/src/macPackager.ts:130:7) at Packager.doBuild (/private/var/lib/jenkins/workspace/MY_BRANCH/node_modules/app-builder-lib/src/packager.ts:444:9) at executeFinally (/private/var/lib/jenkins/workspace/MY_BRANCH/node_modules/builder-util/src/promise.ts:12:14) at Packager._build (/private/var/lib/jenkins/workspace/MY_BRANCH/node_modules/app-builder-lib/src/packager.ts:373:31) at Packager.build (/private/var/lib/jenkins/workspace/MY_BRANCH/node_modules/app-builder-lib/src/packager.ts:337:12) at executeFinally (/private/var/lib/jenkins/workspace/MY_BRANCH/node_modules/builder-util/src/promise.ts:12:14)   Any help is appreciated!

ahijleh
My post's format fell apart when I submitted it. I've also created an issue on github: https://github.com/electron-userland/electron-builder/issues/5281 That format is more understandable. But it's not really an electron-builder issue, it's more of a "codesign" issue with the Plantronics SDK.

ahijleh
The problem for me was that jenkins was copying the SDK files without changing the owner "root". So, a sudo was needed to make this command work. I copied these files manually and put them in my repository (the owner of the file changed) and sudo was no longer needed. This issue can be closed :)

lcollins
Great, thanks for the heads-up. We'll bear it in mind in case anyone else hits this issue! Thanks

Add new comment