License problem in batch mode. Error: Code 500 while processing request

Hi,

I have a batch routine in Unity Batch mode.

Everything was working but suddenly today it stopped working.

The log mentions a problem about checking the license.

If I open the Editor, everything is working just fine, the license is valid until next year.

I think it’s something related to batch mode but I don’t know why it just stopped working.

The log says IsPro:0 but when it worked, it said IsPro:1.

Needless to say, I do have a pro license

This is the log
Log

[Licensing::Module] Connected to LicensingClient (PId: 6080, launch time: 0.01, total connection time: 1.99s)
[Licensing::Module] Error: Access token is unavailable; failed to update
[Licensing::Client] Error: Code 500 while processing request (status: Unable to update licenses. Errors: No ULF license found.,Token not found in cache)
[Licensing::Client] Error: Code 500 while updating license in client (status: Unable to update licenses. Errors: No ULF license found.,Token not found in cache)
Built from ‘2022.3/staging’ branch; Version is ‘2022.3.16f1 (d2c21f0ef2f1) revision 13812255’; Using compiler version ‘192829333’; Build Type ‘Release’
OS: ‘Windows 10 (10.0.19045) 64bit Enterprise’ Language: ‘en’ Physical Memory: 16383 MB
[Licensing::Client] Successfully resolved entitlements
[Licensing::Module] Error: License is not active (com.unity.editor.headless). HasEntitlements will fail.
BatchMode: 1, IsHumanControllingUs: 0, StartBugReporterOnCrash: 0, Is64bit: 1, IsPro: 0
No valid Unity Editor license found. Please activate your license.
##[error]Cmd.exe exited with code ‘1’.
##[section]Finishing: EditorTest Unity project

Not an expert here but under %USERPROFILE%\AppData\Local\Unity\licenses theres a file UnityEntitlementLicense.xml

mine, the issue date is a couple of days ago, which is odd, considering
9857715--1419840--upload_2024-5-27_17-12-7.png

it also has
2016-07-04T13:36:41Z
2024-06-26T14:55:57.070Z

and

Id in part guess that the updates are done through hub, if you run headless, you run direct, it maybe possible that it hasnt updated the license and so feels you’re beyond your timer?

If it is useful to someone.

I launched the same command again, but this time adding the parameters -username ‘name@example.com’ -password ‘XXXXXXXXXXXXX’, with my user and my password and it worked.

Then, I relaunched the same command but removing username and password, i.e., as it was at first when it was not working, and now it’s working again.

I guess the command with user/password updated something internally in the Unity configuration

3 Likes