-allowProvisioningUpdates doesn't work

We are using Jenkins for Continiuous Integration. Everything we need to do in order to compile our app is done via commandline (bash script), because we have several machines where the build has be done without any human access to the devices.


As you can imagine I was very happy to see the new xcodebuild feature flag -allowProvisioningUpdates in XCode9.


I understand, that I need to add the credentials of our Apple ID into the XCode settings.


The credentials are adde to the XCode account tab in Preferences, but when I try to compile using "xcodebuild ... -allowProvisioningUpdates" the following error message appears:


2017-09-19 09:47:59.692 xcodebuild[74979:3824315]  DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTFrameworks/DVTFrameworks-13231/DVTFoundation/Portal/DVTDeveloperAccountCredentialsManager.m:38
Details:  Unable to find default keychain.
Object:   <DVTDeveloperAccountCredentialsManager>
Method:   +defaultAccountCredentialsManager
Thread:   <NSThread: 0x7fe17860aa40>{number = 4, name = (null)}
Please file a bug at http:/
2017-09-19 09:47:59.792 xcodebuild[74979:3824308] [MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7fe17d45cf20>: Error Domain=IDEDistributionSigningAssetStepErrorDomain Code=0 "Locating signing assets failed." UserInfo={NSLocalizedDescription=Locating signing assets failed., IDEDistributionSigningAssetStepUnderlyingErrors=(
    "Error Domain=DVTServicesSessionErrorDomain Code=0 \"Unable to log in with account '***@yyy.com'.\" UserInfo={NSLocalizedFailureReason=Unable to log in with account '***@yyy.com'., NSLocalizedRecoverySuggestion=The login details for account '***@yyy.com' were rejected., DVTDeveloperAccountErrorAccount=<DVTAppleIDBasedDeveloperAccount 0x7fe179b016c0: username: ***@yyy.com>, NSUnderlyingError=0x7fe179e8ee60 {Error Domain=DVTDeveloperAccountErrorDomain Code=4 \"***@yyy.com could not sign in.\" UserInfo={NSLocalizedRecoverySuggestion=Cannot sign in to this account. Try signing into it again in the Accounts preference pane., NSLocalizedDescription=***@yyy.com could not sign in., DVTDeveloperAccountErrorAccount=<DVTAppleIDBasedDeveloperAccount 0x7fe179b016c0: username: ***@yyy.com>}}}",
    "Error Domain=IDEProfileLocatorErrorDomain Code=1 \"No profiles for 'com.yyy.CITestProject' were found\" UserInfo={NSLocalizedDescription=No profiles for 'com.yyy.CITestProject' were found, NSLocalizedRecoverySuggestion=Xcode couldn't find any iOS App Store provisioning profiles matching 'com.yyy.CITestProject'.}"
)}
error: exportArchive: The operation couldn’t be completed. Unable to log in with account '***@yyy.com'.


Does someone know how to fix this problem?

Replies

I'm having the same issue running xcodebuild from the command line. My account is in Xcode 9 accounts and I can see it's certs, but I cant seem to export the app.

It's possible that xcodebuild isn't in the access list for your account's credentials. Could you try removing the account, adding it again in Xcode 9, and trying again? If the issue still reproduces, please file a bug report using bugreport.apple.com with your configuration details (e.g. Xcode version, macOS version) and steps to reproduce.

Has anyone solved this? (I've reported as a bug to Apple, and they've not responded for weeks.)

We're having the same issue:


2017-10-27 13:07:45.912 xcodebuild[19211:21598767] [MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7fd7253c4590>: Error Domain=IDEDistributionSigningAssetStepErrorDomain Code=0 "Locating signing assets failed." UserInfo={NSLocalizedDescription=Locating signing assets failed., IDEDistributionSigningAssetStepUnderlyingErrors=(
    "Error Domain=DVTServicesSessionErrorDomain Code=0 \"Unable to log in with account '***@***.com'.\" UserInfo={NSLocalizedFailureReason=Unable to log in with account '***@***.com'., NSLocalizedRecoverySuggestion=The login details for account '***@***.com' were rejected., DVTDeveloperAccountErrorAccount=<DVTAppleIDBasedDeveloperAccount 0x7fd725258f40: username: ***@***.com>, NSUnderlyingError=0x7fd72563afd0 {Error Domain=DVTDeveloperAccountErrorDomain Code=4 \"***@***.com could not sign in.\" UserInfo={NSLocalizedRecoverySuggestion=Cannot sign in to this account. Try signing into it again in the Accounts preference pane., NSLocalizedDescription=***@***.com could not sign in., DVTDeveloperAccountErrorAccount=<DVTAppleIDBasedDeveloperAccount 0x7fd725258f40: username: ***@***.com>}}}",
    "Error Domain=IDEProfileLocatorErrorDomain Code=1 \"No profiles for 'com.***.***' were found\" UserInfo={NSLocalizedDescription=No profiles for 'com.***.***' were found, NSLocalizedRecoverySuggestion=Xcode couldn't find any iOS Ad Hoc provisioning profiles matching 'com.***.***'.}"
)}
error: exportArchive: The operation couldn’t be completed. Unable to log in with account '***@***.com'.


Logging out and back in (in the Xcode preferences pane), doesn't help.


Filed as radar://35149755

I am also getting the same error when trying to build our iOS source code via Jenkins:



Check dependencies

Code Signing Error: The operation couldn’t be completed. Unable to log in with account 'xxxxx@gmail.com'. The login details for account 'xxxxx@gmail.com' were rejected.

Code Signing Error: No profiles for '***.***.watchkitextension' were found:  Xcode couldn't find any iOS App Development provisioning profiles matching '***.***.watchkitextension'.

Code Signing Error: Code signing is required for product type 'WatchKit Extension' in SDK 'watchOS 4.0'

** BUILD FAILED **


Like previously mentioned, this happens even after removing and re-adding the account in Xcode preferences.


I also filed a radar: 35317669