TVOS xcode test failed, error: exit status 70

testing
#1

TVOS xcode test failed, error: exit status 70

Description of the issue

When attempting to run the xcode-test step the build fails shortly after launching the simulator.
I found a related issue on github here: https://github.com/bitrise-io/build.issues/issues/14 but it does not solve my issue.

We did just recently update our deployment target to tvos 11.0 (after historically supporting 9.0) but I’ve already set all targets in the xcodeproj to deploy to tvos11, including the tests target

I’ve run several builds not both on the XCode 9.0 and Xcode 9.1 stacks to no success. My xcode-test step is using the latest version.

This build also runs and tests successfully inside of Xcode 9.0

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. : Not using a cache
  • If you have multiple different build configurations (workflows), does the issue affect all/more than one? : N/A
  • Does upgrading the build Step to the latest version help? : NO
  • When did the issue start? : Today, first build since changing the xcodeproj targets to TVOS11

Linux/Android stack builds

Can it be reproduced by running the build locally, after doing a new git clone of the repository into the /tmp directory and running the build from there with the Bitrise CLI ( https://www.bitrise.io/cli )? If no, can it be reproduced with Docker (using the same docker images / environment we use on bitrise.io)? Related guide: http://devcenter.bitrise.io/docker/run-your-build-locally-in-docker/ .

Other stacks

Can it be reproduced by running the build locally with our CLI ( https://www.bitrise.io/cli ), after doing a new git clone of the repository into the /tmp directory and running the build from there with the Bitrise CLI ( https://www.bitrise.io/cli )?

Build log

Not sure if you can access this log via admin? Cant upload non-images here: https://www.bitrise.io/api/build/407352b9b2a8b3e9/logs.json?&download=log

1 Like

#2

Hi @yogaglo ,

The exact reason should be in the raw-xcodebuild-output.log file, as mentioned in your build’s log:

e[33;1mxcode test exit code: 70e[0m
e[31;1mxcode test failed, error: exit status 70e[0m
e[33;1mIf you can't find the reason of the error in the log, please check 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_TEST_RESULT_TEXT_PATH environment variable.

You can check the full, unfiltered and unformatted Xcode output in the file: 
/Users/vagrant/deploy/raw-xcodebuild-output.log 
If you have the Deploy to Bitrise.io step (after this step), 
that will attach the file to your build as an artifact!e[0m

You can find a guide about how you can get that Xcode exit code 65 / exit code 66 / raw-xcodebuild-output.log

But in your case, based on what you wrote, that it worked with Xcode 8 and now you get an exit code 70 from xcode (which is usually "invalid configuration) I’m pretty certain that this is because the tvOS device IDs changed in Xcode 9.

If you check the device IDs in Xcode 8.3 the device ID was Apple TV 1080p: https://github.com/bitrise-io/bitrise.io/blob/master/system_reports/osx-xcode-8.3.x.log#L268

In Xcode 9 / iOS 11 this was changed, there are now 3 different device IDs but Apple TV 1080p is no longer an option: https://github.com/bitrise-io/bitrise.io/blob/master/system_reports/osx-xcode-9.0.x.log#L278

The current options (Xcode 9.0.1):

Apple TV (com.apple.CoreSimulator.SimDeviceType.Apple-TV-1080p)
Apple TV 4K (com.apple.CoreSimulator.SimDeviceType.Apple-TV-4K-4K)
Apple TV 4K (at 1080p) (com.apple.CoreSimulator.SimDeviceType.Apple-TV-4K-1080p)

So the solution should be to simply change the Simulator Device option of the Xcode Test step from Apple TV 1080p to any of the currently available device IDs (Apple TV / Apple TV 4K / Apple TV 4K (at 1080p) ).

Let us know if this wouldn’t help or if you need more info / help! :wink:
Happy Building!

0 Likes

#3

Ah yes, it appears the Apple TV Simulator name was the issue in the end. Also useful to know the raw logs are available with the Upload To Bitrise step added at the end. I was wondering where they went.

Thanks for the help

1 Like

#4

Glad to hear @yogaglo!

Happy Building! :wink:

0 Likes