Signing certificate is invalid

Hi,

I'm trying to solve an issue with Xcode 8.3.3 that prevents me to test my Apps on my devices.


At the moment I'm using a free provisioning account for my tests.

I've worked many months without any problem, then I've upgraded to Sierra and Xcode 8.3.3.

Unfortunately I don't know exactly after what action/update the problem started, because I have not used Xcode for several months.


The issue: when I try to build my app to run on my iPhone, I get these errors in project page, under General > Signing view:

Automatic signing failed

Xcode failed to provision this target. Please file a bug report at <http://bugreport.apple.com/> and include the Update Signing report from the Report navigator.


Signing certificate is invalid.

Signing certificate "iPhone Developer: edoxxx@me.com (xxxxxxx)", serial number "xxxxxxx", is not valid for code signing. It may have been revoked or expired.



The issue happens either on my main Mac account and also if I create a fresh new user account,

it happens also if I use another AppleID account for code signing.

but it doesn't happens if I boot the same machine into another macOS installation (using the same AppleID and same device). In this last case I'm able to build and run the app without any issue on my device.


Because of that behaviour, I think that is something related to some software crap in the first OS installation, and not related to my user's "data" nor my AppleID account.


I've tried everything I've found on internet to clean-up the Xcode installation, including total removal/reinstall plus Keychain cleanup. But nothing solved the problem.


I've found some related informations in this topic:

https://forums.developer.apple.com/thread/83611

but no real solution.


Hope that someone could help me 🙂


Bye,

Edoardo

Answered by EdoFede in 254605022

I've found the problem.

Looking at differences in keychain between my productive machine and the fresh OS installation, I've dicrovered that the "Apple Worldwide Developer Relations" CA was missing in my productive machine (no idea why...).


I've erased all my developer certificates, downloaded new certificates from https://www.apple.com/certificateauthority/.

After the code signing fix in Xcode, I was back able to build and run my app on my device.

Strange that Xcode does not handle this kind of errors correctly, but report a "generic" error about code signing.


Thanks.

>Unfortunately I don't know exactly after what action/update the problem started, because I have not used Xcode for several months.


Do you understand that there was change, perhaps between when you originally used free and now, where the profile is good for 1 week only?

Accepted Answer

I've found the problem.

Looking at differences in keychain between my productive machine and the fresh OS installation, I've dicrovered that the "Apple Worldwide Developer Relations" CA was missing in my productive machine (no idea why...).


I've erased all my developer certificates, downloaded new certificates from https://www.apple.com/certificateauthority/.

After the code signing fix in Xcode, I was back able to build and run my app on my device.

Strange that Xcode does not handle this kind of errors correctly, but report a "generic" error about code signing.


Thanks.

Signing certificate is invalid
 
 
Q