Xcode: Failing to export to TestFlight from command line

After updating our build server to Sonoma 14.1.1 / Xcode 15.0.1, we have been unable to push builds to the App Store / TestFlight via our Jenkins processes that worked fine prior to the update.

Here are the command and logs for the most recent failure:

xcodebuild -allowProvisioningUpdates -authenticationKeyPath **** -authenticationKeyID **** -authenticationKeyIssuerID **** -exportArchive -archivePath /Users/michael/.jenkins/workspace/fang-develop/NativeBuild/app.xcarchive -exportOptionsPlist appInfoExportOptions.plist -exportPath /Users/michael/.jenkins/workspace/fang-develop/NativeBuild

2023-11-30 17:46:36.511 xcodebuild[22730:1230158] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path "/var/folders/8n/fl18cv195kq4g8mm5qmv2qvc0000gp/T/Unity-iPhone_2023-11-30_17-46-36.510.xcdistributionlogs".

error: exportArchive: The operation couldn’t be completed. (IDEFoundation.DistributionCredentialedProviderLocatorError error 1.)

IDEFoundation.DistributionCredentialedProviderLocatorError.providerRequestFailed(Unexpected nil property at path: 'Actor/relationships/providerId')

** EXPORT FAILED **

The appInfoExportOptions.plist is quite bare:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>destination</key>
	<string>upload</string>
	<key>method</key>
	<string>app-store</string>
</dict>
</plist>

A few notes about this:

  • The issue has been reproduced on a Intel Mac Mini running macOS 14.1.1 / Xcode 15.0.1
  • A manual archive and distribute action in Xcode on the build system have been successful (but untenable as a solution) to successfully push up the builds.
  • This failure occurs with using the -authentication___ flags as well as attempting to have Xcode auto-select the proper account. (We have several accounts signed into Xcode on the build server, a few of which have access to several Apple Development Teams.)

I haven't been unable to find anything remotely related to this issue online; except this post from a year ago.

I preemptively filed a feedback about this one: FB13425804

Any help/ideas would be greatly appreciated!

I have been testing variations of our setup for the past couple of days, and have a little more information to report back -- in some way, this seems to be account specific. We have several accounts added in Xcode on the build server. Some have access to one developer account, some have access to many.

We finally managed to get a few builds to succeed:

  • (App A) One build succeeds by using an account that is logged in on Xcode.
  • (App B) One build succeeds ONLY if the -authenticationKeyPath (and related args) are supplied, and no accounts with access that project exist in Xcode. (Said another way: the same command will begin failing when I add any account with access to the app we're uploading, and begin succeeding the moment those accounts are removed from the preference pane.)

A few thoughts:

  • The Developer Team that fails for the "App B" example above is fully paid for, and has all outstanding agreements signed.
  • This machine was upgraded from macOS 13 -> 14, and also upgraded from Xcode 14 -> 15.

I'll be looking into seeing what is necessary to "factory reset" Xcode in an attempt that some latent data from the Xcode update is causing the issue.

Xcode: Failing to export to TestFlight from command line
 
 
Q