Xcode Server ibtool Build Failures

2019-03-17 22:21发布

问题:

I have been investigating using Xcode Server for CI. I've worked through some of the problems, but now have a problem that has stumped me.

The builds seem to work alright, but then hangs during the testing phase, and produces this at the bottom of the log:

2015-11-25 14:44:45.650 xcodebuild[58280:821560]  iPhoneSimulator: D7097422-C058-44DB-A275-CE1A44B11023: Executable terminated at path: /Applications/Xcode7.1.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Agents/xctest (status = 6)
Sampling process 58280 for 10 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Sample analysis of process 58280 written to file /Library/Developer/XcodeServer/Integrations/Integration-269b1638e732255aefa82f1688077c72/58280.sample
sample[59879]: sample cannot find any existing process you have access to which has a name like 'Interface Builder Cocoa Touch Tool'; try running with `sudo`.
sample[59880]: sample cannot find any existing process you have access to which has a name like 'ibtool'; try running with `sudo`.
sample[59881]: sample cannot find any existing process you have access to which has a name like 'ibtoold'; try running with `sudo`.
** BUILD INTERRUPTED **

The server is running OS X 10.10.5 (cannot upgrade to El Capitan just yet), OS X Server 5.5.15, and numerous Xcode versions, but has selected Xcode 7.1 (which is the latest version available on this server).

Has anyone seen this before and solved it?

This question which links to this question professes to having a solution, but alas, they are not helpful and seem to have slightly different setups. So yes, the keychain is unlocked and available to Xcode Server, and the server has been restarted.

回答1:

My bot also seemed to get stuck with this error every time. Tried the reboot, keychain unlock, changing simulator device.

Creating a new bot with the exact same configuration as my old one worked!



回答2:

  1. Try reseting the Simulator : Simulator -> "Reset Content and Settings"
  2. See Test target X encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted

Combination of 1. and 2. together with the server restart cleared up the problem for me.



回答3:

  1. Clean your build folder. (using shift+alt+command+k).
  2. Clean your project. (using shift+command+k).

Then build your project.