iOS app build fails, then is magically fixed on rebuild

ios

#1

I am having the problem that most of the time we attempt to build our iOS app on circleCI it fails the first time (sometimes 2 times), and then is fixed after hitting the “Rebuild” button (not choosing without cache or the other rebuild option). The failed build ends with:

▸ Copying BrowZine\ Tests/crawlspec/simple_crawl_to_pdf.yaml
▸ Copying BrowZine\ Tests/test_my_bookshelf.json
▸ Running script 'Copy Pods Resources'
▸ Running script 'Embed Pods Frameworks'
▸ Touching BrowZine\ Tests.xctest
** TEST FAILED **

export LC_CTYPE="en_US.UTF-8"
export XCTOOL_FORCE_TTY="true"
set -o pipefail && xcodebuild -workspace 'browzine.xcworkspace' -scheme 'BrowZine' clean build test -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6,OS=latest' CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= PROVISIONING_PROFILE= | tee $CIRCLE_ARTIFACTS/xcode_raw.log | xcpretty --color --report junit --output $CIRCLE_TEST_REPORTS/xcode/results.xml
returned exit code 65

While the successful build makes it past this point, like the following:

▸ Copying BrowZine\ Tests/crawlspec/simple_crawl_to_pdf.yaml
▸ Copying BrowZine\ Tests/test_my_bookshelf.json
▸ Running script 'Copy Pods Resources'
▸ Running script 'Embed Pods Frameworks'
▸ Touching BrowZine\ Tests.xctest
All tests
Test Suite BrowZine Tests.xctest started
BZArticleContentDownloader_Tests
✓ testThatItCallsTheFailBlockWhenHTMLReceivedFromServer (0.005 seconds)

Does anyone know why this is happening? Have you seen this as well?!?


#2

We’ve been fighting this for a long time. Various of our tests run and pass before hitting this. Never any test failures.


#3