Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 405
xeb Avatar asked Nov 21 '17 09:11

xeb


3 Answers

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.

like image 164
Kadian Avatar answered Nov 10 '22 03:11

Kadian


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!

like image 36
ojbravo Avatar answered Nov 10 '22 05:11

ojbravo


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.

like image 1
Badam Baplan Avatar answered Nov 10 '22 03:11

Badam Baplan