Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested code is modified or invalid #559

Closed
p3140 opened this issue Jul 1, 2016 · 16 comments
Closed

Nested code is modified or invalid #559

p3140 opened this issue Jul 1, 2016 · 16 comments

Comments

@p3140
Copy link

p3140 commented Jul 1, 2016

  • Version: 5.10.3
  • Target: mac

When signing app it throws the following error:

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

but nothing in debug log. some help please ?

@develar
Copy link
Member

develar commented Jul 1, 2016

Please see https://www.npmjs.com/package/electron-osx-sign#debug

Set env DEBUG=electron-osx-sign* and build again to get debug log.

@p3140
Copy link
Author

p3140 commented Jul 1, 2016

Thanks, its show the following:

electron-osx-sign:error Error: Command failed: codesign --verify --deep --verbose=2 /Applications/AMPPS/www/app/app/dist/mac/app.app
/Applications/AMPPS/www/app/app/dist/mac/app.app: nested code is modified or invalid

@develar
Copy link
Member

develar commented Jul 1, 2016

cc @sethlu Could you please advice?

@develar
Copy link
Member

develar commented Jul 1, 2016

@p3140 Could you please attach full build log?

@develar
Copy link
Member

develar commented Jul 1, 2016

Thanks, but I mean console output (I want to see line Signing ...)

@p3140
Copy link
Author

p3140 commented Jul 1, 2016

pib0x:app laboratorio$ NODE_ENV='development' DEBUG=electron-osx-sign:error npm run dist:osx

> lsoft@1.0.1 dist:osx /Applications/AMPPS/www/lsoft-collahuasi/app
> build --platform darwin

Rebuilding app dependencies for arch x64 to /Applications/AMPPS/www/lsoft-collahuasi/app/app

electron-squirrel-startup@1.0.0 /Applications/AMPPS/www/lsoft-collahuasi/app/app/node_modules/electron-squirrel-startup
debug@2.2.0 /Applications/AMPPS/www/lsoft-collahuasi/app/app/node_modules/debug
ms@0.7.1 /Applications/AMPPS/www/lsoft-collahuasi/app/app/node_modules/ms
jquery@3.0.0 /Applications/AMPPS/www/lsoft-collahuasi/app/app/node_modules/jquery
Packaging for platform mac x64 using electron 1.2.5 to dist/mac

Signing app (identity: Developer ID Application: José María Sanhueza Solovera (535AL6XDH5))

  electron-osx-sign:error Error: Command failed: codesign --verify --deep --verbose=2 /Applications/AMPPS/www/lsoft-collahuasi/app/dist/mac/lsoftcollahuasi.app
/Applications/AMPPS/www/lsoft-collahuasi/app/dist/mac/lsoftcollahuasi.app: nested code is modified or invalid

    at ChildProcess.exithandler (child_process.js:207: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) +0ms
(node:41551) Warning: a promise was rejected with a non-error: [object String]
(node:41551) Warning: a promise was rejected with a non-error: [object String]
(node:41551) Warning: a promise was rejected with a non-error: [object String]
(node:41551) Warning: a promise was rejected with a non-error: [object String]
(node:41551) Warning: a promise was rejected with a non-error: [object String]
(node:41551) Warning: a promise was rejected with a non-error: [object String]
(node:41551) 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 13.3.0
npm ERR! argv "/Users/laboratorio/.nvm/versions/node/v6.2.2/bin/node" "/Users/laboratorio/.nvm/versions/node/v6.2.2/bin/npm" "run" "dist:osx"
npm ERR! node v6.2.2
npm ERR! npm  v3.9.5
npm ERR! code ELIFECYCLE
npm ERR! lsoft@1.0.1 dist:osx: `build --platform darwin`
npm ERR! Exit status 255
npm ERR! 
npm ERR! Failed at the lsoft@1.0.1 dist:osx script 'build --platform darwin'.
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 lsoft package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     build --platform darwin
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs lsoft
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls lsoft
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Applications/AMPPS/www/lsoft-collahuasi/app/npm-debug.log
pib0x:app laboratorio$

@sethlu
Copy link
Member

sethlu commented Jul 2, 2016

Hi @p3140, would you mind building again with the following command so we could get a full log of code-signing? We can't really find much clue currently with only the error thrown.

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

@p3140
Copy link
Author

p3140 commented Jul 2, 2016

Hi @sethlu, here is the output

pib0x:app laboratorio$ NODE_ENV='development' DEBUG=electron-osx-sign* npm run dist:osx

> lsoft@1.0.3 dist:osx /Applications/AMPPS/www/lsoft-collahuasi/app
> build --platform darwin

Rebuilding app dependencies for arch x64 to /Applications/AMPPS/www/lsoft-collahuasi/app/app

electron-squirrel-startup@1.0.0 /Applications/AMPPS/www/lsoft-collahuasi/app/app/node_modules/electron-squirrel-startup
debug@2.2.0 /Applications/AMPPS/www/lsoft-collahuasi/app/app/node_modules/debug
ms@0.7.1 /Applications/AMPPS/www/lsoft-collahuasi/app/app/node_modules/ms
jquery@3.0.0 /Applications/AMPPS/www/lsoft-collahuasi/app/app/node_modules/jquery
Packaging for platform mac x64 using electron 1.2.5 to dist/mac

Signing app (identity: Developer ID Application: José María Sanhueza Solovera (535AL6XDH5))

  electron-osx-sign:warn No `entitlements` passed in arguments, will not sign with entitlements. +0ms
  electron-osx-sign Signing application... +89ms
  electron-osx-sign > application         /Applications/AMPPS/www/lsoft-collahuasi/app/dist/mac/lsoftcollahuasi.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: José María Sanhueza Solovera (535AL6XDH5) +0ms
  electron-osx-sign Signing... /Applications/AMPPS/www/lsoft-collahuasi/app/dist/mac/lsoftcollahuasi.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework +45ms
  electron-osx-sign Signing... /Applications/AMPPS/www/lsoft-collahuasi/app/dist/mac/lsoftcollahuasi.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib +8s
  electron-osx-sign Signing... /Applications/AMPPS/www/lsoft-collahuasi/app/dist/mac/lsoftcollahuasi.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libnode.dylib +748ms
  electron-osx-sign Signing... /Applications/AMPPS/www/lsoft-collahuasi/app/dist/mac/lsoftcollahuasi.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/crashpad_handler +2s
  electron-osx-sign Signing... /Applications/AMPPS/www/lsoft-collahuasi/app/dist/mac/lsoftcollahuasi.app/Contents/Frameworks/Electron Framework.framework +641ms
  electron-osx-sign Signing... /Applications/AMPPS/www/lsoft-collahuasi/app/dist/mac/lsoftcollahuasi.app/Contents/Frameworks/Mantle.framework/Versions/A/Mantle +6s
  electron-osx-sign Signing... /Applications/AMPPS/www/lsoft-collahuasi/app/dist/mac/lsoftcollahuasi.app/Contents/Frameworks/Mantle.framework +519ms
  electron-osx-sign Signing... /Applications/AMPPS/www/lsoft-collahuasi/app/dist/mac/lsoftcollahuasi.app/Contents/Frameworks/ReactiveCocoa.framework/Versions/A/ReactiveCocoa +553ms
  electron-osx-sign Signing... /Applications/AMPPS/www/lsoft-collahuasi/app/dist/mac/lsoftcollahuasi.app/Contents/Frameworks/ReactiveCocoa.framework +560ms
  electron-osx-sign Signing... /Applications/AMPPS/www/lsoft-collahuasi/app/dist/mac/lsoftcollahuasi.app/Contents/Frameworks/Squirrel.framework/Versions/A/Resources/ShipIt +522ms
  electron-osx-sign Signing... /Applications/AMPPS/www/lsoft-collahuasi/app/dist/mac/lsoftcollahuasi.app/Contents/Frameworks/Squirrel.framework/Versions/A/Squirrel +591ms
  electron-osx-sign Signing... /Applications/AMPPS/www/lsoft-collahuasi/app/dist/mac/lsoftcollahuasi.app/Contents/Frameworks/Squirrel.framework +647ms
  electron-osx-sign Signing... /Applications/AMPPS/www/lsoft-collahuasi/app/dist/mac/lsoftcollahuasi.app/Contents/Frameworks/lsoftcollahuasi Helper EH.app/Contents/MacOS/lsoftcollahuasi Helper EH +692ms
  electron-osx-sign Signing... /Applications/AMPPS/www/lsoft-collahuasi/app/dist/mac/lsoftcollahuasi.app/Contents/Frameworks/lsoftcollahuasi Helper EH.app +681ms
  electron-osx-sign Signing... /Applications/AMPPS/www/lsoft-collahuasi/app/dist/mac/lsoftcollahuasi.app/Contents/Frameworks/lsoftcollahuasi Helper NP.app/Contents/MacOS/lsoftcollahuasi Helper NP +607ms
  electron-osx-sign Signing... /Applications/AMPPS/www/lsoft-collahuasi/app/dist/mac/lsoftcollahuasi.app/Contents/Frameworks/lsoftcollahuasi Helper NP.app +615ms
  electron-osx-sign Signing... /Applications/AMPPS/www/lsoft-collahuasi/app/dist/mac/lsoftcollahuasi.app/Contents/Frameworks/lsoftcollahuasi Helper.app/Contents/MacOS/lsoftcollahuasi Helper +608ms
  electron-osx-sign Signing... /Applications/AMPPS/www/lsoft-collahuasi/app/dist/mac/lsoftcollahuasi.app/Contents/Frameworks/lsoftcollahuasi Helper.app +655ms
  electron-osx-sign Signing... /Applications/AMPPS/www/lsoft-collahuasi/app/dist/mac/lsoftcollahuasi.app/Contents/MacOS/lsoftcollahuasi +601ms
  electron-osx-sign Signing... /Applications/AMPPS/www/lsoft-collahuasi/app/dist/mac/lsoftcollahuasi.app +609ms
  electron-osx-sign Verifying code sign... +594ms
  electron-osx-sign:error Error: Command failed: codesign --verify --deep --verbose=2 /Applications/AMPPS/www/lsoft-collahuasi/app/dist/mac/lsoftcollahuasi.app
/Applications/AMPPS/www/lsoft-collahuasi/app/dist/mac/lsoftcollahuasi.app: nested code is modified or invalid

    at ChildProcess.exithandler (child_process.js:207: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) +558ms
(node:1409) Warning: a promise was rejected with a non-error: [object String]
(node:1409) Warning: a promise was rejected with a non-error: [object String]
(node:1409) Warning: a promise was rejected with a non-error: [object String]
(node:1409) Warning: a promise was rejected with a non-error: [object String]
(node:1409) Warning: a promise was rejected with a non-error: [object String]
(node:1409) Warning: a promise was rejected with a non-error: [object String]
(node:1409) 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 13.3.0
npm ERR! argv "/Users/laboratorio/.nvm/versions/node/v6.2.2/bin/node" "/Users/laboratorio/.nvm/versions/node/v6.2.2/bin/npm" "run" "dist:osx"
npm ERR! node v6.2.2
npm ERR! npm  v3.9.5
npm ERR! code ELIFECYCLE
npm ERR! lsoft@1.0.3 dist:osx: `build --platform darwin`
npm ERR! Exit status 255
npm ERR! 
npm ERR! Failed at the lsoft@1.0.3 dist:osx script 'build --platform darwin'.
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 lsoft package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     build --platform darwin
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs lsoft
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls lsoft
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Applications/AMPPS/www/lsoft-collahuasi/app/npm-debug.log
pib0x:app laboratorio$ 

@sethlu
Copy link
Member

sethlu commented Jul 3, 2016

Hi @p3140, I'm not sure where went wrong during your codesign phase. If there being no additional nested code left unsigned from your Electron app, would you try downloading "SignatureCheck" from https://developer.apple.com/download/more/, and checking your app bundle (though it failing the verification currently)?

The signature check application ("check-signature") checks OS X application bundles and installer packages to determine if they are correctly signed for distribution and will pass the default Gatekeeper assessment.

I think it may tell us more about the missing components during the codesigning process. 😸

@p3140
Copy link
Author

p3140 commented Jul 3, 2016

pib0x:mac laboratorio$ /Volumes/Signature\ Check/check-signature lsoftcollahuasi.app
(c) 2014 Apple Inc.  All rights reserved.
lsoftcollahuasi.app: nested code is modified or invalid
NO
pib0x:mac laboratorio$ 

@sethlu
Copy link
Member

sethlu commented Jul 4, 2016

@p3140 Sorry that didn't seem very helpful. 😞 I'll have a think about the issue and get back with something soon.

@develar
Copy link
Member

develar commented Jul 4, 2016

@p3140 Please try to check using https://itunes.apple.com/us/app/rb-app-checker-lite/id519421117?mt=12

@p3140
Copy link
Author

p3140 commented Jul 4, 2016

@develar with the app checker everything looks fine but there is an error
Requirements and resources didn't pass static validation.

if i expand details

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

if i click info of this error
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.

@sethlu
Copy link
Member

sethlu commented Jul 4, 2016

@p3140 may I ask which Xcode version you are using with codesign?

@p3140
Copy link
Author

p3140 commented Jul 5, 2016

@sethlu Thanks man, i was using an old version of Xcode (6.x). After reading your comment i did update and now all works fine !. Thanks to all and sorry for de noob question :D

@sethlu
Copy link
Member

sethlu commented Jul 5, 2016

@p3140 No worries; glad to know the issue's resolved. 🎊 Sometimes Xcode versions get slightly tricky...

@sethlu sethlu changed the title Failed to verify application bundle. See details in debug log. (electron-osx-sign:error) Nested code is modified or invalid Sep 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants