8

I can't sign apps on macOS 10.12.4 when I trying to run a project on xcode I get

error: The specified item could not be found in the keychain.

clearing keychain not fixing anything

can you help please ?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Bader
  • 825
  • 1
  • 9
  • 26
  • Possible duplicate of [Error when trying to obtain a certificate: The specified item could not be found in the keychain](http://stackoverflow.com/questions/16845169/error-when-trying-to-obtain-a-certificate-the-specified-item-could-not-be-found) – Daniel Storm Apr 25 '17 at 20:35
  • 1
    @DanielStorm this is old question also different now there is a new thing called "Automatically manage signing" – Bader Apr 25 '17 at 20:40
  • 1
    I have been having the same issue too. Anyone any sucessfull experience? – Sasho May 04 '17 at 14:52
  • Are you able to compile when a simulator is selected vs when your device or 'general' is selected next to schemas? – Sasho May 04 '17 at 15:31
  • @Sasho in "keychain access" I have noticed "My certificates" is empty this section not suppose to be blank . – Bader May 04 '17 at 23:55
  • I am able to compile when I choose a simulator, but not the others... – Sasho May 05 '17 at 04:20
  • @Sasho simulator doesn't require code signing – Bader May 06 '17 at 02:24
  • tested on xcode 9 beta 3 still hasn't been fixed yet – Bader Jul 19 '17 at 15:25
  • 1
    @bader did you recently migrate to a new mac by chance? – Ray Hunter Jul 20 '17 at 04:23
  • yes I did copied old mac files into my new machine via migration assistant – Bader Jul 20 '17 at 04:31
  • @bader same here. I think we have the same issue. I will keep you posted if I can figure it out. – Ray Hunter Jul 20 '17 at 04:47
  • 1
    @bader I completely uninstalled xcode and installed it again and the same issue happened. – Ray Hunter Jul 20 '17 at 13:52
  • @RayHunter It's not Xcode fault I did uninstalled it manually many times and I get same result every time .. I think our problem in keychain access if you look into "My Certificates" you will find it empty .. did you report it to [Apple](https://bugreport.apple.com) ? – Bader Jul 21 '17 at 00:54
  • @bader that is the same for me. I have uninstalled the keys, certs and xcode and still having the same issue. I have exported the accounts from my other mac and imported them to my new one and I still have the same issue. I have not reported it to apple. – Ray Hunter Jul 21 '17 at 03:21
  • 1
    @RayHunter I did reported it to apple they working on a fix but I didn't mention migration assistant part – Bader Jul 21 '17 at 04:16
  • @bader do you have a link to where you reported it? – Ray Hunter Jul 21 '17 at 14:02
  • http://bugreport.apple.com – Bader Jul 21 '17 at 18:09
  • @bader I ended up reformatting my mac to get it working. I asked a bunch of people and no one could tell me how to fix it. That was my last resort. I believe the migration with the keychain caused the issue somehow. – Ray Hunter Jul 24 '17 at 04:17

1 Answers1

0

I ran into the same problem. In my case the cause was a VPN auth token (SafeNet) that I had plugged into a USB port. When I removed it, suddenly the code signing worked again.

It seems that the code signing process had some trouble (timeout?) accessing the keychain. So the hint is: remove or kill everything (hardware, software, apps) that could interfere with keychain access.

I know that this answer does not cover all the cases for this error, but one of them for sure ;)

wroluk
  • 101
  • 1
  • 5