unity-azure-pipelines-tasks icon indicating copy to clipboard operation
unity-azure-pipelines-tasks copied to clipboard

Errors during Install UnitySetup.Powershell and Activate License

Open tjanko04 opened this issue 6 years ago • 4 comments

After following the step-by-step instructions, the following two errors occur:

First, within the UnitySetup.Powershell- [section]Starting: Install UnitySetup.Powershell module

Task : PowerShell Description : Run a PowerShell script on Linux, macOS, or Windows Version : 2.151.1 Author : Microsoft Corporation Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/powershell

Generating script. ========================== Starting Command Output =========================== ##[command]"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'd:\a_temp\1fbb9994-879c-4f2b-8f9f-0b46f8e39ac5.ps1'" ##[error]Install-NuGetClientBinaries : Exception calling "ShouldContinue" with "2" argument(s): "Windows PowerShell is in NonInteractive mode. Read and Prompt functionality is not available." At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1322 char:9

  •     Install-NuGetClientBinaries -CallerPSCmdlet $PSCmdlet
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Install-NuGetClientBinaries], MethodInvocationException

    • FullyQualifiedErrorId : PSInvalidOperationException,Install-NuGetClientB

    inaries ##[error]PowerShell exited with code '1'. ##[section]Finishing: Install UnitySetup.Powershell module

Second, during the Unity Activate License:

##[section]Starting: Unity Activate License

Task : Unity Activate License Description : Activates a Unity license on the agent. Version : 1.0.2 Author : Dinomite Studios Help : Activates a Unity license on the agent. More Information

##[error]Error: Not found Unity Editor Directory: C:\Program Files\Unity\Hub\Editor\2017.4.1f1\Editor ##[section]Finishing: Unity Activate License

In the case of the second error, I have confirmed that the Unity Editor folder is correctly located in the file path above.

Please let me know if there is any additional information required.

Thank you,

Tim

tjanko04 avatar Jun 20 '19 22:06 tjanko04

Update on this issue. It appears that my next attempt yielded a failure, yet the Unity.Setup Powershell succeeded. Is it possible that this will occur if Unity Hub is already running?

The remaining errors are as follows:

image

Thank you again for your help!

tjanko04 avatar Jun 20 '19 22:06 tjanko04

Update on this issue: I have been able to successfully build using the default local agent, but am still getting this error when attempting to build with the built-in Azure agents.

tjanko04 avatar Jun 25 '19 20:06 tjanko04

Hi @tjanko04 thank you for submitting the issue and keeping me updated. So the issue is when you are building using a hosted agent with Untiy 2017.4.1f1 the activation fails because the editor cannot be found. I'll try and reproduce this and keep you updated.

FejZa avatar Jun 26 '19 08:06 FejZa

Hi @FejZa,

Thanks very much for the response. I apologize that I wasn't able to correct the text formatting in my initial submission. If there is anything else you'd like from my end, please let me know.

To recap where I am now, I am able to build successfully when using my own machine (Default) agent. However, when selecting a Hosted Agent, I will get one of the two errors above and unfortunately, this appears to be inconsistent.

Some attempts will cause a failure during Install Unity.Powershell Setup while other attempts will get beyond this step and fail during Activate Unity license.

If I'm able to isolate and reproduce each case, I'll let you know. Thanks again!

tjanko04 avatar Jun 26 '19 16:06 tjanko04