Build Unity project with Jenkins failed
Solution 1
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.
Solution 2
Make sure you have -nographics parameter among your startup parameters
Solution 3
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
Related videos on Youtube
morodomi
Mainly Android Application Developer. Sometimes iOS Application Developer. Can be Server Side Application Developer with Node.js, PHP, and Perl. Possibly Front Side Web Application Developer with HTML5, CSS3, and jQuery or Prototype. Recently, I also trying to use Jenkins CI and Unity3D, but I'm not QA Engineer.
Updated on September 14, 2022Comments
-
morodomi over 1 year
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?
-
morodomi over 11 yearsI tried with --projectPath option as Unity -batchmode -quit -projectPath "${UNITY_PROJECT_PATH}" -executeMethod BuildScript.DevelopmentBuild. But won't build.
-
Rob over 9 yearsI had to restart my machine after this change. Logging out and logging in wasn't enough. Also I don't have Jenkins configured to run on machine startup, so I had to run
sudo launchctl load /Library/LaunchAgents/org.jenkins-ci.plist
after restarting. -
d4Rk about 9 yearsDid also had to restart the machine, but after that it just worked fine! thx