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.

Command failed: codesign --sign error caused when trying to build electron mac build

See original GitHub issue

Hello guys, Im new to electron build and i found below error when im create electron mac build from mac.

Error: Command failed: codesign --sign D8BXXXXXXXXXXXXXX --force /Users/wos/Desktop/APP-Mac/dist/mac/APP.NAME.app /Users/wos/Desktop/APP-Mac/dist/mac/APP.Today.app: resource fork, Finder information, or similar detritus not allowed

at ChildProcess.exithandler (child_process.js:275:12)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)

From previous event: at MacPackager.sign (/Users/wos/Desktop/Hawala-Mac/node_modules/electron-builder-lib/out/macPackager.js:286:11) at /Users/wos/Desktop/Hawala-Mac/node_modules/electron-builder-lib/src/macPackager.ts:94:26 at runCallback (timers.js:789:20) at tryOnImmediate (timers.js:751:5) at processImmediate [as _immediateCallback] (timers.js:722:5) From previous event: at /Users/wos/Desktop/Hawala-Mac/node_modules/electron-builder-lib/src/macPackager.ts:94:10 at Generator.next (<anonymous>) From previous event: at MacPackager.pack (/Users/wos/Desktop/Hawala-Mac/node_modules/electron-builder-lib/out/macPackager.js:209:11) at /Users/wos/Desktop/Hawala-Mac/node_modules/electron-builder-lib/src/packager.ts:372:24 at Generator.next (<anonymous>) at xfs.stat (/Users/wos/Desktop/Hawala-Mac/node_modules/fs-extra-p/node_modules/fs-extra/lib/mkdirs/mkdirs.js:56:16) at /Users/wos/Desktop/Hawala-Mac/node_modules/graceful-fs/polyfills.js:287:18 at FSReqWrap.oncomplete (fs.js:153:5) From previous event: at Packager.doBuild (/Users/wos/Desktop/Hawala-Mac/node_modules/electron-builder-lib/out/packager.js:441:11) at /Users/wos/Desktop/Hawala-Mac/node_modules/electron-builder-lib/src/packager.ts:316:52 at Generator.next (<anonymous>) at /Users/wos/Desktop/Hawala-Mac/node_modules/graceful-fs/graceful-fs.js:99:16 at /Users/wos/Desktop/Hawala-Mac/node_modules/graceful-fs/graceful-fs.js:43:10 at FSReqWrap.oncomplete (fs.js:135:15) From previous event: at Packager._build (/Users/wos/Desktop/Hawala-Mac/node_modules/electron-builder-lib/out/packager.js:385:11) at /Users/wos/Desktop/Hawala-Mac/node_modules/electron-builder-lib/src/packager.ts:278:23 at Generator.next (<anonymous>) at runCallback (timers.js:789:20) at tryOnImmediate (timers.js:751:5) at processImmediate [as _immediateCallback] (timers.js:722:5) From previous event: at Packager.build (/Users/wos/Desktop/Hawala-Mac/node_modules/electron-builder-lib/out/packager.js:341:11) at /Users/wos/Desktop/Hawala-Mac/node_modules/electron-builder-lib/src/index.ts:50:40 at Generator.next (<anonymous>) From previous event: at build (/Users/wos/Desktop/Hawala-Mac/node_modules/electron-builder-lib/out/index.js:47:21) at build (/Users/wos/Desktop/Hawala-Mac/node_modules/electron-builder/src/builder.ts:228:10) at then (/Users/wos/Desktop/Hawala-Mac/node_modules/electron-builder/src/cli/cli.ts:48:33) at runCallback (timers.js:789:20) at tryOnImmediate (timers.js:751:5) at processImmediate [as _immediateCallback] (timers.js:722:5) From previous event: at Object.args [as handler] (/Users/wos/Desktop/Hawala-Mac/node_modules/electron-builder/src/cli/cli.ts:48:33) at Object.runCommand (/Users/wos/Desktop/Hawala-Mac/node_modules/yargs/lib/command.js:235:44) at Object.parseArgs [as _parseArgs] (/Users/wos/Desktop/Hawala-Mac/node_modules/yargs/yargs.js:1042:24) at Object.get [as argv] (/Users/wos/Desktop/Hawala-Mac/node_modules/yargs/yargs.js:957:21) at Object.<anonymous> (/Users/wos/Desktop/Hawala-Mac/node_modules/electron-builder/src/cli/cli.ts:42:15) at Module._compile (module.js:643:30) at Object.Module._extensions…js (module.js:654:10) at Module.load (module.js:556:32) at tryModuleLoad (module.js:499:12) at Function.Module._load (module.js:491:3) at Function.Module.runMain (module.js:684:10) at startup (bootstrap_node.js:187:16) at bootstrap_node.js:608:3 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! Hawala.Today@1.0.1 dist: build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the Hawala.Today@1.0.1 dist script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /Users/wos/.npm/_logs/2018-02-27T03_45_17_931Z-debug.log

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:9

github_iconTop GitHub Comments

33reactions
hoythancommented, Jul 2, 2018

ran xattr -cr * at the root of my source code to remove all the crud and rebuilt and it worked.

https://github.com/electron-userland/electron-builder/issues/2125

10reactions
MutableLosscommented, Jul 20, 2018

I’ve run across this a few different ways:

  • various build junk (as @hoythan mentioned)
  • app being built is open or is still being held by a zombie process
  • trying to pack certain filetypes into the asar instead of adding to ExtraFiles or ExtraResources

For cleaning build artifacts I would suggest using xattr -cr . in your project root instead of a wildcard *, so to make sure and get all hidden directories and files as well. You’ll notice the command taking much more time, and much more prone to fix the issue, if it is an artifact.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Code Signing | Electron
Code signing is a security technology that you use to certify that an app was created by you.
Read more >
Code signing error on Windows Electron build
Code signing error on Windows Electron build ... Command failed: C:\Users\travis\AppData\Local\electron-builder\Cache\winCodeSign\ ...
Read more >
Electron build for MacOS fails occasionally due to "self-signed ...
With the new certificate, the signing step occasionally fails with the following error: Error: Command failed: codesign --sign ...
Read more >
how to solve codesign fail on mac with jenkis ci and electron ...
1st> just type this code in terminal export CSC_IDENTITY_AUTO_DISCOVERY=false. 2nd> run electron-builder --mac zip
Read more >
Code Signing - Mattermost Developers
If the electron-osx-sign command failed with an error message like this one: ~$ electron-osx-sign release/mac/Mattermost.app Sign failed: No identity found for ...
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