Getting this error command /usr/bin/codesign failed with exit code 1 with xcode 9.1?
Asked Answered
P

4

7

I am getting this error

/Users/macbook/Library/Developer/Xcode/DerivedData/xxxxx-egjyfcyhdfcgftavbtoudbcgthja/Build/Products/Debug-iphoneos/xxxx.app: unknown error -1=ffffffffffffffff

command /usr/bin/codesign failed with exit code 1 

with xcode 9.1/ios11.1 while building the application, earlier i was able to run my application smoothly. Any idea what could be the issue. I have already tried following steps:

Deleting all the Derived Data.

update all provisioning profile and certificates.

But still no luck.

Polysyndeton answered 21/11, 2017 at 9:1 Comment(0)
S
20

Try updating your keyChain password. For that try following

  • If you don't know your old password, the solution is to create a new login keychain.

  • If you know your old password, use that password to update your existing login keychain:

    1. Open the Keychain Access app, which is in the the Utilities folder of your Applications folder.
    2. From the list of keychains on the left side of the window, select "login."
    3. From the Edit menu in the menu bar, choose “Change Password for Keychain 'login.'”
    4. Enter the old password of your user account in the Current Password field.
    5. This is the password you were using before the password was reset.
    6. Enter the new password of your user account in the New Password field. This is the password you're now using to log in to your Mac. Enter the same password in the Verify field.

Click OK when done, then quit Keychain Access. Quit your Xcode, reopen the project and try building your project it should work.

Sapwood answered 21/11, 2017 at 9:21 Comment(3)
actually, I tried step 1-6 and still used the same password, it worked too.Cot
Wow! almost did everything from cleaning, upgrading, recreating project with no use, changing Keychain Access app password to icloud user account password did the magic. Thanks @SapwoodInterstice
Change Password for Keychain 'login.' is disabled. And I am an administrator userAllhallowmas
S
1

I encountered this problem a few times over the past month and it was always right after I had imported some .png files into Xcode. I was able to recreate the error repeatedly if I imported a .png file that was exported from Illustrator using the "Save for Web" which did not including the resolution meta data that is read by Xcode. (screenshot attached)

enter image description here

But, if I exported the file using the "Export As" setting in Illustrator, set the resolution to 144px, and then imported it into Xcode, the error would disappear. (screenshot attached) enter image description here

Just make sure to delete the images without the resolution listed and you will hopefully be good to go!

Semiquaver answered 29/6, 2018 at 15:11 Comment(0)
D
1

This started happening to me in Xcode 9, along with a host of other keychain-related problems (I'm on 9.3 and it just happened today). Sometimes the automatic code signing just spontaneously goes afoul for me and I start getting an errSecInternalComponent error along with the codesign failed with exit code 1.

What has consistently worked is to go into Xcode -> Preferences -> Accounts, go to Manage Certificates... and use the plus sign to add the certificates I need, even if it looks like there are perfectly good one's already present. I don't know why these certificates would be any different, but... they just work.

Dulcinea answered 9/8, 2018 at 22:24 Comment(0)
C
0

I changed my Mac's general login password and it worked.

Cappello answered 29/6, 2018 at 11:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.