iOS test target never starts causing build failure

Bitrise Build Issue Report template

Description of the issue

On a specific branch of my app, there are two test targets - one running basic unit tests and another running UI tests using EarlGrey. This was all working fine until a particular changeset causes the unit test target to crash or hang on bitrise.io, but not for any obvious reason.

The error it spits out at the end is:
Error Domain=IDETestOperationsObserverErrorDomain Code=6 “Early unexpected exit, operation never finished bootstrapping - no restart will be attempted” UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted, NSUnderlyingError=0x7fc5e49bfb50 {Error Domain=IDETestOperationsObserverErrorDomain Code=5 “Test runner exited before starting test execution.” UserInfo={NSLocalizedDescription=Test runner exited before starting test execution., NSLocalizedRecoverySuggestion=If you believe this error represents a bug, please attach the result bundle at /var/folders/90/5stft2v13fb_m_gv3c8x9nwc0000gn/T/XCUITestOutput793372547/Test.xcresult}}}

Environment:

Where did the issue happen?

Occurs on bitrise.io Xcode 10.1.x, on macOS 10.13 (High Sierra)

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

xcode-test v2.3.1

Reproducibility

  • Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) : NO
  • Does a rebuild without caches help? (You can remove the Cache:Pull and Cache:Push steps temporarily to not to use the cache, or you can delete all the caches on the Settings tab of the app. : NO
  • Does the issue happen sporadically, or every time? : Every time
  • Does upgrading the build Step to the latest version help? : NO
  • When did the issue start? : After removal of a large amount of legacy code from the app and unit test targets.

Local reproduction

Can’t be reproduced locally; unit tests run and pass as expected when running using Bitrise CLI and Xcode directly. (macOS 10.14 Mojave, Xcode 10.2)

Build log

This is on a commercial project, so the full log and build link are going by email. :wink:

Resolved the issue. The test target had originally used a pod called SnapshotTesting, and this specific branch had removed all tests that imported it along with the __Snapshots__ folder containing the stubbed network requests, but not the pod itself.

For whatever reason, including the pod in the test target with no tests and no stubs was causing the running to hang until it timed out. Removing the pod entirely fixed it.

1 Like

Hy David👋

We are glad to hear you managed to fix it! :upside_down_face:

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