Timeouts on xcodebuild with XCode 11.4 image

On our Travis instance, we’re running an xcodebuild of our React Native app in order to do E2E testing. This xcodebuild output is piped through xcpretty in order to get output logs that Travis likes. However, the build process occasionally times out after the Running script 'Bundle React Native code and images' step with the following error:

No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received

This happens for 7 / 10 Travis runs and was suddenly introduced yesterday evening (14th of May). When I run the script in an SSH-session on a debug machine, it worked, but just took a long time to bundle the React Native resources.

My setup includes:

  • XCode 11.4 Travis image
  • Cocoapods 1.9.1
  • Node 12.6.3
  • React Native 0.62

This is my .travis.yml:

language: objective-c
osx_image: xcode11.4
podfile: ios/Podfile
  depth: false
  bundler: true
  cocoapods: true
    taps: wix/brew
      - yarn
      - applesimutils
      - hub
    - master
    - staging
  - gem install xcpretty
  - gem install xcpretty-travis-formatter
  - nvm install
  - nvm use
  - yarn
  - node --version
  - yarn run env:staging
  - export NODE_OPTIONS="--max-old-space-size=4096"
    - stage: test
      if: type = pull_request
        - yarn e2e:ios:build | xcpretty -f `xcpretty-travis-formatter`
        - yarn percy

It hangs at the yarn e2e:ios:build step, which executes the following command:

xcodebuild -workspace ios/ourproject.xcworkspace -scheme detox -configuration Release -sdk iphonesimulator -derivedDataPath ios/build

(the custom detox scheme is to be able to do E2E testing and basically optimizes the build process in XCode a bit for this purpose).

Any help would be greatly appreciated. If my input is not sufficient, please let me know.