Monday 9 September 2019

React Native migration - Fastlane build fail for iOS "Archive failed" only on CircleCI

Working on migrating a mobile app from React Native 0.59.0 to 0.60.5 and to support Android X. The updated app works fine on both iOS and Android and the CircleCI build for Android is working fine.

The CircleCI build for iOS using Fastlane fails on CircleCI during the archive. Has anyone else seen and solved this before?

When running bundle exec fastlane ios build_release locally it works fine.

Environment (on CircleCI):
Xcode version: 10.2.1
Fastlane version: 2.130.0
Gym SDK: iphoneos12.2

+----------------------------------------------------+--------------------------------------------------------------+
|                                              Summary for gym 2.130.0                                              |
+----------------------------------------------------+--------------------------------------------------------------+
| scheme                                             | MyApp                                                        |
| export_method                                      | app-store                                                    |
| export_options.provisioningProfiles.com.myapp.app  | match AppStore com.myapp.app                                 |
| workspace                                          | ./MyApp.xcworkspace                                          |
| destination                                        | generic/platform=iOS                                         |
| output_name                                        | MyApp                                                        |
| build_path                                         | /Users/distiller/Library/Developer/Xcode/Archives/2019-09-06 |
| clean                                              | false                                                        |
| output_directory                                   | .                                                            |
| silent                                             | false                                                        |
| skip_package_ipa                                   | false                                                        |
| result_bundle                                      | false                                                        |
| buildlog_path                                      | ~/Library/Logs/gym                                           |
| skip_profile_detection                             | false                                                        |
| xcode_path                                         | /Applications/Xcode-10.2.1.app                               |
+----------------------------------------------------+--------------------------------------------------------------+

Output:
▸ Touching MyApp.app
▸ Signing /Users/distiller/Library/Developer/Xcode/DerivedData/MyApp-crgfinutbidjbqcbnlrwjwautwhq/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/MyApp.app
▸ Touching MyApp.app.dSYM
** ARCHIVE FAILED **
[06:24:02]: Exit status: 65
[06:24:02]: 
[06:24:02]: Maybe the error shown is caused by using the wrong version of Xcode
[06:24:02]: Found multiple versions of Xcode in '/Applications/'
[06:24:02]: Make sure you selected the right version for your project
[06:24:02]: This build process was executed using '/Applications/Xcode-10.2.1.app'
[06:24:02]: If you want to update your Xcode path, either
[06:24:02]: 
[06:24:02]: - Specify the Xcode version in your Fastfile
[06:24:02]: ▸ xcversion(version: "8.1") # Selects Xcode 8.1.0
[06:24:02]: 
[06:24:02]: - Specify an absolute path to your Xcode installation in your Fastfile
[06:24:02]: ▸ xcode_select "/Applications/Xcode8.app"
[06:24:02]: 
[06:24:02]: - Manually update the path using
[06:24:02]: ▸ sudo xcode-select -s /Applications/Xcode.app
[06:24:02]: 

+---------------+--------------------------------+
|               Build environment                |
+---------------+--------------------------------+
| xcode_path    | /Applications/Xcode-10.2.1.app |
| gym_version   | 2.130.0                        |
| export_method | app-store                      |
| sdk           | iPhoneOS12.2.sdk               |
+---------------+--------------------------------+

[06:24:02]: ▸ Touch /Users/distiller/Library/Developer/Xcode/DerivedData/MyApp-crgfinutbidjbqcbnlrwjwautwhq/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/BuildProductsPath/Release-iphoneos/MyApp.app.dSYM
[06:24:02]: ▸     cd /Users/distiller/mobile-app/ios
[06:24:02]: ▸     export PATH="/Applications/Xcode-10.2.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode-10.2.1.app/Contents/Developer/usr/bin:/Users/distiller/.gem/ruby/2.4.6/bin:/Users/distiller/.rubies/ruby-2.4.6/lib/ruby/gems/2.4.0/bin:/Users/distiller/.rubies/ruby-2.4.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
[06:24:02]: ▸     /usr/bin/touch -c /Users/distiller/Library/Developer/Xcode/DerivedData/MyApp-crgfinutbidjbqcbnlrwjwautwhq/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/BuildProductsPath/Release-iphoneos/MyApp.app.dSYM



from React Native migration - Fastlane build fail for iOS "Archive failed" only on CircleCI

No comments:

Post a Comment