# TVOS xcode test failed, error: exit status 70

**URL:** <https://discuss.bitrise.io/t/tvos-xcode-test-failed-error-exit-status-70/3142>\
**Category:** Builds\
**Tags:** testing\
**Created:** [October 26, 2017, 7:32pm UTC](https://discuss.bitrise.io/t/tvos-xcode-test-failed-error-exit-status-70/3142 "2017-10-26T19:32:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yogaglo](https://avatars.discourse-cdn.com/v4/letter/y/c67d28/32.png) [@yogaglo](https://discuss.bitrise.io/u/yogaglo)\
**Post date:** [October 26, 2017, 7:32pm UTC](https://discuss.bitrise.io/t/tvos-xcode-test-failed-error-exit-status-70/3142/1 "2017-10-26T19:32:34Z")

</div>

# 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](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](http://devcenter.bitrise.io/caching/about-caching/#downloading-and-deleting-caches)._ : 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](https://www.bitrise.io/cli) )? If no, can it be reproduced with Docker (using the same docker images / environment we use on [bitrise.io](http://bitrise.io))? Related guide: [http://devcenter.bitrise.io/docker/run-your-build-locally-in-docker/](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](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](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](https://www.bitrise.io/api/build/407352b9b2a8b3e9/logs.json?&download=log)

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [October 27, 2017, 11:22am UTC](https://discuss.bitrise.io/t/tvos-xcode-test-failed-error-exit-status-70/3142/2 "2017-10-27T11:22:05Z")

</div>

Hi @yogaglo ,

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

```auto
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](http://discuss.bitrise.io/t/xcode-exit-code-65-exit-code-66-raw-xcodebuild-output-log/813)

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](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](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):

```auto
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! 😉  
Happy Building!

---

<div class="post-metadata">

**Author:** ![yogaglo](https://avatars.discourse-cdn.com/v4/letter/y/c67d28/32.png) [@yogaglo](https://discuss.bitrise.io/u/yogaglo)\
**Post date:** [October 27, 2017, 6:18pm UTC](https://discuss.bitrise.io/t/tvos-xcode-test-failed-error-exit-status-70/3142/3 "2017-10-27T18:18:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [October 27, 2017, 9:17pm UTC](https://discuss.bitrise.io/t/tvos-xcode-test-failed-error-exit-status-70/3142/4 "2017-10-27T21:17:39Z")

</div>

Glad to hear @yogaglo!

Happy Building! 😉
