Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins - xcodebuild connection peer refused refused channel request for dtxproxy:XCTestManager_IDEInterface

I'm attempting to run an xcodebuild command using Jenkins to build my code periodically. The error message that Jenkins is spitting out is:

14:18:25.993 xcodebuild[24225:349241] Connection peer refused channel request for "dtxproxy:XCTestManager_IDEInterface:XCTestManager_DaemonConnectionInterface"; channel canceled
14:18:25 Testing failed:
14:18:25 Test target PROJECT_NAME encountered an error (Invalid device state If you believe this error represents a bug, please attach the log file at /var/folders/hp/3m4jx3514dq4lf1l9s8hk5qh00009c/T/com.apple.dt.XCTest-status/Session-2015-08-05_14:18:22-ulOdQQ.log)
14:18:25 ** TEST FAILED **

My question is what is this error and how can I fix it? When xcode build command is run in the command line, I receive the same error. I'm using Xcode 6 and the command I'm running is:

xcodebuild -workspace PROJECT_NAME.xcworkspace -scheme 'Scheme Name' -destination 'platform=iOS Simulator,name=iPad Air,OS=8.1' clean build test

like image 834
daze Avatar asked Aug 05 '15 22:08

daze


1 Answers

While Fiddling around with the items below, I finally have a few successful builds. I still don't know the root cause. The internet doesn't seem to either.

  1. Add "clean build" to the command line options (as specified above)
  2. Kill the simulator Prior to the command - sort of suggested here: (Instruments error: Connection peer refused channel request)

    killall "Simulator" || echo "No matching processes belonging to you were found"

like image 193
TheJeff Avatar answered Nov 08 '22 04:11

TheJeff