Xcode Service (Mavericks) errors when run unit tests is enabled
Asked Answered
H

3

75

When an Xcode Service bot attempts to perform a build with run unit tests enabled, the build will always fail. When I look at the log file, the same error repeats many times:

xcsbuildd[1966] <Warning>: [XCSBuildOperation.m:106 7368f310 +2126ms] Preflight connection to /var/XCSControl/com.apple.XCSTestUserPreflightService failed; retrying: No such file or directory

Followed by these error messages a few lines later:

xcsbuildd[1966] <Error>: [XCSBuildOperation.m:102 7368f310 +2104ms] Timed out trying to connect to CG Session; giving up after 60 seconds
xcsbuildd[1966] <Error>: [XCSOperation.m:33 7368f310 +0ms] Error Domain=XCSBuildServiceDomain Code=0 "Cancelled integration because headless test environment is required but not available after 60s" UserInfo=0x7fa952571bd0 {NSLocalizedDescription=Cancelled integration because headless test environment is required but not available after 60s}
xcsbuildd[1966] <Debug>: [XCSOperation.m:28 7368f310 +0ms] Cancelling operation: XCSBuildOperation

I've hit a brick wall with this, and can't find anything on it.

Has anyone had this problem and found a fix?

Henrietta answered 22/4, 2014 at 20:54 Comment(3)
I have exactly the same problem - it used to work fine, but since yesterday it is suddenly stuck. Maybe a bug related to the latest Xcode/OS X server update?Seeseebeck
I've had this problem from the start. I did upgrade from Mountain Lion Server to Mavericks Server though.Henrietta
Did you re install Xcode?Walk
M
1

The errors have some clues! Timed out trying to connect to CG Session, which suggests it's trying to get a Core Graphics context, and Cancelled integration because headless test environment is required but not available after 60s, "headless" meaning no display attached, which is common for build machines. You might try connecting a display to the machine, log into it and see if the error goes away.

Some frameworks/libraries still expect a graphics context which may be dependent on a display (even if it's virtual, like VNC). If the machine doesn't start up with a monitor attached, the window server may not be able to init certain features correctly and you get weird results like this.

I've solved this type of problem in the past but connecting a headless display adaptor to each machine, which fools the graphics card into thinking there's a display attached. You can find these dummy display emulators online for under $20.

Hope that's helpful.

Megavolt answered 21/11, 2015 at 4:8 Comment(0)
M
0

When programming with Xcode, I received this error too so I deleted all files related to Xcode and redownloaded it from the Mac App Store. That fixed it for me. By the way I have OS X El Capitan so may be a different problem.

Hope that helps!

Mckinzie answered 7/1, 2016 at 19:37 Comment(0)
C
-1

XCode is not a perfect use with Maverick. Try SynonymATX version 5.8 with the further code: Disassembly of section .text._ZN16Uarmcodetestform11ReadIntegerEPi:

00000000 <_ZN16Uarmcodetestform11ReadIntegerEPi>:
   0:   b580        push    {r7, lr}
   2:   466f        mov r7, sp
   4:   b083        sub sp, #12
   6:   9002        str r0, [sp, #8]
   8:   78c1        ldrb    r1, [r0, #3]
   a:   7882        ldrb    r2, [r0, #2]
   c:   ea42 2101   orr.w   r1, r2, r1, lsl #8
  10:   7842        ldrb    r2, [r0, #1]
  12:   7803        ldrb    r3, [r0, #0]
  14:   ea43 2202   orr.w   r2, r3, r2, lsl #8
  18:   ea42 4101   orr.w   r1, r2, r1, lsl #16
  1c:   9101        str r1, [sp, #4]
  1e:   9000        str r0, [sp, #0]
  20:   4608        mov r0, r1
  22:   b003        add sp, #12
  24:   bd80        pop {r7, pc} 
Chauncey answered 9/9, 2015 at 18:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.