React Native iOS Xcode archive issue

I’m experiencing an issue with my teams React-Native iOS app that is built and bundled using Bitrise as the CI/CD pipeline.

Environment:

Xcode 10.2.x, on macOS 10.14 (Mojave).

Which build Step causes the issue and which version of the step?

xcode-archive@2.6.0

Reproducibility

  • _Does a “Rebuild” help? Not sure, haven’t rebuilt yet.
  • _Does a rebuild without caches help? Not sure, haven’t cleared cache.
  • Does the issue happen sporadically, or every time? : Seems sporadic
  • Does upgrading the build Step to the latest version help? : No, we need Xcode 10.2.x.
  • When did the issue start? : 2019.10.16 @ 11:25

Local reproduction

Unable to reproduce locally.

Build log

▸ Compiling RCTTouchHandler.m

▸ Compiling RCTTouchEvent.m

▸ Compiling RCTTiming.m

:x: fatal error: error in backend: Unexpected end of file

:x: clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)

▸ Compiling RCTSwitchManager.m

▸ Compiling RCTSwitch.m

▸ Compiling RCTSurfaceView.mm

▸ Compiling RCTSurfaceStage.m

▸ Compiling RCTSurfaceSizeMeasureMode.mm

▸ Compiling RCTSurfaceRootView.mm

Last lines of the Xcode’s build log:

cd /Users/vagrant/git/node_modules/react-native/React

export LANG=en_US.US-ASCII

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c++ -arch armv7 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c++14 -stdlib=libc++ -fobjc-arc -fmodules -fmodules-cache-path=/Users/vagrant/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/vagrant/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -Os -fno-common -Wno-missing-field-initializers -Wmissing-prototypes -Werror=return-type -Wunreachable-code -Wno-implicit-atomic-properties -Werror=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wduplicate-method-match -Wmissing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wshadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wnewline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -Wno-c++11-extensions -DRCT_METRO_PORT= -DNS_BLOCK_ASSERTIONS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -Winvalid-offsetof -miphoneos-version-min=9.0 -g -Wno-sign-conversion -Winfinite-recursion -Wmove -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wrange-loop-analysis -Wno-semicolon-before-method-body -fembed-bitcode -iquote /Users/vagrant/Library/Developer/Xcode/DerivedData/elovee-evpahafzvtvanoblltfmhdqyslgc/Build/Intermediates.noindex/ArchiveIntermediates/elovee/IntermediateBuildFilesPath/React.build/Release-iphoneos/React.build/React-generated-files.hmap -I/Users/vagrant/Library/Developer/Xcode/DerivedData/elovee-evpahafzvtvanoblltfmhdqyslgc/Build/Intermediates.noindex/ArchiveIntermediates/elovee/IntermediateBuildFilesPath/React.build/Release-iphoneos/React.build/React-own-target-headers.hmap -I/Users/vagrant/Library/Developer/Xcode/DerivedData/elovee-evpahafzvtvanoblltfmhdqyslgc/Build/Intermediates.noindex/ArchiveIntermediates/elovee/IntermediateBuildFilesPath/React.build/Release-iphoneos/React.build/React-all-target-headers.hmap -iquote /Users/vagrant/Library/Developer/Xcode/DerivedData/elovee-evpahafzvtvanoblltfmhdqyslgc/Build/Intermediates.noindex/ArchiveIntermediates/elovee/IntermediateBuildFilesPath/React.build/Release-iphoneos/React.build/React-project-headers.hmap -I/Users/vagrant/Library/Developer/Xcode/DerivedData/elovee-evpahafzvtvanoblltfmhdqyslgc/Build/Intermediates.noindex/ArchiveIntermediates/elovee/BuildProductsPath/Release-iphoneos/include -I/Users/vagrant/git/node_modules/react-native/third-party/boost_1_63_0 -I/Users/vagrant/git/node_modules/react-native/third-party/folly-2018.10.22.00 -I/Users/vagrant/git/node_modules/react-native/third-party/glog-0.3.5/src -I/Users/vagrant/Library/Developer/Xcode/DerivedData/elovee-evpahafzvtvanoblltfmhdqyslgc/Build/Intermediates.noindex/ArchiveIntermediates/elovee/IntermediateBuildFilesPath/React.build/Release-iphoneos/React.build/DerivedSources-normal/armv7 -I/Users/vagrant/Library/Developer/Xcode/DerivedData/elovee-evpahafzvtvanoblltfmhdqyslgc/Build/Intermediates.noindex/ArchiveIntermediates/elovee/IntermediateBuildFilesPath/React.build/Release-iphoneos/React.build/DerivedSources/armv7 -I/Users/vagrant/Library/Developer/Xcode/DerivedData/elovee-evpahafzvtvanoblltfmhdqyslgc/Build/Intermediates.noindex/ArchiveIntermediates/elovee/IntermediateBuildFilesPath/React.build/Release-iphoneos/React.build/DerivedSources -Wextra -Wall -Wno-semicolon-before-method-body -F/Users/vagrant/Library/Developer/Xcode/DerivedData/elovee-evpahafzvtvanoblltfmhdqyslgc/Build/Intermediates.noindex/ArchiveIntermediates/elovee/BuildProductsPath/Release-iphoneos -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -MMD -MT dependencies -MF /Users/vagrant/Library/Developer/Xcode/DerivedData/elovee-evpahafzvtvanoblltfmhdqyslgc/Build/Intermediates.noindex/ArchiveIntermediates/elovee/IntermediateBuildFilesPath/React.build/Release-iphoneos/React.build/Objects-normal/armv7/RCTSurfaceRootView.d --serialize-diagnostics /Users/vagrant/Library/Developer/Xcode/DerivedData/elovee-evpahafzvtvanoblltfmhdqyslgc/Build/Intermediates.noindex/ArchiveIntermediates/elovee/IntermediateBuildFilesPath/React.build/Release-iphoneos/React.build/Objects-normal/armv7/RCTSurfaceRootView.dia -c /Users/vagrant/git/node_modules/react-native/React/Base/Surface/RCTSurfaceRootView.mm -o /Users/vagrant/Library/Developer/Xcode/DerivedData/elovee-evpahafzvtvanoblltfmhdqyslgc/Build/Intermediates.noindex/ArchiveIntermediates/elovee/IntermediateBuildFilesPath/React.build/Release-iphoneos/React.build/Objects-normal/armv7/RCTSurfaceRootView.o

** ARCHIVE FAILED **

The following build commands failed:

CompileC /Users/vagrant/Library/Developer/Xcode/DerivedData/elovee-evpahafzvtvanoblltfmhdqyslgc/Build/Intermediates.noindex/ArchiveIntermediates/elovee/IntermediateBuildFilesPath/React.build/Release-iphoneos/React.build/Objects-normal/armv7/RCTTiming.o /Users/vagrant/git/node_modules/react-native/React/Modules/RCTTiming.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler

(1 failure)

You can find the last couple of lines of Xcode’s build log above, but the full log is also available in 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

(value: /Users/vagrant/deploy/raw-xcodebuild-output.log)

Archive failed, error: exit status 65

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.