Xcode Exit Code 65 + UI Tests

I would like to but I can’t find how to open support ticket :confused:

Edit: i sent an email to support@circleci.com

we’re going to investigate alternative CI solutions since we’ve lost days of dev time to circle issues. i realise no solution will be without problems, but we don’t seem to be getting anywhere

2 Likes

To complete up my presence in this thread, i declare our build to be working again after several months - essentially since Xcode8 adoption. It was achieved through multiple changes. I don’t claim any of it being the universal fix, but someone still can have an a-ha moment.

  1. cleaned up, rethought and reapplied code signing. Xcode7 setup may not be good enough for Xcode8. Simulator builds do not “just work” anymore. Apple provisioning is damn complicated and clicking the shiny new “Automatically manage signing” will NOT fix your mess. Thanks @jeremyhu for this one.
  2. migrate from Pods to Carthage. Pod’s justification of basically taking over your project is “will do everything for you”. Since Xcode toolchain is being fragmented (and unfortunately also bugged so far) by Swift and its different runtime libs/frameworks philosophy, that justification does not apply anymore. In a complicated project with subprojects, various targets and mixed Swift/ObjC codebase, Pods required so many side hacks already, that Carthage actually made the build simpler.
  3. solved exit code 65 with chruby system. Regarding adoption of upgraded system tools, Xcode toolchain is, uh, stiff somewhat. Anyone remember “resource-rules deprecated” in Xcode6? So thank you Circle for giving us the newest ruby as default, but our Xcode8 ipatool simply won’t work with any ruby>2.0.0. All you get to know is xcodebuild error “No devices found”. Your build containers feel alone, it wants you to ssh in and read its xcactivitylogs.
1 Like

Anybody having problems with iOS UI tests running, but failing on CircleCI? I have some simple XCTest cases that works fine when running locally on my machine, but when running on CircleCI they fail with errors like
"UI Testing Failure - No matches found for ScrollView" or other missing UI objects, and with exit code 65.

We have been having the same issue for a while as well: Exit Status: 65. We normally just do a manual rebuild and then it works after 1 or 2 times. But this really is a time suck.

Any concrete ways to fix this issue? Please?

Hello we are still getting this error very oftenly. We need a fix for that issue. We currently can’t trust circle builds with that error always showing up


1 Like

@ben-j69 @tyler-at-uv @halseth If you’re still experiencing this issue please reach out to support@circleci.com and open a ticket to help get this resolved.

I just got this error this again, so I sent an email to support. Hope it gets resolved. Thank you for the assistance.

If you’re running into the error code 65 (and tests are passing) here’s a command you can pipe on the end of your xcodebuild (assuming you’re running tests) command to get back more consistent results:

(XCODEBUILD_COMMAND_HERE) | awk 'BEGIN {success=0} $0 ~ /.* tests, with 0 failures \(.*/ {success=1} {print $0} END {if(success==0){exit 1}}

This looks for tests, with 0 failures ( in your output text, thus using the text output of xcodebuild instead of the status code of xcodebuild to determine success.

Note: Keep in mind, if you do something like NSLog(' tests, with 0 failures ('); in your code you make get a false positive, it’s very unlikely to happen by accident. You may have to update tests, with 0 failures ( in the awk script between updates of xcodebuild. But, having consistent results with xcodebuild is definitely worth that price.

After long looking for this I’ve just resolved an issue for one of our customers that had the exact same symptoms:

  1. Sometimes exit code 65 during the build

  2. UI test just wont run and fail with a missing element.

You’re most likely running into issues with an UIAlert being on screen which expect user input, while the XCTest daemon quietly timesout in the background and eventually throws an error.

If you run into these issues please open a support ticket I would like to take a closer look at your builds and resolve this with you :slight_smile:

Constantin

Hey everyone,

Please checkout this post: I’m looking to gather as much information as I possibly can in order to help Apple improve xcodebuild and the underlying toolchain for all of us.

If you’re interested please E-Mail me. All the data will be anonymized!