question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

codesign --verify fails with "no such file or directory"

See original GitHub issue

I have an electron application which I want to sign with my Developer ID. Unfortunately, this doesn’t work. In the last step where the signer wants to verify what it did, it seems that codesign cannot find some file. But it doesn’t tell us which file 😉

Here’s the full log:

Tue, 03 Jan 2017 15:22:59 GMT electron-osx-sign:warn No `identity` passed in arguments...
Tue, 03 Jan 2017 15:22:59 GMT electron-osx-sign Finding `Developer ID Application` certificate for distribution outside the Mac App Store...
Tue, 03 Jan 2017 15:22:59 GMT electron-osx-sign Executing... security find-identity -v
Tue, 03 Jan 2017 15:23:00 GMT electron-osx-sign Identity: 
 > Name: Developer ID Application: samedi GmbH (99L6BJ9LP6)
Tue, 03 Jan 2017 15:23:00 GMT electron-osx-sign Found 1 identity.
Tue, 03 Jan 2017 15:23:00 GMT electron-osx-sign:warn No `entitlements` passed in arguments: 
 * Provide `entitlements` to specify entitlements file for codesign.
Tue, 03 Jan 2017 15:23:00 GMT electron-osx-sign Pre-sign operation enabled for provisioning profile: 
 * Disable by setting `pre-embed-previsioning-profile` to `false`.
Tue, 03 Jan 2017 15:23:00 GMT electron-osx-sign Pre-sign operation enabled for entitlements automation with versions >= `1.1.1`: 
 * Disable by setting `pre-auto-entitlements` to `false`.
Tue, 03 Jan 2017 15:23:00 GMT electron-osx-sign No `provisioning-profile` passed in arguments, will find in current working directory and in user library...
Tue, 03 Jan 2017 15:23:00 GMT electron-osx-sign No provisioning profile found, will not embed profile in app contents.
Tue, 03 Jan 2017 15:23:00 GMT electron-osx-sign Signing application... 
 > Application: dist/mac/samedi-app.app 
 > Platform: darwin 
 > Entitlements: undefined 
 > Child entitlements: undefined 
 > Additional binaries: [] 
 > Identity: Developer ID Application: samedi GmbH (99L6BJ9LP6)
Tue, 03 Jan 2017 15:23:00 GMT electron-osx-sign Walking... dist/mac/samedi-app.app/Contents
Tue, 03 Jan 2017 15:23:00 GMT electron-osx-sign Signing... dist/mac/samedi-app.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework
Tue, 03 Jan 2017 15:23:00 GMT electron-osx-sign Executing... codesign --sign Developer ID Application: samedi GmbH (99L6BJ9LP6) --force dist/mac/samedi-app.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework
Tue, 03 Jan 2017 15:23:03 GMT electron-osx-sign Signing... dist/mac/samedi-app.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib
Tue, 03 Jan 2017 15:23:03 GMT electron-osx-sign Executing... codesign --sign Developer ID Application: samedi GmbH (99L6BJ9LP6) --force dist/mac/samedi-app.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib
Tue, 03 Jan 2017 15:23:03 GMT electron-osx-sign Signing... dist/mac/samedi-app.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libnode.dylib
Tue, 03 Jan 2017 15:23:03 GMT electron-osx-sign Executing... codesign --sign Developer ID Application: samedi GmbH (99L6BJ9LP6) --force dist/mac/samedi-app.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libnode.dylib
Tue, 03 Jan 2017 15:23:05 GMT electron-osx-sign Signing... dist/mac/samedi-app.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/crashpad_handler
Tue, 03 Jan 2017 15:23:05 GMT electron-osx-sign Executing... codesign --sign Developer ID Application: samedi GmbH (99L6BJ9LP6) --force dist/mac/samedi-app.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/crashpad_handler
Tue, 03 Jan 2017 15:23:05 GMT electron-osx-sign Signing... dist/mac/samedi-app.app/Contents/Frameworks/Electron Framework.framework
Tue, 03 Jan 2017 15:23:05 GMT electron-osx-sign Executing... codesign --sign Developer ID Application: samedi GmbH (99L6BJ9LP6) --force dist/mac/samedi-app.app/Contents/Frameworks/Electron Framework.framework
Tue, 03 Jan 2017 15:23:08 GMT electron-osx-sign Signing... dist/mac/samedi-app.app/Contents/Frameworks/Mantle.framework/Versions/A/Mantle
Tue, 03 Jan 2017 15:23:08 GMT electron-osx-sign Executing... codesign --sign Developer ID Application: samedi GmbH (99L6BJ9LP6) --force dist/mac/samedi-app.app/Contents/Frameworks/Mantle.framework/Versions/A/Mantle
Tue, 03 Jan 2017 15:23:09 GMT electron-osx-sign Signing... dist/mac/samedi-app.app/Contents/Frameworks/Mantle.framework
Tue, 03 Jan 2017 15:23:09 GMT electron-osx-sign Executing... codesign --sign Developer ID Application: samedi GmbH (99L6BJ9LP6) --force dist/mac/samedi-app.app/Contents/Frameworks/Mantle.framework
Tue, 03 Jan 2017 15:23:09 GMT electron-osx-sign Signing... dist/mac/samedi-app.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/ReactiveCocoa
Tue, 03 Jan 2017 15:23:09 GMT electron-osx-sign Executing... codesign --sign Developer ID Application: samedi GmbH (99L6BJ9LP6) --force dist/mac/samedi-app.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/ReactiveCocoa
Tue, 03 Jan 2017 15:23:09 GMT electron-osx-sign Signing... dist/mac/samedi-app.app/Contents/Frameworks/ReactiveCocoa.framework
Tue, 03 Jan 2017 15:23:09 GMT electron-osx-sign Executing... codesign --sign Developer ID Application: samedi GmbH (99L6BJ9LP6) --force dist/mac/samedi-app.app/Contents/Frameworks/ReactiveCocoa.framework
Tue, 03 Jan 2017 15:23:10 GMT electron-osx-sign Signing... dist/mac/samedi-app.app/Contents/Frameworks/Squirrel.framework/Versions/A/Resources/ShipIt
Tue, 03 Jan 2017 15:23:10 GMT electron-osx-sign Executing... codesign --sign Developer ID Application: samedi GmbH (99L6BJ9LP6) --force dist/mac/samedi-app.app/Contents/Frameworks/Squirrel.framework/Versions/A/Resources/ShipIt
Tue, 03 Jan 2017 15:23:10 GMT electron-osx-sign Signing... dist/mac/samedi-app.app/Contents/Frameworks/Squirrel.framework/Versions/A/Squirrel
Tue, 03 Jan 2017 15:23:10 GMT electron-osx-sign Executing... codesign --sign Developer ID Application: samedi GmbH (99L6BJ9LP6) --force dist/mac/samedi-app.app/Contents/Frameworks/Squirrel.framework/Versions/A/Squirrel
Tue, 03 Jan 2017 15:23:11 GMT electron-osx-sign Signing... dist/mac/samedi-app.app/Contents/Frameworks/Squirrel.framework
Tue, 03 Jan 2017 15:23:11 GMT electron-osx-sign Executing... codesign --sign Developer ID Application: samedi GmbH (99L6BJ9LP6) --force dist/mac/samedi-app.app/Contents/Frameworks/Squirrel.framework
Tue, 03 Jan 2017 15:23:11 GMT electron-osx-sign Signing... dist/mac/samedi-app.app/Contents/Frameworks/samedi-app Helper EH.app/Contents/MacOS/samedi-app Helper EH
Tue, 03 Jan 2017 15:23:11 GMT electron-osx-sign Executing... codesign --sign Developer ID Application: samedi GmbH (99L6BJ9LP6) --force dist/mac/samedi-app.app/Contents/Frameworks/samedi-app Helper EH.app/Contents/MacOS/samedi-app Helper EH
Tue, 03 Jan 2017 15:23:12 GMT electron-osx-sign Signing... dist/mac/samedi-app.app/Contents/Frameworks/samedi-app Helper EH.app
Tue, 03 Jan 2017 15:23:12 GMT electron-osx-sign Executing... codesign --sign Developer ID Application: samedi GmbH (99L6BJ9LP6) --force dist/mac/samedi-app.app/Contents/Frameworks/samedi-app Helper EH.app
Tue, 03 Jan 2017 15:23:13 GMT electron-osx-sign Signing... dist/mac/samedi-app.app/Contents/Frameworks/samedi-app Helper NP.app/Contents/MacOS/samedi-app Helper NP
Tue, 03 Jan 2017 15:23:13 GMT electron-osx-sign Executing... codesign --sign Developer ID Application: samedi GmbH (99L6BJ9LP6) --force dist/mac/samedi-app.app/Contents/Frameworks/samedi-app Helper NP.app/Contents/MacOS/samedi-app Helper NP
Tue, 03 Jan 2017 15:23:13 GMT electron-osx-sign Signing... dist/mac/samedi-app.app/Contents/Frameworks/samedi-app Helper NP.app
Tue, 03 Jan 2017 15:23:13 GMT electron-osx-sign Executing... codesign --sign Developer ID Application: samedi GmbH (99L6BJ9LP6) --force dist/mac/samedi-app.app/Contents/Frameworks/samedi-app Helper NP.app
Tue, 03 Jan 2017 15:23:14 GMT electron-osx-sign Signing... dist/mac/samedi-app.app/Contents/Frameworks/samedi-app Helper.app/Contents/MacOS/samedi-app Helper
Tue, 03 Jan 2017 15:23:14 GMT electron-osx-sign Executing... codesign --sign Developer ID Application: samedi GmbH (99L6BJ9LP6) --force dist/mac/samedi-app.app/Contents/Frameworks/samedi-app Helper.app/Contents/MacOS/samedi-app Helper
Tue, 03 Jan 2017 15:23:14 GMT electron-osx-sign Signing... dist/mac/samedi-app.app/Contents/Frameworks/samedi-app Helper.app
Tue, 03 Jan 2017 15:23:14 GMT electron-osx-sign Executing... codesign --sign Developer ID Application: samedi GmbH (99L6BJ9LP6) --force dist/mac/samedi-app.app/Contents/Frameworks/samedi-app Helper.app
Tue, 03 Jan 2017 15:23:15 GMT electron-osx-sign Signing... dist/mac/samedi-app.app/Contents/MacOS/samedi-app
Tue, 03 Jan 2017 15:23:15 GMT electron-osx-sign Executing... codesign --sign Developer ID Application: samedi GmbH (99L6BJ9LP6) --force dist/mac/samedi-app.app/Contents/MacOS/samedi-app
Tue, 03 Jan 2017 15:23:15 GMT electron-osx-sign Signing... dist/mac/samedi-app.app
Tue, 03 Jan 2017 15:23:15 GMT electron-osx-sign Executing... codesign --sign Developer ID Application: samedi GmbH (99L6BJ9LP6) --force dist/mac/samedi-app.app
Tue, 03 Jan 2017 15:23:16 GMT electron-osx-sign Verifying...
Tue, 03 Jan 2017 15:23:16 GMT electron-osx-sign Verifying application bundle with codesign...
Tue, 03 Jan 2017 15:23:16 GMT electron-osx-sign Executing... which codesign
Tue, 03 Jan 2017 15:23:16 GMT electron-osx-sign Executing... codesign --verify --deep  --verbose=20 dist/mac/samedi-app.app
Tue, 03 Jan 2017 15:23:16 GMT electron-osx-sign /usr/bin/codesign

Tue, 03 Jan 2017 15:23:16 GMT electron-osx-sign Error executing file: 
 > Stdout:  
 > Stderr: No such file or directory

Tue, 03 Jan 2017 15:23:16 GMT electron-osx-sign Sign failed:
Tue, 03 Jan 2017 15:23:16 GMT electron-osx-sign Command failed: codesign --verify --deep  --verbose=20 dist/mac/samedi-app.app
No such file or directory

Sign failed:
Command failed: codesign --verify --deep  --verbose=20 dist/mac/samedi-app.app
No such file or directory

Do you have any idea on what might be going on here?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
sethlucommented, Jan 19, 2017

@siebertm @Okhoshi release 0.4.3 just published. It should cover your updates regarding passing the --strict flag in systems below El Capitan. 👍 Thanks for your collaboration & support!

1reaction
Okhoshicommented, Jan 17, 2017

Hi all!

I was just facing the same problem than @siebertm and I fanally found the cause…

The problem is that when codesign is called to verify the bundle, if you are on a OS X version prior to 10.11, the argument --strict does not exist and thus is skipped by electron-osx-sign… which leaves an empty argument, considered as the file to verify by codesign , leading to no such file...

As a workaround, simply remove the line and you’re good to go!

Read more comments on GitHub >

github_iconTop Results From Across the Web

codesign --verify fails with "no such file or directory" · Issue #117
The problem is that when codesign is called to verify the bundle, if you are on a OS X version prior to 10.11,...
Read more >
CodeSign issue | Apple Developer Forums
If code signing still doesn't work, in Keychain Access, select File > Unlock All Keychains then File > Lock All Keychains. Cd into...
Read more >
can't exec 'codesign' (No such file or directory) - Stack Overflow
I copied codesign from /usr/bin/ to: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/u‌​sr/bin.
Read more >
man page codesign section 1
The code being signed is not modi- fied and need not be writable. When verifying, designates a file containing a detached signature to...
Read more >
Common code signing issues - fastlane docs
Code Sign error : No matching provisioning profiles found: No provisioning profiles with a valid signing identity (i.e. certificate and private key pair) ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found