Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build Unity project with Jenkins failed

I'm trying to build Unity project with Jenkins on Mac OS Server. But when I try to run the following script

/Applications/Unity/Unity.app/Contents/MacOS/Unity -quit -batchmode ${PROJECT_PATH} -executeMethod BuildScript.DevelopmentBuild

The script shows this,

_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.

Does anyone knows how to fix the problem?

like image 253
morodomi Avatar asked Dec 20 '12 06:12

morodomi


3 Answers

Try write from Terminal:

sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist
sudo mv /Library/LaunchDaemons/org.jenkins-ci.plist /Library/LaunchAgents/org.jenkins-ci.plist

Then log out and log in again.

Now Jenkins will run as agent and can access WindowServer.

like image 133
artoby Avatar answered Nov 15 '22 08:11

artoby


Make sure you have -nographics parameter among your startup parameters

like image 4
PVejchoda Avatar answered Nov 15 '22 08:11

PVejchoda


I tried

sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist

sudo mv /Library/LaunchDaemons/org.jenkins-ci.plist /Library/LaunchAgents/org.jenkins-ci.plist

Then Restarted my Mac

And then sudo launchctl load /Library/LaunchAgents/org.jenkins-ci.plist after restarting

It worked

like image 1
Jayashree Kamineni Avatar answered Nov 15 '22 09:11

Jayashree Kamineni