iOS Archive fails with "Export failed, error: signal: segmentation fault"

xcode
ios
#1

I am using the Xcode 9.0.x stack to build my project and it builds fine but fails when exporting the IPA:

 [04:03:04] set -o pipefail && xcodebuild "-exportArchive" "-archivePath" "/var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/__archive__667198746/Example.xcarchive" "-exportPath" "/var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/__export__804318044" "-exportOptionsPlist" "/Users/vagrant/deploy/export_options.plist" | xcpretty
If you can't find the reason of the error in the log, please check the raw-xcodebuild-output.log
The log file is stored in $BITRISE_DEPLOY_DIR, and its full path
is available in the $BITRISE_XCODE_RAW_RESULT_TEXT_PATH environment variable
IDEDistribution.critical.log:
Also please check the xcdistributionlogs
The logs directory is stored in $BITRISE_DEPLOY_DIR, and its full path
is available in the $BITRISE_IDEDISTRIBUTION_LOGS_PATH environment variable
Export failed, error: signal: segmentation fault

The logs don’t really help and show no error. Locally everything works fine.

1 Like

#2

Ok, locally I use Xcode 9 GM, whereas the Xcode 9 stack uses a beta.

0 Likes

#3

Hi @mbuchetics,

Xcode 9 GM just went out into production (Xcode 9.0 GM is now available!) - can you please try it with that and let us know how it goes?

0 Likes

#4

Also, for accessing the full/raw xcodebuild log referenced in the log section you shared here, you can find the related guide at: Xcode exit code 65 / exit code 66 / raw-xcodebuild-output.log

1 Like

#5

Hi, @viktorbenei the issue still persists in Xcode 9 GM and can also be reproduced locally. The problem is “compile bitcode = YES”, which causes Xcode 9 to crash when exporting an adhoc or enterprise build even when using the GUI. The issue is described in more detail here: https://github.com/fastlane/fastlane/issues/10133
Disabling compile bitcode in the export archive step fixed the problem for me.

0 Likes

#6

Good catch, thanks @mbuchetics! I also shared a related issue with the same fix (compile bitcode = NO):

0 Likes

#7

What about compiling with Xcode 9 for the Appstore ? What’s the solution here?

0 Likes

#8

@SkyFred27 this Xcode issue does not affect App Store exports, see:

AppStore exports are not affected :slight_smile:

0 Likes

#9

Oh yes sorry :flushed:

0 Likes

#10

No problem at all :wink:

0 Likes