question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UnityActivateLicenseV1 hangs at end of Unity batch mode

See original GitHub issue

Hi, This seems to have been introduced in v2.8.6.

Previously, the licence activation would sometimes choose the wrong project (https://github.com/Dinomite-Studios/unity-azure-pipelines-tasks/issues/181) but would complete as follows:

[Performance] ProcessService.OnProjectLoaded                              :        1 samples, Peak.  18.7 ms (1.0x), Avg.  18.7 ms, Total. 18.73 ms (0.0%)
Cleanup mono
Exiting batchmode successfully now!
Unwatch  C:\a\1\s\Logs\UnityActivationLog_2022-05-19-23-16-41.log
=============================== UNITY LOG END ================================
Unity editor license activated
Finishing: Activate Unity License

With the new version, the job takes forever to complete, and ends up being killed by exceeding timeout (1h)

##[debug]   -serial
##[debug]   ***
##[debug]   -projectPath
##[debug]   C:\a\1\s\PROJROOTNAME\
##[debug]   -logfile
##[debug]   C:\a\1\s\Logs\UnityActivationLog_2022-06-17-19-15-38.log
"C:\Program Files\Unity\Hub\Editor\2019.4.28f1\Editor\Unity.exe" -batchmode -quit -nographics -username *** -password *** -serial *** -projectPath C:\a\1\s\PROJROOTNAME\ -logfile C:\a\1\s\Logs\UnityActivationLog_2022-06-17-19-15-38.log
================================ UNITY LOG ===================================
Tail starting...

(...)

[Performance] ProcessService.OnProjectLoaded                              :        1 samples, Peak.  22.3 ms (1.0x), Avg.  22.3 ms, Total. 22.31 ms (0.1%)

##[debug]Exit code 0 received from tool 'C:\Program Files\Unity\Hub\Editor\2019.4.28f1\Editor\Unity.exe'
##[debug]STDIO streams have closed for tool 'C:\Program Files\Unity\Hub\Editor\2019.4.28f1\Editor\Unity.exe'
Cleanup mono
Exiting batchmode successfully now!
##[debug]Re-evaluate condition on job cancellation for step: 'Activate Unity License'.
##[error]The operation was canceled.
##[debug]System.OperationCanceledException: The operation was canceled.
   at System.Threading.CancellationToken.ThrowOperationCanceledException()
   at Microsoft.VisualStudio.Services.Agent.Util.ProcessInvoker.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, InputQueue`1 redirectStandardIn, Boolean inheritConsoleHandler, Boolean keepStandardInOpen, Boolean highPriorityProcess, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.Agent.ProcessInvokerWrapper.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, InputQueue`1 redirectStandardIn, Boolean inheritConsoleHandler, Boolean keepStandardInOpen, Boolean highPriorityProcess, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.Agent.Worker.Handlers.DefaultStepHost.ExecuteAsync(String workingDirectory, String fileName, String arguments, IDictionary`2 environment, Boolean requireExitCodeZero, Encoding outputEncoding, Boolean killProcessOnCancel, Boolean inheritConsoleHandler, CancellationToken cancellationToken)
   at Microsoft.VisualStudio.Services.Agent.Worker.Handlers.NodeHandler.RunAsync()
   at Microsoft.VisualStudio.Services.Agent.Worker.TaskRunner.RunAsync()
   at Microsoft.VisualStudio.Services.Agent.Worker.StepsRunner.RunStepAsync(IStep step, CancellationToken jobCancellationToken)
Finishing: Activate Unity License

Since “-quit” is already specified, not sure what may be the cause. Thanks

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
FejZacommented, Jun 23, 2022

Fixed in v2.9.0 of the extension package.

1reaction
GunLengendcommented, Jun 22, 2022

@joaocc thank your for your time, and yes, it’s just a work around for someone really need to build for the release deadline ( like me 😄 )

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bug - Batch Mode Hangs Due to an Issue with bee_backend
I am the developer of Koreographer and our build system for the asset involves running Unity in Batch Mode and having it run...
Read more >
Batchmode build hangs in PackageManager - Issue Tracker
I was able to fix this by manually calling AssetDatabase.Refresh() at the end of my build script, before Unity initiates the batchmode shutdown....
Read more >
Windows command prompt build hangs and never finishes #364
Please fill in the following fields: Unity editor version: 2019.3.12f1 ... -batchMode -quit -buildTarget Android -executeMethod Build.
Read more >
Playfab Unity Stuck during importing asset - Batch Mode
When I'm trying to open project in Batch Mode, it's stuck on Loading PlayFabEditorPrefabSo.asset. In log I've found that Unity iss trying to ......
Read more >
Why does "yield return new WaitForEndOfFrame()" never ...
Unity doesn't update frames in the Editor when in Batch Mode. From their documentation: You cannot use WaitForEndOfFrame when running the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found