MacOS Sierra Command failed: codesign; The specified item could not be found in the keychain.
See original GitHub issue- Version: 15.5.1
- Target: All
The platform we are building the application is MacOS Sierra 10.12.4. Ever since I upgraded my personal development machine to Sierra I haven’t been able to build our application. We just recently upgraded one of our build servers and now we are seeing the same error I was seeing on my build machine.
This build works fine on our other build servers that do not have macOS Sierra installed.
[Desktop-Release] Running shell script
+ npm run release
> @ release /Users/mac5/jenkins/workspace/Desktop-Release
> build -mwl --x64
Rebuilding native production dependencies for darwin:x64
Packaging for darwin x64 using electron 1.6.2 to dist/mac
Signing app (identity: Developer ID Application: X, Inc. (6SF49XZ6MH))
Error: Command failed: codesign --sign Developer ID Application: X, Inc. (6SF49XZ6MH) --force --keychain /var/folders/4h/k0px1pq55l15bwwf8jm83prw0000gn/T/electron-builder-CACx2A/0-1.keychain /Users/mac5/jenkins/workspace/Desktop-Release/dist/mac/X.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework
error: The specified item could not be found in the keychain.
at ChildProcess.exithandler (child_process.js:205:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:194:7)
at maybeClose (internal/child_process.js:899:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
From previous event:
at MacPackager.sign (/Users/mac5/jenkins/workspace/Desktop-Release/node_modules/electron-builder/out/macPackager.js:276:11)
at /Users/mac5/jenkins/workspace/Desktop-Release/node_modules/electron-builder/src/macPackager.ts:82:26
at runCallback (timers.js:666:20)
at tryOnImmediate (timers.js:639:5)
at processImmediate [as _immediateCallback] (timers.js:611:5)
From previous event:
at /Users/mac5/jenkins/workspace/Desktop-Release/node_modules/electron-builder/src/macPackager.ts:82:10
at Generator.next (<anonymous>)
From previous event:
at MacPackager.pack (/Users/mac5/jenkins/workspace/Desktop-Release/node_modules/electron-builder/out/macPackager.js:181:11)
at /Users/mac5/jenkins/workspace/Desktop-Release/node_modules/electron-builder/src/packager.ts:253:24
at Generator.next (<anonymous>)
at /Users/mac5/jenkins/workspace/Desktop-Release/node_modules/fs-extra/lib/mkdirs/mkdirs.js:35:14
at FSReqWrap.oncomplete (fs.js:114:15)
From previous event:
at Packager.doBuild (/Users/mac5/jenkins/workspace/Desktop-Release/node_modules/electron-builder/out/packager.js:377:11)
at /Users/mac5/jenkins/workspace/Desktop-Release/node_modules/electron-builder/src/packager.ts:166:52
at Generator.next (<anonymous>)
at runCallback (timers.js:666:20)
at tryOnImmediate (timers.js:639:5)
at processImmediate [as _immediateCallback] (timers.js:611:5)
From previous event:
at Packager.build (/Users/mac5/jenkins/workspace/Desktop-Release/node_modules/electron-builder/out/packager.js:272:11)
at /Users/mac5/jenkins/workspace/Desktop-Release/node_modules/electron-builder/src/builder.ts:198:33
at Generator.next (<anonymous>)
From previous event:
at build (/Users/mac5/jenkins/workspace/Desktop-Release/node_modules/electron-builder/out/builder.js:70:21)
at Object.<anonymous> (/Users/mac5/jenkins/workspace/Desktop-Release/node_modules/electron-builder/out/cli/build-cli.js:71:41)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.runMain (module.js:605:10)
at run (bootstrap_node.js:427:7)
at startup (bootstrap_node.js:148:9)
at bootstrap_node.js:542:3
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
error: The specified item could not be found in the keychain.
During build process, I have been encountering an error "error: The specified item could not be found in the keychain." for the code...
Read more >Unable to code sign on OSX, the specified item could not be ...
But we got "The specified item could not be found in the keychain. ... MacOS Sierra Command failed: codesign; The specified item could...
Read more >macOS Sierra - error: The specified item could ... - Super User
over SSH I always get an error: The specified item could not be found in the keychain. But when I run the same...
Read more >Code Signing on Mac "error: The specified item could not be ...
I installed both to my System keychain, they show "This certificate is valid" I open Terminal and change directories to my application folder. ......
Read more >Code Signing on Mac “error: The specified item could not be found ...
I installed both to my System keychain, they show "This certificate is valid"; I open Terminal and change directories to my application folder;...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Having the same issue. If i import those certificates into login keychain, everything is fine, even though i’ve set CSC_IDENTITY_AUTO_DISCOVERY to false.
OS: 10.12
Also, i think this is connected to this issue #820
@develar Thanks for the fix! I can confirm, that it’s working for me after updating to version 19.8.0.