"Your account already has a valid iOS Development certificate" error - ios

Xcode always says "No code signing identities found" when I work on a new project.
Normally, I just press fix issue, and it works. But since a while, it keeps saying "Your account already has a valid iOS Development certificate". When I try to press "Reset" in Xcode 7.2, nothing happens, other than that I get a email that my certificate was revoked. I still get the same error. I also tried the Xcode beta, when I press "Reset" there, it says "Certificate installation failed".
I'm a free(not paid) apple developer, so I don't have access to the member center. I also haven't got a mac that has got the old certificate, otherwise I could just import it from there.

Recently WWDR certificate expired(actually on 14/02.2016) and this caused a lot of issues. You could try downloading the new one:
https://developer.apple.com/certificationauthority/AppleWWDRCA.cer
This is not a part of the development program and you don't need access to member center in order to download it.
Keep in mind to remove the old one from Keychain access in both Login and System(you may need to check View->Show expired certificates if it doesn't appear).

Related

Can't run Xcode project on device due to certificate issues

This is the first question I've ever posted.
I am trying to run an Xcode 9.0.1 project on an iPhone 6 Plus and these three errors come up:
Code Signing Error: The user name or passphrase you entered is not
correct.
Code Signing Error: No signing certificate "iOS Development" found:
No "iOS Development" signing certificate matching team ID
"KP3X78QM3M" with a private key was found.
Code Signing Error: Code signing is required for product type
'Application' in SDK 'iOS 11.0'
I suspect this is caused by Xcode not being able to read the developer certificates on my computer. This is what the General tab looks like under Signing. Clicking "Try Again" will generate a new certificate but all of the errors still remain.
I checked the Keychain Access application and it has an iPhone developer certificate, although I'm not sure if anything else is missing.
I've looked up similar questions and started reading Apple's Xcode troubleshooting guide but I am still confused and don't want to accidentally modify anything important.
I desperately need to fix this issue; if there is an Apple support email or someone I can contact in person about this, that would be amazing.
Thanks in advance!
I found a solution!
Even though this question only has a few views, I'll share it in case anyone else has the same problem in the future.
Long story short, I Quit Xcode while the two errors were still present in the Signing section of the General tab. At this point, clicking Preferences -> Accounts -> Manage Certificates still gave the "Missing Private Key" error messages like so.
After quitting Xcode I restarted the computer and opened Xcode again. Under the Signing section for the General tab, it prompted me to log in with my Apple ID. After logging in, the two errors were gone. I opened the "Keychain Access" application on the mac, clicked on the "My Certificates" tab and noticed that a new certificate had been generated WITH a drop down arrow that contained a new private key!
To set up the new key so it works, connect your device (in my case an iPhone 6 plus) to your mac and run your Xcode project on the device. A window titled 'codesign wants access key "access" in your keychain." should pop up, wanting the password for your computer.
VERY IMPORTANT: Type your computer login password (not your Apple ID password) and click ALWAYS ALLOW! I got confused and accidentally hit "Deny" the first time around which is what got me into this mess in the first place. Click "ALWAYS ALLOW"!!!
After this point, Xcode should be able to run your app on a device.
Good luck!

Xcode: "Revoke certificate - Your account already has a signing certificate for this machine but it is not present in your keychain."

I'm posting this as a question and providing the answer for the benefit of others running into the same situation and searching for the solution as this had me scratching my head and wasting time and searching past questions until I eventually discovered the cause.
I got this error but nothing about my project; my accounts; my certificates; my mac set up had changed. In particular the certificates are still valid and have not been revoked.
Revoke certificate Your account already has a signing certificate for
this machine but it is not present in your keychain. To create a new
one, you must first revoke the existing certificate.
With no obvious cause for the problem suddenly appearing, I eventually discovered the cause, posted as the answer below.
In my opinion the answer provided by ykay in this post Your account already has a signing certificate for this machine but it is not present in your keychain should be the correct answer to this issue - it is quick and painless and does NOT involve REVOKING any certificates
This is what worked for me...
It seemed I was missing some certificates in Keychain Access. I had to install the Apple Worldwide Developer Relations Certification Authority. See the two articles below:
(Installing Missing Intermediate Certificate Authorities)
https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html#//apple_ref/doc/uid/TP40012582-CH31-SW30
https://www.apple.com/certificateauthority/
This is actually a bug with XCode 8.3 beta 4 (also present in Xcode 8.3 beta 3) and will occur if your device is not registered on your Apple account.
Xcode is displaying the wrong error message, if the same device/project is opened with Xcode 8.2, then the correct message is displayed:
Instead of displaying this message, Xcode is erroneously reporting the message about needing to revoke the certificate.
Obviously the solution is to register the device, which must be done manually as 8.3 is no longer recognizing that situation and offering it as an option.
Or open the project in Xcode 8.2 and register the device via Xcode and then re-open the project in Xcode 8.3
I have found Many answer:
But This Answer help for me:
Go to Xcode Preferences -> Accounts tab -> Double-click your team name -> Click the + at the bottom left of the dialog box that appears -> Select iOS Development.
Your account already has a signing certificate for this machine but it is not present in your keychain
Thanks
For me the problem was that the certificate was installed on the user A, but when I logged with the user B I got this error. What I did was on the user A I opened the Keychain Access.app, looked for the certificate that I needed (under My certificates on the left side), exported it and then on the user B, add the certificate.
You can tap on 'Manage Certificates' and after add new 'Apple Development' certificate.
This happened to me when the subscription expired and I had to reissue the certificates.
I was able to get rid of the error by deleting the old provisioning profiles from: ~/Library/MobileDevice/Provisioning Profiles
May be one of certificates included in your provisioning is revoked.
Did you try enter "https://developer.apple.com/account/ios/certificate" then edit your provisioning by add again your certificate which revoked already?

Xcode 6.1 iOS Distribution is always revoked or missing

I'm trying to submit an app but I'm stuck. I can't get a the iOS Distribution signing identity to show up as valid under my account in Xcode 6.
It always shows up as revoked, never valid. I've made sure to connect it to my provisioning account on the dev site.
I also went to the developer site, revoked it there, recreated it, then went back to xcode to try to submit my app but I get this message:
When I check my account in preferences after getting this message, the iOS distribution doesn't even show up:
And when I try to add one it says:
I've tried:
Deleting the iOS Distribution cert and regenerating it on xcode (generates as revoked)
Deleting it and creating it on developer.apple.com
Linked my provisioning profile to the correct app id
Using Xcode 5 to submit my build instead
I don't know what to import or where to find a developer profile from. I've checked the dev documentation and it says the Your account already has a valid iOS Distribution certificate error happens when switching mac computers, but this is all on the same machine. I am using a VMWare to run this on an virtual image of iOS Mavericks, could that be culprit?
Make sure the time settings on your Mac are correct.
When you use a virtual machine and pause it, it pauses the time on the Mac as well. Your time settings are probably pushed back because of it, making your certificates invalid valid until a time later in the future.
For more info, see: Distribution certificate error:"This certificate is not yet valid."

ITMS 9000: The binary you upload was invalid

When I ran into this issue, my first thought was to search Stack Overflow for solution. I did the search, found several topics. But, unlike my issue, those posters got some clue from the error such as,
App Store error: The binary you uploaded was invalid
Invalid iPhone Application Binary
Uploading Binary iPhone App "The signature was invalid" again again and again
The binary you uploaded was invalid. The signature was invalid, or it was not signed with an Apple submission certificate
Or this one:
"The binary you uploaded was invalid. the file was not a valid zip file" Error message uploading app to iTunes Connect
The binary you upload was invalid. the file was not a valid zip file
Or this one
CFBundleVersion in the Info.plist Upload Error
The binary you uploaded was invalid. The key CFBundleVersion in the Info.plist file must contain a higher version than that of the previously uploaded version.
But for me, I got nothing, it just says ERROR ITMS-9000: "The binary you uploaded was invalid"
I try to resolve this issue by the following attempts, all of them failed
Test on simulator make sure the app works ... Check!
Test on device (iPhone 5S, iOS 7 and iPhone 4s iOS 6) to make sure the app works ... Check!
Clean and build ... Done!
Make sure that I'm using distribution profile (not ad hoc, dev) ... Check!
Redo the whole process of certificate and provisioning profile ... Done!
Check my code signing identity ... Check!
Check bundle id, there are matches (Xcode == App ID in Apple Developer == App in iTunes Connect) ... Check!
App ID case sensitive check .... Check! (lower case, com.companyname.productname)
Delete target in project and then create a new one (I have one project, multiple targets) ... Done!
Delete scheme and then create new one ... Done!
Check icon size, check loading image size, check pixels per inch ... Check!
Check Localizable.strings for typo ... Check!
Delete build foler ... Done!
Restart Xcode, restart computer ... Done!
Connect to another wifi router ... Done!
Submit from my colleague Macbook ... Done!
Create new App ID, new certificate, new provisioning profile and update iTunes Connect Bundle ID ... Done!
Take a break for an hour, try again ... Done!
I really have no idea what did I do wrong. I've been submit app since iOS 4, hundreds of updates. But never ran into anything like this. In fact, I've just update another app yesterday which share the same codebase with this one, no issue at all.
Is there a way I can gather more information about "the invalid binary" Xcode is telling me? Or is there anything else I should try?
For everyone who found this topic (18 July 2014), maybe your best shot might be, taking a break for few hours (or a day) and try again.
--- Last Update ---
It turns out to be Apple Server issue
Says, I have an application called "Sample App"
This app has an app id of com.tartw45.sampleapp
This app use an App Store Distribution profile called "Simple App App Store Distribution Profile"
Back to last Friday (18 July 2014), everything seems ok, no indicator of any error but I couldn't publish the app as I stated above
Today (21 July 2014), I tried again with archive from last week, still no success.
I decide to redo the archive process and I found that "Simple App App Store Distribution Profile" is no longer valid
I login to developer.apple.com and found that "Simple App App Store Distribution Profile" also no longer there in the list of all provisioning profile. **
Then I try to create a new provisioning profile with the same name (Simple App App Store Distribution Profile) but there is an error says that this profile is already exist, please choose another name **
So, I create a new provisioning profile with slightly different name, refresh the provisioning profile in XCode, archive again and then publish .... Works!
So, It's definitely Apple Server issue and your provisioning profile (**), it has nothing to do with your XCode version or project setting (if you successfully submitted your app once before running into this issue with no reason). So, anyone who found this topic, please try to validate your provisioning profile and try to publish again.
I was having the same issue since last night and finally got it to work just now. Had to go through this process
Logged in on https://developer.apple.com> > Certificates, Identifiers & Profiles > Provisioning Profiles and revoked my company's Distribution Certificate.
Then Xcode > Preferences > Accounts > Apple IDs > (my company) > View Details and refreshed the certificates and Provisioning Profiles. It prompted that no Distribution Certificate was found on the Developer Profile and offered to request one on my behalf, which it did.
Launched Keychain Access > Certificates and removed all of the expired Certificates (somehow I had a few of them)
I went back to https://developer.apple.com> > Certificates, Identifiers & Profiles > Provisioning Profiles and edited all of my manually managed Provisioning Profiles (Development — which had to be re-generated — and Distribution — which had to be linked to the newly created Distribution Certificate and generated again)
Once again Xcode > Preferences > Accounts > Apple IDs > (my company) > View Details and refreshed the certificates and Provisioning Profiles.
Credit to Rodrigo on the apple dev forums
iTunes connect (or at least some services that iTunes Connect uses) are down for the moment, so "Take a break for an hour, try again ..." is your best shot. Apple of course doesn't update their status page until tomorrow or so.
https://developer.apple.com/system-status/
It's on Apple's side. I tried to validate a couple of apps that worked last night, no changes in code, credentials, or Xcode and this is what I get.
We found it wasn't necessary to revoke anything- when I went to Provisioning Profiles->Distribution, the two profiles for our two apps we were trying to release had been removed. I recreated those profiles (but I had to assign new names, using the old name led to a "profile already exists" message- so those identifiers are still out there- somewhere). Downloaded and installed the new profiles, resubmitted the archives we made on 7/18/14, and everything sailed right through.
Apple iTunes' Connect server is down at the moment. I have tried almost everything, but all failed.
I suggest as above to take some rest and try upload after an hour or so.
I ran into the same error when I tried validating my app. I got a message saying,
Unable to process app at this time due to general error
I searched on SO for this and only found a suggestion to wait for some time, as this is an error from Apple's servers. I tried all sorts of things, from playing with provisioning profiles to improving app performance and linking libraries, none of which resolved the issue. Unfortunately, I guess we don't have any other options than to wait and let Apple do its work.
Yesterday, I had to regenerate an expired distribution certificate and got errors each time. Now it works, but I got the invalid binary error. It looks like Apple have done some changes and missed up something.
There might be a link between a change in certificates yesterday and the invalid binary error today, which gives a possible explanation of this problem.
I've had the same issue and have found out that my Provisioning Profile for Distribution "somehow" disappeared from the Apple Developer Portal. But when I tried to re-create it, I received error message about the existing one (which I couldn't find at all).
Finally, I've just created a brand new Distribution Provisioning Profile, downloaded and installed it. In the end, I was able to validate the application package and upload was successful.
Just spent a while on this also, my upload previously worked and managed to get through validation.
However, once up Apple would fail/reject the uploaded binary due to something similar to the below
https://stackoverflow.com/questions/18952213/invalid-directory-name-your-app-contains-a-directory-name-that-is-already-rese#=
Upon retrying, later without making any modifications, rather then sucedding then failing after validation I started receiving an error exactly the same as the OP.
Fixing the framework reference issue, enabled me to succesfully upload.
So rather then uploading passing validation and then being rejected, it would not pass validation, and I give the same error, without any hints.
Hopefully this helps someone else.
In my case I updated my Mac version and it worked fine afterwards.

No iOS Development certificates found

I got a strange error in my Xcode organizer when I want to update my Provisioning profiles.
Xcode says this:
"No iOS Development certificate was found. However, there is already a certificate request pending. An Agent or Admin must approve this request before you can download your certificate."
I never experienced this before so if someone got an explanation and maybe a solution, it could be nice :).
I check on the provisioning page in the developer zone on the Apple website but I don't find something that could be broken :/
The trick that did it for me was to log into developer.apple.com and manually create a dev certificate and then manually create a provisioning profile. I have only one team with only one member (me) so there was no way for me to approve a certificate. When I tried to do it automatically through the Xcode organizer, the error just persisted.
Same error message here. Seems to have multiple sources.
Mine was that I have a developer account and joining two teams.
In one team i had no Certificates at all. In the past this did not cause any problems. In Xcode Organizer I could choose which team I try to fetch the Provisioning Profiles. And if chose the team for which I had Development Certificate the Provisioning Profiles got downloaded with no error.
I think, with the new improved Member Center starting from april 2013 the Organizer fetches automatically all team accounts - without asking for a specific team. As one team had no certificate at all, the process of fetching for all teams stop with this error message.
Solution (for this problem) is to add a Development Certificate for ALL teams.
Having just gone through this myself, I highly recommend you contact Apple Developer Program Support and have them walk you through the process of resetting your certificates and profiles. It is not a difficult thing to do manually, but there are lots of ways to muck it up (I speak from experience) AND the more people that call the more likely they are to continue improving the process.
That said, the short(-ish) answer is to delete all of your developer and installer certificates from Keychain, then delete all certificates and provisioning profiles from the portal, then create them all again from scratch, and then refresh Xcode to bring them all in.
Oh, and be sure to back it all up when you're done!
I got the same issue, and solved it by clicking my team under "Teams" in organiser. I only have one team there atm, and didn't expect that to have any impact, but it forced a reload of the profiles or so, and now it works. Hth.
My situation was that I got this message when trying to refresh my old certificates (developer + distribution) from Xcode, when they had expired due to the yearly renewal of the developer program.
For what it's worth, I managed to fix the problem by this procedure (roughly):
Delete my old "iOS Team Provisioning Profile" from my device
Open my keychain and delete the old private keys associated with with the expired certificates.
Remove the expired certificates from the list in Xcode's organizer (on the portal, they were deleted already).
Generate new certificates manually on the portal, following the instructions in detail (including downloading the new certificates and double-click to install).
After trying a new refresh in Xcode's organizer, I still got the same error message, but when checking on the device, a new provisioning profile had now been automatically created and installed, so I could forget about the error message.
You have developer access in apple developer profile. Please ask admin to approve your certificate request.When admin/agent will approve then automatically that error will be removed.
As the message says you need to log into developer.apple.com site and approve the certificate request.
If you are not the agent for your account, then you will need to get the agent to approve the request.
Oddly all it took for me was:
First do an export (just to be safe!)
Xcode 5:
In Xcode -> Preferences -> Accounts
Click the cog icon at the bottom left -> Export Accounts...
Enter a filename and password and save
Ideally, then back it up somewhere that's not your Mac (Dropbox for example) - it is encrypted so that's okay.
Then for the actual fix:
Xcode 5:
In Xcode -> Preferences -> Accounts
Select the Apple ID in the left column
Click the "-" (minus) icon at the bottom left and conf
Click the "+" (plus) icon at the bottom left -> Apple ID... and login
Everything was then just fine...
In Xcode: Menu Xcode --> Preferences --> Accounts --> View Details
Then press the refresh button in the lower left corner.
I got a slightly different message recently Nov-2021 using xcode 13.x . The message was "ios_develop.cer file not found" when I was trying to "Build" the project, even though the file was there although it was expired. I was not surprised, I hadn't built this solution for years. I do renew my Apple developer subscription every year. My son took a very old school solution to fix this that I wanted to mention in case it helps anyone. Apple tools like "Manage Certificates" wouldn't let me delete the old certificate so we deleted the certificate in File Manager and generated some new ones, but we couldn't get xcode past the "file not found" message, even with certificates created in xcode "Manage Certificates". Then my son copied the new Developer cert to the location it was looking for and renamed it to exactly the name it was looking for. Xcode then started to fuss about permissions on the new cert which we fixed in Get Info, Properties "Allow Access to All" both the public and private cert. I really thought there was zero chance this would work but go figure, all the sudden the old xcode project fully Built and we were able to place the iPhone executable on iPhones that were in the provisioning list. Refreshing that such an old style approach (placing a file where it was looked for) worked so well. Now that Apple sees that this works they will probably check to see the cert was provided only through their tools, but it should work for a while.
I have the same problem. There is indeed nothing to approve, the status of my certificates is issued, if there would be a need for provenance there would be a button to do so. To be able to continue working I just deleted the "Xcode managed" profile, created a new one, downloaded it (not using Xcode) and throw it into Organizer.
I met the same problem with an Apple ID account (admin) with two Team. Once I remove my account from one of the team, that message never bother me anymore. But in this case, if I want to refresh all provision profiles using two distinct account. Hope this will help.
Just download the provision files manually solved the problem for me.
I was able to solve this issue for myself by discovering I had a couple of CSR's that I hadn't completed. Both files had the extension .certSigningRequest and had been produced through the Member Center (not Xcode). But I had not completed the upload and certificate generation, which is what Xcode was complaining about when it said "However, there is already a certificate request pending.". Once I completed those steps the problem went away.

Resources