Xcode exit code 65 / exit code 66 / raw-xcodebuild-output.log

#1

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
0 Likes

Building builds fails with exit status 65, while provisioning profile is there
iOS Archive fails with "Export failed, error: signal: segmentation fault"
TVOS xcode test failed, error: exit status 70
Log Buffer overflow
#2

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?

  1. open the build’s page on bitrise.io
  2. you can find all the attached files / artifacts in the Apps & Artifacts section, below the build information and above the build log sections.

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.

0 Likes

Code signing identity not propagated to xcodebuild's archive (which fails)
macOS: Provisioning profile doesn't include the currently selected device
Build interrupted - The following build commands failed: PhaseScriptExecution
Allow xcpretty to be disabled in scan
iOS Unable to Download App
iOS / Xcode Archive fails with: “Touch” and then “ARCHIVE FAILED”, but no other error in the log
#3

Hi,

I cannot find this Apps & Artifacts section on bitrise.
Is this answer still available ?

LE: found it, you need to be on the build page :expressionless:

1 Like

#4

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

0 Likes

#5

Sorry for reviving this, but that tab now simply shows “No apps generated :(” message … How to access the raw logs with the current UI?

0 Likes

#6

@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:

1 Like

#7

If that wouldn’t help please share the related build’s bitrise.io URL, so that we can check its logs & config :wink:

0 Likes

#8

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!

1 Like

#9

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! :wink:

0 Likes

#10

@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?

This is where I checked: https://github.com/bitrise-steplib/steps-xcode-archive/blob/29cba9b687aaa7565eea34a552ed6def1a86acf7/main.go#L429

The deploy dir doesn’t contain the output log when using xcpretty.

Thanks in advance

0 Likes