Dinomite-Studios / unity-azure-pipelines-tasks

Azure DevOps extension adding tools to build and deploy Unity 3D projects using Azure Pipelines
https://unitydevops.com/
MIT License
121 stars 49 forks source link

Activate License Task succeeds even though login fails #183

Open johannesvollmer opened 3 years ago

johannesvollmer commented 3 years ago

The logs contain the message UnityConnectLoginRequest: Failed to login - please check your username or password . But the task has the green icon, as if it was successfull, and the next task starts.

johannesvollmer commented 3 years ago

Later another error appeared in the logs, maybe as a result of the previous error:

Entitlement-based licensing initiated
[Licensing::Module] Error: Access token is unavailable
[Licensing::Module] Error: Failed to activate entitlement license
johannesvollmer commented 3 years ago

After manually logging in once on the custom azure agent, manually activating and then returning the license, it still does not work. Now that no license is there at all, the license activation task fails successfully.

...
UnityConnectLoginRequest: Failed to login - please check your username or password

No sufficient permissions while processing request "https://core.cloud.unity3d.com/api/login", HTTP error code 401
.[Licensing::Module] Channel doesn't exist: "LicenseClient-unity-build-1$"
[Licensing::Module] Successfully launched the LicensingClient (PId: 9528)
[Licensing::Module] Successfully connected to LicensingClient on channel: "LicenseClient-unity-build-1$" (connect: 0.92s, validation: 0.10s, handshake: 1.20s)
[Licensing::Module] Connected to LicensingClient (PId: 9528, launch time: 0.00, total connection time: 2.23s)
Entitlement-based licensing initiated
[Licensing::Module] Error: Access token is unavailable
[Licensing::Module] Error: Failed to activate entitlement license
BatchMode: Unity has not been activated with a valid License. Could be a new activation or renewal...

/* several minutes passed here */

Unwatch  C:\agent\_work\2\s\Logs\UnityActivationLog_2021-09-15-14-09-12.log
The process 'C:\Program Files\Unity\Hub\Editor\2021.1.3f1\Editor\Unity.exe' failed with exit code 1
johannesvollmer commented 3 years ago

Connecting to the azure agent, but instead of returning the license, we activated a unity personal license, this made the original error appear again.

johannesvollmer commented 3 years ago

As it turns out, even though unity asks for a username, it actually expects an email address. The login works now.

But the original error can still happen, the falling login does not trigger a task failure.