fastlane: Build fails with IDEDistributionErrorDomain Code=1

Original issue by @drpancake - Imported from fastlane/gym#100

Hello,

Google isn’t turning up anything for this one and I can’t seem to find any definitions for codes in IDEDistributionErrorDomain. I’m seeing the following error when I run gym:

[09:16:52]: Successfully stored the archive. You can find it in the Xcode Organizer.
[09:16:52]: /usr/bin/xcrun xcodebuild -exportArchive -exportOptionsPlist '/tmp/gym_config_1442974612.plist' -archivePath '/Users/james/Library/Developer/Xcode/Archives/2015-09-23/SiphonBase 2015-09-23 09.16.00.xcarchive' -exportPath '/tmp/1442974612'
2015-09-23 09:16:53.275 xcodebuild[7281:1574120] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/x5/_ydv1yb97r17pzpsk4h7vrzm0000gn/T/SiphonBase_2015-09-23_09-16-53.272.xcdistributionlogs'.
2015-09-23 09:16:53.532 xcodebuild[7281:1574120] [MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7ffdcd5246f0>: Error Domain=IDEDistributionErrorDomain Code=1 "The operation couldn’t be completed. (IDEDistributionErrorDomain error 1.)"
error: exportArchive: The operation couldn’t be completed. (IDEDistributionErrorDomain error 1.)

Error Domain=IDEDistributionErrorDomain Code=1 "The operation couldn’t be completed. (IDEDistributionErrorDomain error 1.)"

** EXPORT FAILED **
[09:16:53]: Exit status: 70
/Library/Ruby/Gems/2.0.0/gems/gym-0.7.3/lib/gym/error_handler.rb:88:in `handle_package_error': Error packaging up the application (RuntimeError)
    from /Library/Ruby/Gems/2.0.0/gems/gym-0.7.3/lib/gym/runner.rb:102:in `block in package_app'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane_core-0.17.1/lib/fastlane_core/command_executor.rb:51:in `call'
    from /Library/Ruby/Gems/2.0.0/gems/fastlane_core-0.17.1/lib/fastlane_core/command_executor.rb:51:in `execute'
    from /Library/Ruby/Gems/2.0.0/gems/gym-0.7.3/lib/gym/runner.rb:98:in `package_app'
    from /Library/Ruby/Gems/2.0.0/gems/gym-0.7.3/lib/gym/runner.rb:16:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/gym-0.7.3/lib/gym/manager.rb:8:in `work'
    from /Library/Ruby/Gems/2.0.0/gems/gym-0.7.3/lib/gym/commands_generator.rb:41:in `block (2 levels) in run'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/command.rb:153:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/runner.rb:428:in `run_active_command'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/runner.rb:68:in `run!'
    from /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/delegates.rb:15:in `run!'
    from /Library/Ruby/Gems/2.0.0/gems/gym-0.7.3/lib/gym/commands_generator.rb:58:in `run'
    from /Library/Ruby/Gems/2.0.0/gems/gym-0.7.3/lib/gym/commands_generator.rb:14:in `start'
    from /Library/Ruby/Gems/2.0.0/gems/gym-0.7.3/bin/gym:6:in `<top (required)>'
    from /usr/bin/gym:23:in `load'
    from /usr/bin/gym:23:in `<main>'

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 43 (1 by maintainers)

Most upvoted comments

@TKBurner failure:

$ fastlane build
[21:34:44]: -------------------------------------------------
[21:34:44]: --- Step: Verifying required fastlane version ---
[21:34:44]: -------------------------------------------------
[21:34:44]: fastlane version valid
[21:34:44]: ------------------------------
[21:34:44]: --- Step: default_platform ---
[21:34:44]: ------------------------------
[21:34:44]: Driving the lane 'ios build' 🚀
[21:34:44]: -----------------
[21:34:44]: --- Step: gym ---
[21:34:44]: -----------------
[21:34:44]: xcrun xcodebuild -list -workspace './SSP_ScoreCenter_iOS.xcworkspace'

+----------------------+-----------------------------------+
|                  Summary for gym 1.6.2                   |
+----------------------+-----------------------------------+
| scheme               | SSP_ScoreCenter_iOS               |
| workspace            | ./SSP_ScoreCenter_iOS.xcworkspace |
| destination          | generic/platform=iOS              |
| output_name          | SSP_ScoreCenter_iOS               |
| clean                | false                             |
| output_directory     | .                                 |
| silent               | false                             |
| use_legacy_build_api | false                             |
| buildlog_path        | ~/Library/Logs/gym                |
+----------------------+-----------------------------------+

[21:34:47]: $ set -o pipefail && xcodebuild -workspace './SSP_ScoreCenter_iOS.xcworkspace' -scheme 'SSP_ScoreCenter_iOS' -destination 'generic/platform=iOS' -archivePath '/Users/oat01/Library/Developer/Xcode/Archives/2016-04-11/SSP_ScoreCenter_iOS 2016-04-11 21.34.47.xcarchive' archive | tee /Users/oat01/Library/Logs/gym/SSP_ScoreCenter_iOS-SSP_ScoreCenter_iOS.log | xcpretty
[21:34:48]: ▸ Check Dependencies
[21:34:48]: ▸ Compiling ...
[21:35:05]: ▸ Signing /Users/oat01/Library/Developer/Xcode/DerivedData/SSP_ScoreCenter_iOS-fqlkvjyysodtghbeivcyfaeqeixu/Build/Intermediates/ArchiveIntermediates/SSP_ScoreCenter_iOS/InstallationBuildProductsLocation/Applications/SSP_ScoreCenter_iOS.app
[21:35:06]: ▸ Touching SSP_ScoreCenter_iOS.app.dSYM
[21:35:06]: ▸ Archive Succeeded
[21:35:06]: Successfully stored the archive. You can find it in the Xcode Organizer.
[21:35:06]: $ /usr/bin/xcrun /Users/oat01/.rvm/gems/ruby-2.2.1/gems/gym-1.6.2/lib/assets/wrap_xcodebuild/xcbuild-safe.sh -exportArchive -exportOptionsPlist '/var/folders/fc/_qbh8jv15qdftrq9n1sqyc95sj_xf1/T/gym20160411-56927-1946a3d_config.plist' -archivePath '/Users/oat01/Library/Developer/Xcode/Archives/2016-04-11/SSP_ScoreCenter_iOS 2016-04-11 21.34.47.xcarchive' -exportPath '/var/folders/fc/_qbh8jv15qdftrq9n1sqyc95sj_xf1/T/gym20160411-56927-171mmzp.gym_output' 
RVM detected, forcing to use system ruby
Now using system ruby.
+ xcodebuild -exportArchive -exportOptionsPlist /var/folders/fc/_qbh8jv15qdftrq9n1sqyc95sj_xf1/T/gym20160411-56927-1946a3d_config.plist -archivePath '/Users/oat01/Library/Developer/Xcode/Archives/2016-04-11/SSP_ScoreCenter_iOS 2016-04-11 21.34.47.xcarchive' -exportPath /var/folders/fc/_qbh8jv15qdftrq9n1sqyc95sj_xf1/T/gym20160411-56927-171mmzp.gym_output
2016-04-11 21:35:07.279 xcodebuild[58370:6162632] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/fc/_qbh8jv15qdftrq9n1sqyc95sj_xf1/T/SSP_ScoreCenter_iOS_2016-04-11_21-35-07.278.xcdistributionlogs'.
2016-04-11 21:35:07.297 xcodebuild[58370:6162632] [MT] DeveloperPortal: Using pre-existing current store at URL (file:///Users/oat01/Library/Developer/Xcode/DeveloperPortal%207.3.db).
2016-04-11 21:35:07.717 xcodebuild[58370:6162632] [MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7fba1c037a40>: Error Domain=IDEDistributionErrorDomain Code=1 "(null)"
error: exportArchive: The operation couldn’t be completed. (IDEDistributionErrorDomain error 1.)

Error Domain=IDEDistributionErrorDomain Code=1 "(null)"

** EXPORT FAILED **
[21:35:07]: Exit status: 70
[21:35:07]: Variable Dump:
[21:35:07]: {:DEFAULT_PLATFORM=>:ios, :PLATFORM_NAME=>:ios, :LANE_NAME=>"ios build"}
[21:35:07]: Error packaging up the application

+------+-------------------------------------+-------------+
|                     fastlane summary                     |
+------+-------------------------------------+-------------+
| Step | Action                              | Time (in s) |
+------+-------------------------------------+-------------+
| 1    | Verifying required fastlane version | 0           |
| 2    | default_platform                    | 0           |
| 3    | gym                                 | 23          |
+------+-------------------------------------+-------------+

[21:35:07]: fastlane finished with errors

[!] Error packaging up the application

Success using use_legacy_build_api

$ fastlane build
[21:39:56]: -------------------------------------------------
[21:39:56]: --- Step: Verifying required fastlane version ---
[21:39:56]: -------------------------------------------------
[21:39:56]: fastlane version valid
[21:39:56]: ------------------------------
[21:39:56]: --- Step: default_platform ---
[21:39:56]: ------------------------------
[21:39:56]: Driving the lane 'ios build' 🚀
[21:39:56]: -----------------
[21:39:56]: --- Step: gym ---
[21:39:56]: -----------------
[21:39:56]: Using legacy build system - waiting for radar to be fixed: https://openradar.appspot.com/radar?id=4952000420642816
[21:39:56]: xcrun xcodebuild -list -workspace './SSP_ScoreCenter_iOS.xcworkspace'

+----------------------+-----------------------------------+
|                  Summary for gym 1.6.2                   |
+----------------------+-----------------------------------+
| scheme               | SSP_ScoreCenter_iOS               |
| use_legacy_build_api | true                              |
| workspace            | ./SSP_ScoreCenter_iOS.xcworkspace |
| destination          | generic/platform=iOS              |
| output_name          | SSP_ScoreCenter_iOS               |
| clean                | false                             |
| output_directory     | .                                 |
| silent               | false                             |
| buildlog_path        | ~/Library/Logs/gym                |
+----------------------+-----------------------------------+

[21:39:59]: $ set -o pipefail && xcodebuild -workspace './SSP_ScoreCenter_iOS.xcworkspace' -scheme 'SSP_ScoreCenter_iOS' -destination 'generic/platform=iOS' -archivePath '/Users/oat01/Library/Developer/Xcode/Archives/2016-04-11/SSP_ScoreCenter_iOS 2016-04-11 21.39.59.xcarchive' archive | tee /Users/oat01/Library/Logs/gym/SSP_ScoreCenter_iOS-SSP_ScoreCenter_iOS.log | xcpretty
[21:40:00]: ▸ Compiling...
[21:40:18]: ▸ Signing /Users/oat01/Library/Developer/Xcode/DerivedData/SSP_ScoreCenter_iOS-fqlkvjyysodtghbeivcyfaeqeixu/Build/Intermediates/ArchiveIntermediates/SSP_ScoreCenter_iOS/InstallationBuildProductsLocation/Applications/SSP_ScoreCenter_iOS.app
[21:40:18]: ▸ Touching SSP_ScoreCenter_iOS.app.dSYM
[21:40:18]: ▸ Archive Succeeded
[21:40:19]: Successfully stored the archive. You can find it in the Xcode Organizer.
[21:40:19]: $ /usr/bin/xcrun /tmp/PackageApplication4Gym -v /Users/oat01/Library/Developer/Xcode/Archives/2016-04-11/SSP_ScoreCenter_iOS\ 2016-04-11\ 21.39.59.xcarchive/Products/Applications/SSP_ScoreCenter_iOS.app -o '/Users/oat01/Library/Developer/Xcode/Archives/2016-04-11/SSP_ScoreCenter_iOS.ipa' exportFormat ipa 
[21:40:21]: $ zip --recurse-paths '/Users/oat01/Library/Developer/Xcode/Archives/2016-04-11/SSP_ScoreCenter_iOS.ipa' SwiftSupport > /dev/null
[21:40:22]: Compressing 1 dSYM(s)
[21:40:22]: $ cd '/Users/oat01/Library/Developer/Xcode/Archives/2016-04-11/SSP_ScoreCenter_iOS 2016-04-11 21.39.59.xcarchive/dSYMs' && zip -r '/Users/oat01/Work/iOS/premier_score_centre/SSP_ScoreCenter_iOS.app.dSYM.zip' *.dSYM
[21:40:22]: ▸ updating: SSP_ScoreCenter_iOS.app.dSYM/ (stored 0%)
[21:40:22]: ▸ updating: SSP_ScoreCenter_iOS.app.dSYM/Contents/ (stored 0%)
[21:40:22]: ▸ updating: SSP_ScoreCenter_iOS.app.dSYM/Contents/Info.plist (deflated 51%)
[21:40:22]: ▸ updating: SSP_ScoreCenter_iOS.app.dSYM/Contents/Resources/ (stored 0%)
[21:40:22]: ▸ updating: SSP_ScoreCenter_iOS.app.dSYM/Contents/Resources/DWARF/ (stored 0%)
[21:40:22]: ▸ updating: SSP_ScoreCenter_iOS.app.dSYM/Contents/Resources/DWARF/SSP_ScoreCenter_iOS (deflated 67%)

[21:40:22]: Successfully exported and compressed dSYM file
[21:40:22]: Successfully exported and signed the ipa file:
[21:40:22]: /Users/oat01/Work/iOS/premier_score_centre/SSP_ScoreCenter_iOS.ipa

+------+-------------------------------------+-------------+
|                     fastlane summary                     |
+------+-------------------------------------+-------------+
| Step | Action                              | Time (in s) |
+------+-------------------------------------+-------------+
| 1    | Verifying required fastlane version | 0           |
| 2    | default_platform                    | 0           |
| 3    | gym                                 | 26          |
+------+-------------------------------------+-------------+

[21:40:22]: fastlane.tools finished successfully 🎉

Having the same issue here. I also cannot delete the certificate, but the installed one on my machine is valid until feb. 7, 2023, so this should not be reason for the error. I also had to add use_legacy_build_api: true, that worked

@hjanuschka commented

in my case this was triggerd by an outdated WWDR certificate (expired on 14/02/16), wich invalidated all my distribution certificates.

download the wwdr https://www.apple.com/certificateauthority/ (here: https://developer.apple.com/certificationauthority/AppleWWDRCA.cer)

double-click/install it and the see if your distribution certs are valid again!

@KrauseFx - maybe checking the certs against the wwdr in match would be a cool thing?