Xcode 9 Server build error: The provided certificate is not valid. You may need to revoke this certificate and request a new one

XCode 9 Beta 3 continuous integration bot is returning a build error. It says my certificate is invalid and needs revoking. It doesn't say what certificate it is referring to, but I can archive and enterprise export without any problems.


This is the command that seems to be causing the issue:


$ /usr/bin/xcrun xcodebuild -exportArchive -archivePath /Users/xcode/Library/Caches/XCSBuilder/Integration-d008f238c5c61acba3d8903c45050109/EvolveBETA.xcarchive -exportPath /Users/xcode/Library/Caches/XCSBuilder/Integration-d008f238c5c61acba3d8903c45050109/ExportedProduct -exportOptionsPlist /Users/xcode/Library/Caches/XCSBuilder/Integration-d008f238c5c61acba3d8903c45050109/ExportOptions.plist -IDEPostProgressNotifications=YES -DVTAllowServerCertificates=YES -DVTProvisioningUseServerAccounts=YES -allowProvisioningUpdates -allowProvisioningDeviceRegistration -configuration ReleaseBETA


And a detailed error report is:


NSLocalizedDescription=The provided certificate is not valid. You may need to revoke this certificate and request a new one.}
2017-07-11 16:32:07.728 xcodebuild[68679:4490716] [MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7fe05d50d310>: Error Domain=IDEDistributionSigningAssetStepErrorDomain Code=0 "Locating signing assets failed." UserInfo={NSLocalizedDescription=Locating signing assets failed., IDEDistributionSigningAssetStepUnderlyingErrors=(
    "Error Domain=IDEProvisioningErrorDomain Code=9 \"\"Evolve-Beta.app\" requires a provisioning profile with the App Groups feature.\" UserInfo={NSLocalizedDescription=\"Evolve-Beta.app\" requires a provisioning profile with the App Groups feature., NSLocalizedRecoverySuggestion=Select a provisioning profile for the \"Default\" build configuration in the project editor.}",
    "Error Domain=IDEProvisioningErrorDomain Code=9 \"\"Document Importer.appex\" requires a provisioning profile with the App Groups feature.\" UserInfo={NSLocalizedDescription=\"Document Importer.appex\" requires a provisioning profile with the App Groups feature., NSLocalizedRecoverySuggestion=Select a provisioning profile for the \"Default\" build configuration in the project editor.}"
)}
error: exportArchive: "Evolve-Beta.app" requires a provisioning profile with the App Groups feature.


Error Domain=IDEProvisioningErrorDomain Code=9 ""Evolve-Beta.app" requires a provisioning profile with the App Groups feature." UserInfo={NSLocalizedDescription="Evolve-Beta.app" requires a provisioning profile with the App Groups feature., NSLocalizedRecoverySuggestion=Select a provisioning profile for the "Default" build configuration in the project editor.}


I've tried downloading all of the profiles and certificates in any way and place I can think of, but I haven't had any issue with this before XCode 9.


Any thoughts?

Replies

Having this same issue. Is there anyway to manually specify the provisoning profiles to use as a workaround?

I'm having this same problem with Xcode beta 5 using it as a build server.

error: exportArchive: "MYCOOLAPP.app" requires a provisioning profile with the App Groups feature.
Error Domain=IDEProvisioningErrorDomain Code=9 ""MYCOOLAPP.app" requires a provisioning profile with the App Groups feature." UserInfo={NSLocalizedDescription="MYCOOLAPP.app" requires a provisioning profile with the App Groups feature., NSLocalizedRecoverySuggestion=Add a profile to the "provisioningProfiles" dictionary in your Export Options property list.}

error: exportArchive: "MYCOOLAPPExtension.appex" requires a provisioning profile with the App Groups feature.
Error Domain=IDEProvisioningErrorDomain Code=9 ""MYCOOLAPPExtension.appex" requires a provisioning profile with the App Groups feature." UserInfo={NSLocalizedDescription="MYCOOLAPPExtension.appex" requires a provisioning profile with the App Groups feature., NSLocalizedRecoverySuggestion=Add a profile to the "provisioningProfiles" dictionary in your Export Options property list.}

I've tried to add a custom ExportOptions.plist by using the xcodebuild launch argument -exportOptionsPlist which gives the following errors:


xcodebuild: error: The flag -exportArchive is requred when specifying -exportOptionsPlist
xcodebuild: error: The flag -archivePath is required when specifying -exportArchive.


When I adding the flags -ExportArchive and specifying a path with -archivePath it gives the following error:


xcodebuild: error: The flag -scheme cannot be specified along with -exportArchive.


As far as I know, there is no way to remove this flag from xcodebuild call that xcode server makes?


Any assistance would be greatly appreciated.