Xcode Server 11 Export Archive Fails

The 11.x series of Xcode seems to have broken Xcode Server. Every bot that is configured to output an archive at the end of processing now fails.


The raw output log looks like the following:


    /usr/bin/codesign --force --sign - --entitlements /Users/xcodeserver/Library/Caches/XCSBuilder/Bots/00e9c33f477939d77900feeab0004e34/DerivedData/Build/Intermediates.noindex/ArchiveIntermediates/Pocket\ Bot/IntermediateBuildFilesPath/Pocket\ Bot.build/Release-iphonesimulator/Pocket\ Bot.build/Pocket\ Bot.app.xcent /Users/xcodeserver/Library/Caches/XCSBuilder/Bots/00e9c33f477939d77900feeab0004e34/DerivedData/Build/Intermediates.noindex/ArchiveIntermediates/Pocket\ Bot/InstallationBuildProductsLocation/Applications/Pocket\ Bot.app


RegisterExecutionPolicyException /Users/xcodeserver/Library/Caches/XCSBuilder/Bots/00e9c33f477939d77900feeab0004e34/DerivedData/Build/Intermediates.noindex/ArchiveIntermediates/Pocket\ Bot/InstallationBuildProductsLocation/Applications/Pocket\ Bot.app (in target 'Pocket Bot' from project 'Pocket Bot')
    cd /Users/xcodeserver/Library/Caches/XCSBuilder/Bots/00e9c33f477939d77900feeab0004e34/Source/PocketBot
    builtin-RegisterExecutionPolicyException /Users/xcodeserver/Library/Caches/XCSBuilder/Bots/00e9c33f477939d77900feeab0004e34/DerivedData/Build/Intermediates.noindex/ArchiveIntermediates/Pocket\ Bot/InstallationBuildProductsLocation/Applications/Pocket\ Bot.app


Touch /Users/xcodeserver/Library/Caches/XCSBuilder/Bots/00e9c33f477939d77900feeab0004e34/DerivedData/Build/Intermediates.noindex/ArchiveIntermediates/Pocket\ Bot/InstallationBuildProductsLocation/Applications/Pocket\ Bot.app (in target 'Pocket Bot' from project 'Pocket Bot')
    cd /Users/xcodeserver/Library/Caches/XCSBuilder/Bots/00e9c33f477939d77900feeab0004e34/Source/PocketBot
    /usr/bin/touch -c /Users/xcodeserver/Library/Caches/XCSBuilder/Bots/00e9c33f477939d77900feeab0004e34/DerivedData/Build/Intermediates.noindex/ArchiveIntermediates/Pocket\ Bot/InstallationBuildProductsLocation/Applications/Pocket\ Bot.app
** ARCHIVE SUCCEEDED **




$ /usr/bin/xcrun xcodebuild -exportArchive -archivePath /Users/xcodeserver/Library/Caches/XCSBuilder/Integration-00e9c33f477939d77900feeab000a7a2/Pocket Bot.xcarchive -exportPath /Users/xcodeserver/Library/Caches/XCSBuilder/Integration-00e9c33f477939d77900feeab000a7a2/ExportedProduct -exportOptionsPlist /Users/xcodeserver/Library/Caches/XCSBuilder/Integration-00e9c33f477939d77900feeab000a7a2/ExportOptions.plist -IDEPostProgressNotifications=YES -DVTAllowServerCertificates=YES -DVTProvisioningUseServerAccounts=YES -allowProvisioningUpdates


2019-12-23 08:02:56.486 xcodebuild[42941:4409262] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/zp/h393vgwn2798zhzdv9kz0hrw0000gq/T/Pocket Bot_2019-12-23_08-02-56.486.xcdistributionlogs'.
2019-12-23 08:02:56.507 xcodebuild[42941:4409262] [MT] IDEDistributionMethodManager: -[IDEDistributionMethodManager orderedDistributionMethodsForTask:archive:]: Error = Error Domain=IDEDistributionMethodManagerErrorDomain Code=2 "Unknown Distribution Error" UserInfo={NSLocalizedDescription=Unknown Distribution Error}
2019-12-23 08:02:56.507 xcodebuild[42941:4409262] [MT] IDEDistributionMethodManager: -[IDEDistributionMethodManager orderedDistributionMethodsForTask:archive:]: Error = Error Domain=IDEDistributionMethodManagerErrorDomain Code=2 "Unknown Distribution Error" UserInfo={NSLocalizedDescription=Unknown Distribution Error}
error: exportArchive: Found no compatible export methods for: <DVTFilePath:0x7ff5996eb5f0:'/Users/xcodeserver/Library/Caches/XCSBuilder/Integration-00e9c33f477939d77900feeab000a7a2/Pocket Bot.xcarchive'>


Error Domain=IDEFoundationErrorDomain Code=1 "Found no compatible export methods for: <DVTFilePath:0x7ff5996eb5f0:'/Users/xcodeserver/Library/Caches/XCSBuilder/Integration-00e9c33f477939d77900feeab000a7a2/Pocket Bot.xcarchive'>" UserInfo={NSLocalizedDescription=Found no compatible export methods for: <DVTFilePath:0x7ff5996eb5f0:'/Users/xcodeserver/Library/Caches/XCSBuilder/Integration-00e9c33f477939d77900feeab000a7a2/Pocket Bot.xcarchive'>}


** EXPORT FAILED **


This bot worked before the update to Xcode 11, and now does not. I've even created a new bot, on an entirely different server, and it has the same outcome.


An examination of the path '/Users/xcodeserver/Library/Caches/XCSBuilder' reveals there are no integrations assets at that level, but there are 'Bot' folders. I'm wondering if the export path is missing the 'Bots/{UUID}' component.

Anyone have any suggestions or possible fixes?

Having the same issue

is there any solution for this?i'm also facing the same issue

Hi all, would it be possible for you to submit feedback using Feedback Assistant (feedbackassistant.apple.com)? Please include the xcdistributionlogs ("xcodebuild.xcdistributionlogs.zip" included in the build) and an xcsdiagnose (sudo xcrun xcsdiagnose), then please post the FB number here in the forums so we can investigate for you.
Here's the FB number FB7505463. If you need additional info, I'll be happy to help!
This continues to be an issue on Xcode 12.1. I've reset my Xcode Server using sudo xcrun xcscontrol --reset and setup a new bot. Still receiving the same 'export archive' errors noted above.

I've attached another diagnostics file to FB7505463.
Xcode 12.3, same results: FB8965234
All iOS & tvOS Integrations do not produce installable product and present the export archive failure.
We had the exportArchive issue in Xcode Server (XCS) with a Xcode Project that has two schemes: iOS & tvOS. The iOS project was archiving fine from XCS, but the tvOS was not. We were certain that the signing credentials were properly set in Xcode Accounts.

I'm not sure if this is the exact configuration others have, but hopefully these notes may help you.



We were receiving the same error "exportArchive: Found no compatible export methods" while archiving a tvOS target in XCS.


Build Service Error: exportArchive: Found no compatible export methods for: <DVTFilePath:0x7fd42ffa1ae0:'/path/to/XCSBuilder/Integration-cfc0379b9feddb8619595042d58/tvOS.xcarchive'>



iOS archiving worked as expected and was located in the same Xcode Project. The only we to get the archiving to work for the tvOS scheme was to do the following:
  • edit the Xcode Server Bot (XCS) for that tvOS scheme that wasn't archiving properly

  • verify that Devices for the tvOS bot was only set to build for tvOS Devices only.

    • The other options in the XCS Bot editor were to build with a tvOS Simulator or not. Once we turned off Simulator builds, archiving started working.

  • Server API v19

  • Xcode 12.4 (12D4e), macOS 11.2.3 (20D91)

We have a bunch of notes & examples on how to optimize XCS for your build process: https://github.com/roblabs/xcode-continuous-integration


Xcode Server 11 Export Archive Fails
 
 
Q