Internal Xcode Server Error

I have been having nothing but trouble with Xcode Server for an OS X Application and using UI testing. Every step of the way at doing anything is as painful as this problem.


Xcode 7.2, OS X 10.11.3. OS X Server 5.0.15.


I am currently stuck as I am getting the following response when running an integration:

"The integration didn't complete as expected due to an internal Xcode Server error."


I would like to have the option of creating a completely new bot to see if that is the issue, but it took me over 3 hours and a large number of attempts at getting my repository credentials to verify yesterday before I was able to configure the bot to select the correct branches from the different submodules within the project. This was not because I had invalid credentials, but problems with Xcode Server being able to validate ssh credentials when there are multiple submodules.


Prior to the above message coming up I was getting failures of my UI tests when running on the server. This was because a dialog was being shown that said that the XCTRunner application had unexpectedly quit (as seen in the screenshots captured by Xcode Server when running UI tests). I made some changes because I had noticed that if pre test action scripts configured in the scheme editor fail they can cause the XCTRunner application to unexpectedly quit. After making these changes this was followed up with the internal Xcode Server error message.


I have spent ages hunting around in the log files like in the directories /Library/Developer/XcodeServer/Logs without finding anything useful to help me resolve these issues.


If I run our non UI testing integrations on the server they are running without error. This appears to be an issue specific to running OS X UI tests as an integration.


I would really appreciate any suggestions or ideas as to what the problem is.


Kevin

OK, so I am at least back to the XCTRunner application quit dialog showing in the integration snapshots, and the tests failing because it is there. But at least I no longer have the internal Xcode Server error with no clue as to what the internal error was.


If anyone has an idea why I am getting the XCTRunner has unexpectedly quit dialog that would be appreciated. I have seen it before and it was because test pre action scripts had commands in them that were failing and returning a non zero result code. This time doesn't appear to be the case.

Once the XCTRunner has unexpectedly quit dialog is displayed it remains for all following integrations as the Aqua session is not killed. Stopping and starting Xcode Server doesn't close the Aqua session. I am guessing resetting Xcode Server will but that means losing your bots and customizations. Restarting your server will also likely fix the issue but if the server is a remote machine with a drive using filevault then you need someone to be available to restart it.


I manually killed various Aqua related processes on the command line whilst Xcode Server was stopped, started Xcode Server and after a few minutes I was able to perform integrations again.

Does anyone know how to stop the ReportCrash dialog from displaying?


It is easy doing OS X UI integration tests to have XCTRunner crash but the only way after fixing whatever the issue was that caused XCTRunner to crash is to restart the mac running OS X Server to clear the dialog. This is not s sustainable approach.


Kevin

Internal Xcode Server Error
 
 
Q