-
Notifications
You must be signed in to change notification settings - Fork 16.1k
Could not get code signature for running application #7476
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
Comments
@arkakkar Sounds like you are using the http://electron.atom.io/docs/api/auto-updater/#macos
|
For further clarification, the packager signs your app. When you run |
How can I sign the electron executable so that auto updater runs fine when I use npm start with the source and not just after the app is packed so that I could also debug my code. |
The issue is resolved. Code signing electron executable working. Thanks |
@arkakkar How did you sign the Electron executable? |
@JesusGalvan https://github.com/electron-userland/electron-builder/wiki/Code-Signing How to Export Certificate on macOS Open Keychain. Developer ID Application: to sign app for macOS. Open context menu and Export. |
So, maybe this is too much information, but it took me a few hours to figure out how to sign the .app file. I'll list out what I did in the off chance it helps someone else (I am completely new at developing on a mac): prereqs: you have electron-packager installed, you have electron-osx-sign installed, and you can build your target.
Again, sorry if that is not the original question, but I was stuck for a few hours. |
Although closed, this issue helped me out so I'm leaving some useful information for future readers. To further clarify a few points in regards to @jdell64 post -- the Accounts tab can be accessed by first opening the Preferences window in XCode which can be found under the File menu. The proper certificate name cannot be seen through XCode. Once you've added a certificate, you'll need to open Keygen Access.app (use Spotlight search), click My Certificates from the left menu. Here you will see your certificate. For example:
I will further add, that if you are using electron-builder to package your application, then you will need to export your certificates. Read more about code signing and exporting your certificates. It is important to note with regards to auto updating, the use of a "Mac Development" certificate, to the best of my knowledge, would only enable auto updating on your own Mac. If you are releasing your application for others, you will need to add both Developer ID Application and Developer ID Installer certificates, which can only be added if you have a valid Developer ID which you get when you purchase a subscription to the Apple Developer Program. |
i met the same issue today .if you want to running by dev mode,you should sign electron.app. |
Building on @erynkyo I've found that you don't need to create a new key and can ad-hoc code sign by providing just a dash for the --sign param
|
@shanesmith awesome solution. |
Wow what a rabbit hole I went down to figure this out. Thanks everyone here for the pieces that got me to where I needed to go. The following is what I needed to do: From within the
This did the job for me (finally). |
You can also just wrap the |
Just as a tip, I added the following script and scripts: {
"sign-dev-electron-app": "codesign --deep --force --verbose --sign - node_modules/electron-prebuilt-compile/node_modules/electron/dist/Electron.app",
"postinstall": "npm run sign-dev-electron-app"
} Note: I'm using |
I have this error but with a signed app, does someone know what can be the cause ? |
@Dammmien My guess would be the signature is incorrect. Look for errors on signing, etc. |
|
Iam having code that is written to create a desktop app using electron. i have used electron-packager and finally got a .dmg file. Getting error while importing the electron code into xcode. How can i add the code into xcode and how can i attach signin certificates for my .dmg file in macos??? |
After Running: codesign --deep --force --verbose --sign - node_modules/electron/dist/Electron.appWe get: Electron.app/: code object is not signed at allIn subcomponent: **/node_modules/electron/dist/Electron.app/Contents/Frameworks/Electron Framework.frameworkSeems like this hack won't work anymore |
I also get the same as @PathToLife |
I have signed my dev.app successfully using the following command : , but the autoUpdater throw an error when I try to update my dev.app by dev mode, |
I think this is because in dev mode something (looks like it's squirrel?) extracts this appId, "com.github.electron", from node_modules/electron/dist/Electron.app and not from package.json. I spent 1h trying to figure out, where exactly does this happen (checking both electron source code and squirrel source code), but finally gave up. Would be great if it was possible to substitute this string (to match one in package.json) in development mode (i.e. where the app is executed via |
node_modules/electron/dist/Electron.app: signed app bundle with Mach-O thin (x86_64) [com.github.Electron] |
Error: Could not locate update bundle for com.github.Electron within file:///Users/elliotyan/Library/Caches/com.github.Electron.ShipIt/update.puOMysF/ |
Hi, I can see the new version of the app is downloaded in the
(my app's name is "tiddlygit", so the path is like this ↑) And try to unzip and open it will result in But this can be fixed by running:
And just move this to the Application folder. This can actually be done automatically in electron-builder. |
My app is completely open-sourced, so I don't want to pay apple for signing. |
Error: Code signature at URL file:///Users/krishna-pt5814/Library/Caches/com.Krishnaraj.autoupdater.ShipIt/update.Homm8pL/Autoupdater%20app.app/ did not pass validation: code has no resources but signature indicates they must be present getting this error while the autoupdater downloads the updated version. I'm using electron-updater npm module |
My certificate works fine when I package the app by running
"electron-packager . $npm_package_productName --app-version=$npm_package_version --version=1.4.1 --out=../mac_builds --ignore='^/builds$' --platform=darwin --arch=x64 --icon=./app/icons/mac.icns --tmpdir=false --osx-sign.identity='Mac Developer: Arjun Kakkar (HQ3PJX83VN)' --overwrite"
but throws the error when running npm start
The text was updated successfully, but these errors were encountered: