XCode Cloud failing at export archive

Five days ago everything was working as intended. Nothing has been changed on Workflows. All of a sudden, new builds are failing. The issue is with these two tasks during the Archiving:

  • Export archive for ad-hoc distribution
  • Export archive for app-store distribution

I downloaded the Artifacts and checked the logs. If we look at the IDEDistribution.verbose.log then we see the following errors:

    "Error Domain=IDEProfileLocatorErrorDomain Code=1 \"No profiles for 'uz.uzum.avto' were found\" UserInfo={IDEDistributionIssueSeverity=3, NSLocalizedDescription=No profiles for 'uz.uzum.avto' were found, NSLocalizedRecoverySuggestion=Xcode couldn't find any iOS App Store provisioning profiles matching 'uz.uzum.avto'.}",
    "Error Domain=DeveloperAPIServiceErrorDomain Code=5 \"There is a problem with the request entity\" UserInfo={IDEDistributionIssueSeverity=3, NSLocalizedDescription=There is a problem with the request entity, NSLocalizedRecoverySuggestion=You already have a current Distribution Managed certificate or a pending certificate request.}",
    "Error Domain=IDECodesignResolverErrorDomain Code=1 \"No signing certificate \"iOS Distribution\" found\" UserInfo={IDEDistributionIssueSeverity=3, NSLocalizedRecoverySuggestion=No \"iOS Distribution\" signing certificate matching team ID \"x\" with a private key was found., IDEProvisioningError_UserInfoKey_IDEProvisioningErrorSpecifier=iOS Distribution, NSLocalizedDescription=No signing certificate \"iOS Distribution\" found, IDEProvisioningError_UserInfoKey_IDEProvisioningErrorPlatform=com.apple.platform.iphoneos, IDEProvisioningError_UserInfoKey_IDEProvisioningErrorAction=5, IDEProvisioningError_UserInfoKey_IDEProvisioningErrorTeam=<IDEProvisioningBasicTeam: 0x600001866280; teamID='x', teamName='(null)'>}"
)}

Issues seems to be related to certificates and etc. However, I checked the member center, and everything is fine with the certificates and profiles. Moreover, I can build, archive and distribute from my local machine with no issues at all.

One particular thing that got my interest is the following: I opened the IDEDistribution.critical.log file, and saw the following issue:

It seems Xcode Cloud is having a hard time to connect to App Store Connect. Please, help me to resolve the issue. I tried to change the Environment, to add new provisioning profile, but nothing works.

FYI: I tried different environments to build, but the latest was: Xcode 15.0.1 macOS: Ventura 13.6.3 platform: iOS Deployment Preparation: Testflight (Internal Testing Only)

Answered by erichoracekoai in 778131022

We have been able to mitigate this issue by revoking every distribution certificate generated by Xcode Cloud (listed as "Distribution Managed (Xcode Cloud)" on this page https://developer.apple.com/account/resources/certificates/list) and rebuilding. At this point the error went away and the archive was successful.

Same here, meanwhile the status of Xcode Cloud is still green: https://developer.apple.com/system-status/

It seems I forgot to include the second error:

One particular thing that got my interest is the following: I opened the IDEDistribution.critical.log file, and saw the following issue:

Account "Session Proxy Provider": Unable to authenticate with App Store Connect (Error Domain=DVTITunesSoftwareServiceFoundation.DVTServicesSessionProviderCredentialITunesAuthenticationContextError Code=1 "(null)")

We are also encountering this issue, and have not yet found a workaround. Please let us know if you found a way to resolve this.

I having the same issue. Check Cert and provisioning everything seems to be fine, update the environment back to the last successful build. no luck

Accepted Answer

We have been able to mitigate this issue by revoking every distribution certificate generated by Xcode Cloud (listed as "Distribution Managed (Xcode Cloud)" on this page https://developer.apple.com/account/resources/certificates/list) and rebuilding. At this point the error went away and the archive was successful.

Hello guys, I have the same issue but I didn't resolve it removing the xcode cloud certificates, I tried in 3 different platforms (macOS, catalist, iOS) and in 2 different projects. The error is the same every where I don't know what to do to fix it. :(

I conclude that this is the error that is generating the issue.

2024-03-30T20:29:19.958790576Z	2024-03-30 13:29:18.624 xcodebuild[3984:19314]  IDEDistribution: App Store Connect request for store configuration failed for account Session Proxy Provider (Account "Session Proxy Provider": Unable to authenticate with App Store Connect (Error Domain=DVTITunesSoftwareServiceFoundation.DVTServicesSessionProviderCredentialITunesAuthenticationContextError Code=1 "(null)"))
XCode Cloud failing at export archive
 
 
Q