Electron-builder: Cant sign package with electron builder and wont package correctly

Created on 8 Sep 2016  ·  24Comments  ·  Source: electron-userland/electron-builder

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! [email protected] build:osx: rm -r distributables/installers; build --osx
npm ERR! Exit status 255
npm ERR!
npm ERR! Failed at the [email protected] 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?

feature mac

All 24 comments

cc @sethlu

If .app file created, try to check it using https://itunes.apple.com/us/app/rb-app-checker-lite/id519421117?mt=12 to get more clear error.

@develar so I downloaded the app and dropped my .app into it, it gave me this:

Evaluating the application “Jive Desktop (beta)”.

The application was signed by “Apple Root CA”, “Developer ID Application: Jive Communications, Inc (5NE3JJD5L3)”.
Both the verified timestamp and the signing-time are: Sep 8, 2016, 1:55:52 PM.
The object code format is “app bundle with Mach-O thin (x86_64)”.
Both bundle and signing identifiers are “902777480.com.jive.JiveOne”.
The signature specifies explicit requirements. 
The signature specifies resource rules (v1). 
The signature specifies resource rules (v2). 
➤ Requirements and resources didn't pass static validation.  

The code signature has the UUID “3F344211-BCB0-0AF9-F978-5957A80EF470”.
Executable code for x86_64 has the UUID “3212FE45-61D8-38AB-85BF-FF708772E1F3”.

A signing-time snapshot of the application’s Info.plist was found. 
Version 0.0.1 (0.0.1) Copyright © 2016 dfenstermaker

The signature contains 3 certificates. 
Certificate “Apple Root CA”: 
Your keychain contains this trusted root certificate.
Will expire on Feb 9, 2035.
Certificate “Developer ID Certification Authority”: 
Will expire on Feb 1, 2027.
Certificate “Developer ID Application: Jive Communications, Inc (5NE3JJD5L3)”: 
Will expire on Jun 2, 2020.
SHA1 fingerprint: “C4213DC78F3BA2CCC69D1CE17D1BDDF563886CA2”.
Team ID or Organizational Unit: “5NE3JJD5L3”.

The application is not sandboxed.

There are 4 embedded frameworks. 

11 auxiliary executables have been found. 
11 executables are signed by “Apple Root CA”, “Developer ID Application: Jive Communications, Inc (5NE3JJD5L3)”. 
One executable file has no executable permissions, but should.  

When I click on the arrow next to " Requirements and resources didn't pass static validation. " I get the following:

"Error details: “-67050: code failed to satisfy specified code requirement(s)” {
Error in architecture: “x86_64”
}"

and the info button next to the arrow says:

"The bundle's code signature may be obsolete, or its contents may have been modified AFTER codesigning, either by a misplaced build step or deliberate hacking."

appreciate the help, thank you

Hey @dfenstermaker I was having a similar problem and I solved it by removing the CSC_LINK, CSC_NAME, etc from my package.json, and let electron-builder automatically figure it out from my keychain.

@PierBover thanks unfortunatley I dont have those things specified in my package.json

 "build": {
    "appId": "902777480.com.jive.JiveOne",
    "category": "Business",
    "files": [
      "**/*",
      "!src",
      "!target",
      "!i18n",
      "!tests",
      "!base.webpackConfig",
      "!desktop.webpackConfig.js",
      "!Gruntfile.js",
      "!index.ejs",
      "!karma.conf.js",
      "!README.md",
      "!web*.js"
    ],
    "mac": {
      "icon": "src/assets/jivelogo.icns"
    },
    "dmg": {
      "icon": "src/assets/jivelogo.icns",
      "background": "src/assets/elephant.png",
      "contents": [
        {
          "x": 448,
          "y": 344,
          "type": "link",
          "path": "/Applications"
        },
        {
          "x": 192,
          "y": 344,
          "type": "file",
          "path": "JiveDesktop.app"
        }
      ]
    },
    "win": {
      "icon": "src/assets/jivelogo.ico"
    }
  },
  "directories": {
    "output": "distributables/installers"
  }

@dfenstermaker Do you have native dependencies? Please try version 6.7.0.

@develar I dont believe I have any native dependencies, also I updated to 6.7.0 and this is what I get now:

npm run build:osx NODE_ENV='development' DEBUG=electron-osx-sign*

[email protected] build:osx /Users/dfenstermaker/Documents/jive/jiveweb
rm -r distributables/installers; build --osx "NODE_ENV=development" "DEBUG=electron-osx-sign*"

rm: distributables/installers: No such file or directory
Skip app dependencies rebuild because dev and app dependencies are not separated
Error: Unknown target: node_env=development
at Object.createCommonTarget (/Users/dfenstermaker/Documents/jive/jiveweb/node_modules/electron-builder/src/targets/targetFactory.ts:35:11)
at mapper (/Users/dfenstermaker/Documents/jive/jiveweb/node_modules/electron-builder/src/macPackager.ts:60:83)
at mapper (/Users/dfenstermaker/Documents/jive/jiveweb/node_modules/electron-builder/src/targets/targetFactory.ts:13:16)
at MacPackager.createTargets (/Users/dfenstermaker/Documents/jive/jiveweb/node_modules/electron-builder/src/macPackager.ts:60:15)
at Object.createTargets (/Users/dfenstermaker/Documents/jive/jiveweb/node_modules/electron-builder/src/targets/targetFactory.ts:20:12)
at Packager. (/Users/dfenstermaker/Documents/jive/jiveweb/node_modules/electron-builder/src/packager.ts:130:54)
From previous event:
at tsAwaiter (/Users/dfenstermaker/Documents/jive/jiveweb/node_modules/electron-builder/src/util/awaiter.ts:10:47)
at Object.build (/Users/dfenstermaker/Documents/jive/jiveweb/node_modules/electron-builder/src/builder.ts:180:52)
at Object. (/Users/dfenstermaker/Documents/jive/jiveweb/node_modules/electron-builder/src/build-cli.ts:27:28)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.runMain (module.js:590:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3

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" "NODE_ENV=development" "DEBUG=electron-osx-sign_"
npm ERR! node v6.4.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] build:osx: rm -r distributables/installers; build --osx "NODE_ENV=development" "DEBUG=electron-osx-sign_"
npm ERR! Exit status 255
npm ERR!
npm ERR! Failed at the [email protected] build:osx script 'rm -r distributables/installers; build --osx "NODE_ENV=development" "DEBUG=electron-osx-sign_"'.
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 "NODE_ENV=development" "DEBUG=electron-osx-sign_"
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

Error: Unknown target: node_env=development

env must be first. NODE_ENV='development' DEBUG=electron-osx-sign*,electron-builder

@develar sorry about that and thanks, seems to be the same error I am recieving tho :(

$ NODE_ENV='development' DEBUG=electron-osx-sign*,electron-builder npm run build:osx

[email protected] build:osx /Users/dfenstermaker/Documents/jive/jiveweb
rm -r distributables/installers; build --osx

rm: distributables/installers: No such file or directory
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

electron-builder Executing security find-identity -v +0ms
electron-builder Executing security find-identity -v -p codesigning +10ms
Signing app (identity: Developer ID Application: Jive Communications, Inc (5NE3JJD5L3))

electron-osx-sign:warn No entitlements passed in arguments, will not sign with entitlements. +825ms
electron-osx-sign Signing application... +362ms
electron-osx-sign > application /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app +1ms
electron-osx-sign > platform darwin +0ms
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 +40ms
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 +195ms
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 +470ms
electron-osx-sign Signing... /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app/Contents/Frameworks/Electron Framework.framework +302ms
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 +2s
electron-osx-sign Signing... /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app/Contents/Frameworks/Jive Desktop (beta) Helper EH.app +178ms
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 +180ms
electron-osx-sign Signing... /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app/Contents/Frameworks/Jive Desktop (beta) Helper NP.app +157ms
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 +168ms
electron-osx-sign Signing... /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app/Contents/Frameworks/Jive Desktop (beta) Helper.app +160ms
electron-osx-sign Signing... /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app/Contents/Frameworks/Mantle.framework/Versions/A/Mantle +171ms
electron-osx-sign Signing... /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app/Contents/Frameworks/Mantle.framework +167ms
electron-osx-sign Signing... /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/ReactiveCocoa +172ms
electron-osx-sign Signing... /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app/Contents/Frameworks/ReactiveCocoa.framework +191ms
electron-osx-sign Signing... /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app/Contents/Frameworks/Squirrel.framework/Versions/A/Resources/ShipIt +192ms
electron-osx-sign Signing... /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app/Contents/Frameworks/Squirrel.framework/Versions/A/Squirrel +194ms
electron-osx-sign Signing... /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app/Contents/Frameworks/Squirrel.framework +167ms
electron-osx-sign Signing... /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app/Contents/MacOS/Jive Desktop (beta) +175ms
electron-osx-sign Signing... /Users/dfenstermaker/Documents/jive/jiveweb/distributables/installers/mac/Jive Desktop (beta).app +256ms
electron-osx-sign Verifying code sign... +235ms
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 Process.ChildProcess._handle.onexit (internal/child_process.js:215:5) +526ms

(node:57108) 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! [email protected] build:osx: rm -r distributables/installers; build --osx
npm ERR! Exit status 255
npm ERR!
npm ERR! Failed at the [email protected] 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

@dfenstermaker Is it possible to send me your project? So, I will try to sign it.

@develar what exactly would you need? the .app file?

Only @sethlu can help you to fix sign error without project :) I can help, but I need project sources to build it on my machine (and using my apple developer account certs) to investigate the error.

@develar so you need the entire source?

@dfenstermaker You can make some simple app to reproduce the error. Or even try to build https://github.com/develar/onshape-desktop-shell on your mac machine to ensure that your apple developer account cert correctly configured.

@develar can I will try yours above, see what I get then send you a zip if mine to see what you get. Thanks a ton btw

@develar seems to be the same exact errors when I try and package the app you sent :(

$ npm run release

@ release /Users/dfenstermaker/Documents/mine/onshape-desktop-shell
npm run compile && build

@ compile /Users/dfenstermaker/Documents/mine/onshape-desktop-shell
rimraf app/out && tsc

Rebuilding app dependencies for arch x64 to /Users/dfenstermaker/Documents/mine/onshape-desktop-shell/app

Packaging for platform darwin x64 using electron 1.3.5 to dist/mac

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

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" "release"
npm ERR! node v6.4.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! @ release: npm run compile && build
npm ERR! Exit status 255
npm ERR!
npm ERR! Failed at the @ release script 'npm run compile && build'.
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 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run compile && build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls
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/mine/onshape-desktop-shell/npm-debug.log

dfenstermaker at Dannys-MacBook-Pro in ~/Documents/mine/onshape-desktop-shell on master
$ NODE_ENV='development' DEBUG=electron-osx-sign* npm run release

@ release /Users/dfenstermaker/Documents/mine/onshape-desktop-shell
npm run compile && build

@ compile /Users/dfenstermaker/Documents/mine/onshape-desktop-shell
rimraf app/out && tsc

Rebuilding app dependencies for arch x64 to /Users/dfenstermaker/Documents/mine/onshape-desktop-shell/app

Packaging for platform darwin x64 using electron 1.3.5 to dist/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... +409ms
electron-osx-sign > application /Users/dfenstermaker/Documents/mine/onshape-desktop-shell/dist/mac/Onshape.app +1ms
electron-osx-sign > platform darwin +0ms
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/mine/onshape-desktop-shell/dist/mac/Onshape.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework +84ms
electron-osx-sign Signing... /Users/dfenstermaker/Documents/mine/onshape-desktop-shell/dist/mac/Onshape.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib +1s
electron-osx-sign Signing... /Users/dfenstermaker/Documents/mine/onshape-desktop-shell/dist/mac/Onshape.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libnode.dylib +192ms
electron-osx-sign Signing... /Users/dfenstermaker/Documents/mine/onshape-desktop-shell/dist/mac/Onshape.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/crashpad_handler +415ms
electron-osx-sign Signing... /Users/dfenstermaker/Documents/mine/onshape-desktop-shell/dist/mac/Onshape.app/Contents/Frameworks/Electron Framework.framework +169ms
electron-osx-sign Signing... /Users/dfenstermaker/Documents/mine/onshape-desktop-shell/dist/mac/Onshape.app/Contents/Frameworks/Mantle.framework/Versions/A/Mantle +1s
electron-osx-sign Signing... /Users/dfenstermaker/Documents/mine/onshape-desktop-shell/dist/mac/Onshape.app/Contents/Frameworks/Mantle.framework +168ms
electron-osx-sign Signing... /Users/dfenstermaker/Documents/mine/onshape-desktop-shell/dist/mac/Onshape.app/Contents/Frameworks/Onshape Helper EH.app/Contents/MacOS/Onshape Helper EH +171ms
electron-osx-sign Signing... /Users/dfenstermaker/Documents/mine/onshape-desktop-shell/dist/mac/Onshape.app/Contents/Frameworks/Onshape Helper EH.app +156ms
electron-osx-sign Signing... /Users/dfenstermaker/Documents/mine/onshape-desktop-shell/dist/mac/Onshape.app/Contents/Frameworks/Onshape Helper NP.app/Contents/MacOS/Onshape Helper NP +164ms
electron-osx-sign Signing... /Users/dfenstermaker/Documents/mine/onshape-desktop-shell/dist/mac/Onshape.app/Contents/Frameworks/Onshape Helper NP.app +159ms
electron-osx-sign Signing... /Users/dfenstermaker/Documents/mine/onshape-desktop-shell/dist/mac/Onshape.app/Contents/Frameworks/Onshape Helper.app/Contents/MacOS/Onshape Helper +169ms
electron-osx-sign Signing... /Users/dfenstermaker/Documents/mine/onshape-desktop-shell/dist/mac/Onshape.app/Contents/Frameworks/Onshape Helper.app +154ms
electron-osx-sign Signing... /Users/dfenstermaker/Documents/mine/onshape-desktop-shell/dist/mac/Onshape.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/ReactiveCocoa +170ms
electron-osx-sign Signing... /Users/dfenstermaker/Documents/mine/onshape-desktop-shell/dist/mac/Onshape.app/Contents/Frameworks/ReactiveCocoa.framework +176ms
electron-osx-sign Signing... /Users/dfenstermaker/Documents/mine/onshape-desktop-shell/dist/mac/Onshape.app/Contents/Frameworks/Squirrel.framework/Versions/A/Resources/ShipIt +186ms
electron-osx-sign Signing... /Users/dfenstermaker/Documents/mine/onshape-desktop-shell/dist/mac/Onshape.app/Contents/Frameworks/Squirrel.framework/Versions/A/Squirrel +170ms
electron-osx-sign Signing... /Users/dfenstermaker/Documents/mine/onshape-desktop-shell/dist/mac/Onshape.app/Contents/Frameworks/Squirrel.framework +192ms
electron-osx-sign Signing... /Users/dfenstermaker/Documents/mine/onshape-desktop-shell/dist/mac/Onshape.app/Contents/MacOS/Onshape +194ms
electron-osx-sign Signing... /Users/dfenstermaker/Documents/mine/onshape-desktop-shell/dist/mac/Onshape.app/Contents/Resources/app/node_modules/keytar/build/Release/keytar.node +237ms
electron-osx-sign Signing... /Users/dfenstermaker/Documents/mine/onshape-desktop-shell/dist/mac/Onshape.app/Contents/Resources/app/node_modules/nslog/build/Release/nslog.node +153ms
electron-osx-sign Signing... /Users/dfenstermaker/Documents/mine/onshape-desktop-shell/dist/mac/Onshape.app +160ms
electron-osx-sign Verifying code sign... +200ms
electron-osx-sign:error Error: Command failed: codesign --verify --deep --verbose=2 /Users/dfenstermaker/Documents/mine/onshape-desktop-shell/dist/mac/Onshape.app
/Users/dfenstermaker/Documents/mine/onshape-desktop-shell/dist/mac/Onshape.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) +589ms

(node:15307) 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" "release"
npm ERR! node v6.4.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! @ release: npm run compile && build

After digging deeper I output the actual error that electron-osx-sign is getting and it says "CSSMERR_TP_NOT_TRUSTED" any ideas on this? I am going to google now

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!

@develar Actually this resembles https://github.com/electron-userland/electron-builder/issues/559? Glad though that it's already resolved by cert trust settings 😺 @dfenstermaker!

@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).

should I close this then?

Warning: a promise was rejected with a non-error:

Error fixed (https://github.com/electron-userland/electron-osx-sign/pull/80).

i have signed my installer by using signtool(windows msi installer)
by following command:

signtool sign /t http://timestamp.comodoca.com/authenticode  /f "C:\Users\admin\Downloads\Certificates.p12" /p mypassword C:\Users\admin\Downloads\New folder\new2\win_desktop\dist\win\CoDesktop Setup 1.0.1.msi"

after that i have made some changes in my code and again making built by command build -m but this time getting error-

Rebuilding app dependencies for arch x64 to C:\Users\admin\Downloads\New   folder\new2\win_codesktop\app

Packaging for platform win32 x64 using electron 1.4.3 to dist\win-unpacked

node_modules\electron-screencapture\node_modules\recordrtc is not packed into asar archive -    contains executable code
   Signing CoDesktop.exe (certificate file "C:\Users\admin\AppData\Local\Temp\electron-builder-1a14-    158aadefd67-0\t-1a14-0.p12")
   Error: Exit code: 1. Command failed: C:\Users\admin\.cache\winCodeSign\winCodeSign-        1.4.2\windows-   10\signtool.exe sign /t http://timestamp.verisign.com/scripts/timstamp.dll /f        C:\Users\admin\AppData\Local\Temp\electron-builder-
    1a14-158aadefd67-0\t-1a14-0.p12 /d CoDesktop /du https://app.onepgr.com/ /p rajivrohan        C:\Users\admin\Downloads\New folder\new2\win_codesktop\dist\win-unpacked\CoDesktop.exe
SignTool Error: An error occurred while attempting to load the signing
    certificate from: C:\Users\admin\AppData\Local\Temp\electron-builder-1a14-158aadefd67-0\t-1a14-0.p12

  SignTool Error: An error occurred while attempting to load the signing
     certificate from: C:\Users\admin\AppData\Local\Temp\electron-builder-1a14-158aadefd67-0\t-       1a14-0.p12

at C:\Users\admin\AppData\Roaming\npm\node_modules\electron-builder\src\util\util.ts:102:16
at ChildProcess.exithandler (child_process.js:220:5)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:829:16)
at Socket.<anonymous> (internal/child_process.js:319:11)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at Pipe._onclose (net.js:486:12)
From previous event:
at Object.exec (C:\Users\admin\AppData\Roaming\npm\node_modules\electron-builder\src\util\util.ts:80:3)
at C:\Users\admin\AppData\Roaming\npm\node_modules\electron-  builder\src\windowsCodeSign.ts:117:20
at next (native)
at processImmediate [as _immediateCallback] (timers.js:383:17)
From previous event:
at tsAwaiter (C:\Users\admin\AppData\Roaming\npm\node_modules\electron-  builder\src\util\awaiter.ts:10:47)
at Object.build (C:\Users\admin\AppData\Roaming\npm\node_modules\electron-  builder\out\builder.js:138:12)
at Object.<anonymous> (C:\Users\admin\AppData\Roaming\npm\node_modules\electron-  builder\out\build-cli.js:23:11)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
at node.js:974:3

my temp folder does not have any file or folder named in the error.

please help me out of this.

Thanks in advance!

@nidhir-systango Please file new issue. Do not sign manually. Please try electron-builder 10.1.0

Was this page helpful?
0 / 5 - 0 ratings