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?
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.
Make sure you have -nographics parameter among your startup parameters
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With