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.

Cant sign package with electron builder and wont package correctly

See original GitHub issue

Electron builder @6.3.1

target build: darwin x64

Failed to verify application bundle. See details in debug log. (electron-osx-sign:error)

I googled and found an issue like mine with the same error, however, the fix for this issue seemed to be updating xcode to which I have done. I am now on xCode Version 7.3.1 (7D1014), also I have done the same as that thread and ran the debug for electron-osx-sign which gave me the following:

`Skip app dependencies rebuild because dev and app dependencies are not separated Packaging for platform darwin x64 using electron 1.3.4 to distributables/installers/mac

Signing app (identity: Developer ID Application: Jive Communications, Inc (5NE3JJD5L3))

electron-osx-sign:warn No entitlements passed in arguments, will not sign with entitlements. +0ms electron-osx-sign Signing application… +390ms electron-osx-sign > application /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app +1ms electron-osx-sign > platform darwin +1ms electron-osx-sign > entitlements undefined +0ms electron-osx-sign > child-entitlements undefined +0ms electron-osx-sign > additional-binaries undefined +0ms electron-osx-sign > identity Developer ID Application: Jive Communications, Inc (5NE3JJD5L3) +0ms electron-osx-sign Signing… /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework +75ms electron-osx-sign Signing… /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib +2s electron-osx-sign Signing… /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libnode.dylib +226ms electron-osx-sign Signing… /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/crashpad_handler +428ms electron-osx-sign Signing… /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app/Contents/Frameworks/Electron Framework.framework +201ms electron-osx-sign Signing… /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app/Contents/Frameworks/Jive Desktop (beta) Helper EH.app/Contents/MacOS/Jive Desktop (beta) Helper EH +1s electron-osx-sign Signing… /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app/Contents/Frameworks/Jive Desktop (beta) Helper EH.app +186ms electron-osx-sign Signing… /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app/Contents/Frameworks/Jive Desktop (beta) Helper NP.app/Contents/MacOS/Jive Desktop (beta) Helper NP +208ms electron-osx-sign Signing… /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app/Contents/Frameworks/Jive Desktop (beta) Helper NP.app +197ms electron-osx-sign Signing… /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app/Contents/Frameworks/Jive Desktop (beta) Helper.app/Contents/MacOS/Jive Desktop (beta) Helper +194ms electron-osx-sign Signing… /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app/Contents/Frameworks/Jive Desktop (beta) Helper.app +187ms electron-osx-sign Signing… /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app/Contents/Frameworks/Mantle.framework/Versions/A/Mantle +200ms electron-osx-sign Signing… /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app/Contents/Frameworks/Mantle.framework +199ms electron-osx-sign Signing… /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/ReactiveCocoa +227ms electron-osx-sign Signing… /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app/Contents/Frameworks/ReactiveCocoa.framework +216ms electron-osx-sign Signing… /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app/Contents/Frameworks/Squirrel.framework/Versions/A/Resources/ShipIt +215ms electron-osx-sign Signing… /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app/Contents/Frameworks/Squirrel.framework/Versions/A/Squirrel +220ms electron-osx-sign Signing… /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app/Contents/Frameworks/Squirrel.framework +211ms electron-osx-sign Signing… /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app/Contents/MacOS/Jive Desktop (beta) +196ms electron-osx-sign Signing… /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app +255ms electron-osx-sign Verifying code sign… +268ms electron-osx-sign:error Error: Command failed: codesign --verify --deep --verbose=2 /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app: nested code is modified or invalid

at ChildProcess.exithandler (child_process.js:206:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:852:16)
at Socket.<anonymous> (internal/child_process.js:323:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:492:12) +547ms

(node:24996) Warning: a promise was rejected with a non-error: object String Warning: a promise was rejected with a non-error: object String Warning: a promise was rejected with a non-error: object String Warning: a promise was rejected with a non-error: object String Warning: a promise was rejected with a non-error: object String Warning: a promise was rejected with a non-error: object String Warning: a promise was rejected with a non-error: [object String] Failed to verify application bundle. See details in debug log. (electron-osx-sign:error)

npm ERR! Darwin 15.6.0 npm ERR! argv “/Users/dfenstermaker/.nvm/versions/node/v6.4.0/bin/node” “/Users/dfenstermaker/.nvm/versions/node/v6.4.0/bin/npm” “run” “build:osx” npm ERR! node v6.4.0 npm ERR! npm v3.10.3 npm ERR! code ELIFECYCLE npm ERR! Jiveweb@0.0.1 build:osx: rm -r distributables/installers; build --osx npm ERR! Exit status 255 npm ERR! npm ERR! Failed at the Jiveweb@0.0.1 build:osx script ‘rm -r distributables/installers; build --osx’. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the Jiveweb package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! rm -r distributables/installers; build --osx npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs Jiveweb npm ERR! Or if that isn’t available, you can get their info via: npm ERR! npm owner ls Jiveweb npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /Users/dfenstermaker/Documents/jive/jiveweb/npm-debug.log`

Any help?

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
dfenstermakercommented, Sep 13, 2016

good hell @develar I think I figured it out! the “CSSMERR_TP_NOT_TRUSTED” error means that the certs trust settings have been altered and thus you cannot package with this, per this article http://stackoverflow.com/questions/1747857/cssmerr-tp-not-trusted-error.

For anyone else having a similar issue here is where I put a log to output the error that electron-osx-sign was hiding. This code was from electron-osx-sign@^0.4.0

function verifySignApplicationAsync (opts) {
  // Custom promise is used here due to a strange behavior with codesign: Verbose logs are output into stderr so regular promisified execFile could not catch stderr while code execution finishes successfully.
  return new Promise(function (resolve, reject) {
    child.execFile('codesign', [
      '--verify',
      '--deep',
      '--verbose=2',
      opts.app
    ], function (err, stdout, stderr) {
      if (err) {
        console.log('ERROR:         ', err) //<-- log error here for details from codesign
        debugerror(err)
        reject('Failed to verify application bundle. See details in debug log. (electron-osx-sign:error)')
        return
      }
      resolve(stderr)
    })
  })
}

Thanks again everyone who helped!

1reaction
develarcommented, Sep 13, 2016

@sethlu Probably. @dfenstermaker Apple WWDR intermediate certificate was expired, right?

@sethlu I will send PR to fix https://github.com/electron-userland/electron-osx-sign/blob/master/index.js#L82 (error instance must be passed to rejected, not string).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Code Signing - electron-builder
If the configuration values are provided correctly in your package.json, then signing should be automatically executed. Windows is dual code-signed (SHA1 & ...
Read more >
Signing electron-builder generated package on windows fails ...
I want to sign windows package with self signed certificate. My build machine is Windows Server 2019 64 bit. Node version 12.18.2 I...
Read more >
code signature in [app] not valid … | Apple Developer Forums
I have an Electron app that uses a SQLite database, and has as a dependency the Sqlite3 npm package. I am building it...
Read more >
electron-packager - npm
Electron Packager. Package your Electron app into OS-specific bundles ( .app , .exe , etc.) via JavaScript or the command line.
Read more >
Packaging & Distributing your Electron App - YouTube
Electron Application Distribution Guide - https://www.electronjs.o... ... try restarting your device. Your browser can't play this video.
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