Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS xcodebuild -exportArchive is broken #22306

Closed
espresso3389 opened this issue Sep 26, 2018 · 19 comments

Comments

@espresso3389
Copy link

commented Sep 26, 2018

When I export archive using xcodebuild -exportArchive command, it fails with the following error:

error: exportArchive: Symbols tool failed

It seems that eda2284 breaks something on toolchain.

@zoechi

This comment has been minimized.

Copy link
Contributor

commented Sep 26, 2018

Please add the output of flutter doctor -v.

@espresso3389

This comment has been minimized.

Copy link
Author

commented Sep 26, 2018

It does not work with eda2284:

[✓] Flutter (Channel unknown, v0.9.4-pre.30, on Mac OS X 10.14 18A391, locale ja-JP)
    • Flutter version 0.9.4-pre.30 at /Users/kawasaki/flutter
    • Framework revision eda228404c (12 hours ago), 2018-09-26 00:57:39 +0200
    • Engine revision 38a646e14c
    • Dart version 2.1.0-dev.5.0.flutter-4cf2d3990b

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.1)
    • Android SDK at /Users/kawasaki/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.0, Build version 10A255
    • ios-deploy 2.0.0
    • CocoaPods version 1.5.3
@calvinmuller

This comment has been minimized.

Copy link

commented Sep 26, 2018

same issue

@calvinmuller

This comment has been minimized.

Copy link

commented Sep 28, 2018

fastlane output

[15:20:50]: $ /usr/bin/xcrun /usr/local/lib/ruby/gems/2.3.0/gems/fastlane-2.105.2/gym/lib/assets/wrap_xcodebuild/xcbuild-safe.sh -exportArchive -exportOptionsPlist '/var/folders/yy/mprq7n7j1b52x2h257mm5v540000gn/T/gym_config20180928-29812-121zbf7.plist' -archivePath /Users/calvinmuller/Library/Developer/Xcode/Archives/2018-09-28/Runner\ 2018-09-28\ 15.20.29.xcarchive -exportPath '/var/folders/yy/mprq7n7j1b52x2h257mm5v540000gn/T/gym_output20180928-29812-vcspiv' 
+ xcodebuild -exportArchive -exportOptionsPlist /var/folders/yy/mprq7n7j1b52x2h257mm5v540000gn/T/gym_config20180928-29812-121zbf7.plist -archivePath '/Users/calvinmuller/Library/Developer/Xcode/Archives/2018-09-28/Runner 2018-09-28 15.20.29.xcarchive' -exportPath /var/folders/yy/mprq7n7j1b52x2h257mm5v540000gn/T/gym_output20180928-29812-vcspiv
2018-09-28 15:20:51.383 xcodebuild[30626:2782187] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/yy/mprq7n7j1b52x2h257mm5v540000gn/T/Runner_2018-09-28_15-20-51.381.xcdistributionlogs'.
error: exportArchive: Symbols tool failed

Error Domain=IDEFoundationErrorDomain Code=1 "Symbols tool failed" UserInfo={NSLocalizedDescription=Symbols tool failed}

** EXPORT FAILED **
[15:20:53]: Exit status: 70
@Eimji

This comment has been minimized.

Copy link

commented Sep 30, 2018

same issue for me

flutter doctor -v

[✓] Flutter (Channel dev, v0.9.5, on Mac OS X 10.13.6 17G65, locale fr-FR)
    • Flutter version 0.9.5 at /Users/aurick/DATA/Programmation/Frameworks/flutter
    • Framework revision 020fd590b0 (4 days ago), 2018-09-26 14:28:26 -0700
    • Engine revision 38a646e14c
    • Dart version 2.1.0-dev.5.0.flutter-4cf2d3990b

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.2)
    • Android SDK at /Users/aurick/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.0, Build version 10A255
    • ios-deploy 2.0.0
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 28.0.2
    • Dart plugin version 181.5616
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)



• No issues found!
@espresso3389

This comment has been minimized.

Copy link
Author

commented Sep 30, 2018

Anyway, I want to share a very easy workaround for the issue. Use commit f330e27 (just before the commit eda2284):

git checkout f330e27db
@KevinTheGray

This comment has been minimized.

Copy link

commented Oct 3, 2018

I'm seeing this issue too when I try to upload an archive from XCode

Using commit f330e27 as espresso3389 suggested does fix it.

Another workaround is to uncheck the bottom box when archiving:
screen shot 2018-10-03 at 11 41 40 am

But this prevents me from receiving symbolicated reports from apple, so not the best option.

My current flutter doctor:

[✓] Flutter (Channel master, v0.9.6-pre.56, on Mac OS X 10.13.6 17G65, locale en-US)
    • Flutter version 0.9.6-pre.56 at /Users/KG/Developer/Flutter/flutter
    • Framework revision 9eca083006 (17 hours ago), 2018-10-02 16:15:04 -0700
    • Engine revision f6af1f20ba
    • Dart version 2.1.0-dev.6.0.flutter-8a919426f0

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at /Users/KG/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 27.0.3
    • ANDROID_HOME = /Users/KG/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.0, Build version 10A255
    • ios-deploy 1.9.2
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 28.0.1
    • Dart plugin version 173.4700
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] IntelliJ IDEA Community Edition (version 2017.2.7)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 21.2.2
    • Dart plugin version 172.4343.25

[!] VS Code (version 1.21.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
@bjon

This comment has been minimized.

Copy link

commented Oct 3, 2018

If you're building with xcodebuild using a ExportOptions.plist just add:

<key>uploadSymbols</key>
<false/>

Workaround for 0.9.5

@xster

This comment has been minimized.

Copy link
Contributor

commented Oct 4, 2018

cc @goderbauer in case we need to update the default create template or https://flutter.io/ios-release/

@goderbauer

This comment has been minimized.

Copy link
Member

commented Oct 4, 2018

This should be fixed on master if you update past bfa9822. Let me know if it doesn't work there for you.

@calvinmuller

This comment has been minimized.

Copy link

commented Oct 5, 2018

fixed for me, fastlane building with no issues again. Thanks!

@goderbauer

This comment has been minimized.

Copy link
Member

commented Oct 5, 2018

Thanks for reporting back. I'll close the issue then. Feel free to re-open or open a new one if there are still issues.

@goderbauer goderbauer closed this Oct 5, 2018

@espresso3389

This comment has been minimized.

Copy link
Author

commented Oct 5, 2018

I confirmed it works now!

@willvlad

This comment has been minimized.

Copy link

commented Jul 21, 2019

I am getting a similar error when doing CI of a flutter app via Codemagic:

Unable to export archive: 2019-07-21 09:53:16.146 xcodebuild[20442:65783] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/r7/d9twdq011sb8d3q1p8f39cdr0000gn/T/Runner_2019-07-21_09-53-16.141.xcdistributionlogs'. error: exportArchive: Symbols tool failed Error Domain=IDEFoundationErrorDomain Code=1 "Symbols tool failed" UserInfo={NSLocalizedDescription=Symbols tool failed} ** EXPORT FAILED *

Any idea how to fix it?

@dileepvarmau

This comment has been minimized.

Copy link

commented Jul 22, 2019

I am also getting a similar issue when doing CI via Codemagic or Fastlane with Flutter master branch for iOS builds.

Issue is
Unable to export archive: 2019-07-19 06:35:19.256 xcodebuild[3381:21183] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/r7/d9twdq011sb8d3q1p8f39cdr0000gn/T/Runner_2019-07-19_06-35-19.252.xcdistributionlogs'. error: exportArchive: Symbols tool failed Error Domain=IDEFoundationErrorDomain Code=1 "Symbols tool failed" UserInfo={NSLocalizedDescription=Symbols tool failed} ** EXPORT FAILED **

This issue is not happening with Flutter stable branch.

@jaysephjw

This comment has been minimized.

Copy link

commented Jul 24, 2019

Also seeing this issue from master today

[✓] Flutter (Channel master, v1.8.2-pre.172, on Mac OS X 10.13.6 17G65, locale en-US)
    • Flutter version 1.8.2-pre.172 at /Users/jay/tools/flutter
    • Framework revision 4de9b4461b (49 minutes ago), 2019-07-24 10:58:37 -0700
    • Engine revision ef99738baf
    • Dart version 2.5.0 (build 2.5.0-dev.1.0 fedd74669a)

Switching to dev fixed it for me: (@willvlad flutter channel dev):

[✓] Flutter (Channel dev, v1.8.2, on Mac OS X 10.13.6 17G65, locale en-US)
    • Flutter version 1.8.2 at /Users/jay/tools/flutter
    • Framework revision 0a39d8d92e (2 weeks ago), 2019-07-10 19:17:14 -0700
    • Engine revision 75387dbc14
    • Dart version 2.5.0 (build 2.5.0-dev.0.0 b5aeaa6796)

Otherwise to avoid the problem (not ideal) don't include app symbols when you upload (uncheck this if using xcode archiver):

Screen Shot 2019-07-24 at 11 40 37 AM

@willvlad

This comment has been minimized.

Copy link

commented Jul 24, 2019

The tool is still quite flaky. I switched it to stable on the last build and it managed to build it after 3-4 failed attempts. But then I tried it again on stable today and it's been two failures so far. The error was very descriptive: "Something went wrong"

@ammaratef45

This comment has been minimized.

Copy link

commented Jul 30, 2019

The error happened to me again, why the issue is closed?

@calvinmuller

This comment has been minimized.

Copy link

commented Jul 30, 2019

Same with me

Build failed :|
Unable to export archive:
2019-07-30 07:50:30.674 xcodebuild[4137:23872] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/r7/d9twdq011sb8d3q1p8f39cdr0000gn/T/Runner_2019-07-30_07-50-30.673.xcdistributionlogs'.
error: exportArchive: Symbols tool failed

Error Domain=IDEFoundationErrorDomain Code=1 "Symbols tool failed" UserInfo={NSLocalizedDescription=Symbols tool failed}

** EXPORT FAILED **
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.