- Home /
Unity Command Line Fails to Get license
Using command line:
-batchmode -serial SC-xxxx-xxxx-GMX4-NTDF-xxxx -username "unity-builds3@xxxx.net" -password "xxxx" -runOnlySmokeTests -executeMethod TestToolBuildScript.RunPlayModeTests
getting errors:
BatchMode: Unity has not been activated with a valid License. Could be a new activation or renewal...
(Filename: C:/buildslave/unity/build/Editor/Platform/Windows/WinEditorMain.cpp Line: 821)
DisplayProgressbar: Unity license
Cancelling DisplayDialog: Updating license failed Failed to update license within 60 seconds. Exiting.
This should not be called in batch mode.
(Filename: C:/buildslave/unity/build/Editor/Platform/Windows/EditorUtility.cpp Line: 1160)
Failed!
Did you get anywhere with this? Also having the same problem. Thanks
Answer by plockhartt17 · Jun 26, 2018 at 02:02 PM
We have a problem where our TeamCity agents do not successfully run a bat file that registers a unity license for a given platform (eg ps4/switch require different licenses). The command similar to what you are running does not successfully create a Unity license file in eg C:\ProgramData\Unity\Unity_v5.x.ulf
Running the scripts manually does do it successfully. As a temporary solution, I have manually ran the bat file and generated a .ulf file for each of the 4 platforms we need to support. At build time, before unity is launched, the platform-specific license is automatically copy+replaced into the ProgramData\Unity folder, replacing what was originally there. Whether this will cause problems in a few days as Unity checks the license is unknown, but as of writing our builds are up and running again. Not exactly ideal....
Your answer
![](https://koobas.hobune.stream/wayback/20220612154042im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Batchmode not working 1 Answer
Activate Unity license from CLI for CI 1 Answer
Unity standalone crash when lanughing on batchmode 0 Answers
Batchmode license activation error 2 Answers