- Home /
"Timeout occured while trying to update license." in headless build (Fedora Linux/Jenkins)
I am trying to run Unity in headless mode on a Linux server so that I can automate the build using Jenkins. I am getting several errors and the build is failing.
We have bought a Unity Plus licence but it seems that the Unity client is unable to contact some licence check server.
We get the same error if we try to run the same command line outside Jenkins.
I have opened up some ports, so hopefully it is not a firewall issue, but please advise as to what ports need to be open (in or out/TCP or UDP/port numbers).
Can anyone advise what to do?
The error messages:
[0502/084418:ERROR:browser_main_loop.cc(161)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on. [0502/084418:ERROR:gl_surface_glx.cc(328)] glxQueryVersion failed [0502/084418:ERROR:gl_surface_x11.cc(57)] GLSurfaceGLX::InitializeOneOff failed. No sufficient permissions while processing request "https://core.cloud.unity3d.com/api/login", HTTP error code 401 .Cancelling DisplayDialog: Failed to activate/update license. Timeout occured while trying to update license. Please try again later or contact support@unity3d.com This should not be called in batch mode.
Answer by GabLeRoux · Aug 05, 2017 at 03:37 AM
From what I just experienced, you need to quote your username (email) and password when invoking unity builds with command line. Make sure you see the following line in your logs:
User you@example.com logged in successfully
Use something like this:
unity-editor -projectPath $(pwd) -quit -batchmode -executeMethod BuildCommand.PerformBuild -logFile -username "$YOU_EMAIL" -password "$YOUR_PASSWORD" -serial XX-XXXX-XXXX-XXXX-XXXX-XXXX
In my case, I didn't have a serial so things are quite complicated for activating the license for the personal edition (not your case): https://forum.unity3d.com/threads/5-4-0p1-fails-to-launch-due-to-license.425277/
From the above, there seem to be 3 solutions/suggestions:
Setup vnc, log into the machine and activate from the ui (who would do that in a CI... please don't)
Add some
CACerts.pem
to~/.local/share/unity3d/Certificates/
(I tried but it failed, see bellow)Extract the posted
xml
, save it tounity3d.alf
and do a manual activation trough license.unity3d.com/manual, download the licenseulf
file to~.local/share/unity3d/Unity/
I tried the option 2 CACerts.pem
thing, but it didn't do anything and I still get a timeout on login so looks like we must activate manually first. Sounds like a way to sell the unity cloud build or the pro version. :(
Unity3d website prevents me to post full answer here in comments, I don't know why, but have a look to this issue on gitlab, there's detailed steps and explanation on what should be done:
https://gitlab.com/gableroux/unity3d-gitlab-ci-example/issues/5
Answer by zeaning · Sep 23, 2021 at 11:56 AM
after Manual activation in url: https://license.unity.cn/manual got a *.ulf file,then import license file by command: $ ./Unity -batchmode -manualLicenseFile -logfile you cat get this from: https://docs.unity3d.com/2020.2/Documentation/Manual/CommandLineArguments.html