If you get an exit code 65 error in any of the Xcode steps, something like:
e[34;1mRunning the tests...e[0m
$ set -o pipefail && env "NSUnbufferedIO=YES" xcodebuild "-workspace" "MyApp.xcworkspace" "-scheme" "MyScheme" "build" "test" "-destination" "platform=iOS Simulator,name=iPhone 6s Plus,OS=latest" | xcpretty "--color" "--report" "html" "--output" "/Users/vagrant/deploy/xcode-test-results-MyScheme.html"
e[33;1mxcode test exit code: 65e[0m
e[31;1mxcode test failed, error: exit status 65e[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 variablee[0m
The solution for these Xcode exit code: 65 issues is to check the raw-xcodebuild-output.log, which is mentioned in the log.
How can I get this raw-xcodebuild-output.log file?
The easiest solution is to make sure that you have the Deploy to Bitrise.io step in your workflow, anywhere after the Xcode step. With the default configuration of the Deploy to Bitrise.io step it will collect all the files from the BITRISE_DEPLOY_DIR and attach the files to the build, and the Xcode steps save this raw-xcodebuild-output.log into that deploy dir.
Where can I find this raw-xcodebuild-output.log file on the build’s page?
On the artifacts which support “inline preview” just click the “eye” icon on the right side, and that artifact (e.g. raw-xcodebuild-output.log) will be shown right on the web UI.
Artifacts which don’t support inline preview (e.g. ZIP files) can be simply downloaded by clicking the download button.
The location changed a little bit. It’s still on the build’s page (as these are the Apps & Artifacts of the build) but it’s now on a separate tab, instead of just a collapsable section above the log
@icma please add a (new) Deploy to Bitrise.io step anywhere after the Xcode step. You either removed that step, or maybe changed the path it should deploy. See above:
Thanks for the prompt reply. I checked again, and I may have been looking at builds that failed at different steps. Now that I try to look for that example, I can’t find it. It’s either there, or build has failed on different steps.
I distinctly remember looking at the 65 exit code, and switching to artifacts, and not finding the logs … Well, I hope the probable, which is that it’s a false alarm and I’m mistaken!
Hmm… I’m not aware of any related issue. Anyway, if you’d see that happen please let us know with the related build’s bitrise.io URL and we’ll check it right away!
@viktorbenei looks like Xcode Archive will only save xcodebuild raw log output if it errors, or if the output_tool is xcodebuild. I’d like to visualize in xcpretty but also retain the raw xcodebuild logs. Is this possible?