unitysetup.powershell icon indicating copy to clipboard operation
unitysetup.powershell copied to clipboard

Problem retrieving Unity installation for some existing unity project version in windows agent

Open dorszpw opened this issue 3 months ago • 0 comments

When running Install-UnitySetupInstance command within a windows agent (MS hosted windows 2022), some existing unity version cannot be found. For example, here are the following logs for Unity 6000.1.6f1 (which exists!)

"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'D:\a\_temp\90f4909a-19d6-4185-a9b2-e2a40d68409e.ps1'"
Could not find archives for Unity version 6000.1.6f1
At C:\Program Files\WindowsPowerShell\Modules\UnitySetup\6.0.195\UnitySetup.psm1:572 char:9
+         throw "Could not find archives for Unity version $Version"
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Could not find ...sion 6000.1.6f1:String) [], RuntimeException
    + FullyQualifiedErrorId : Could not find archives for Unity version 6000.1.6f1
 
##[error]PowerShell exited with code '1'.
Finishing: Installing Unity Components 'Windows'

However, when trying with a more recent unity version, here Unity-6000.2.0b5:

========================== Starting Command Output ===========================
"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'D:\a\_temp\2d7dbbe3-b86b-44ed-9575-6b662e694a23.ps1'"
VERBOSE: Downloading
https://download.unity3d.com/download_unity/c1cd6601d4c1/Windows64EditorInstaller/UnitySetup64-6000… to
C:\Users\VssAdministrator\.unitysetup\Installers\Unity-6000.2.0b5\UnitySetup64-6000.2.0b5.exe
VERBOSE: Installing Windows Editor
VERBOSE: 10/02/2025 11:03:31: Installing Windows to C:\Program Files\Unity\Hub\Editor\6000.2.0b5.
VERBOSE: 10/02/2025 11:12:46: Succeeded.
Finishing: Installing Unity Components 'Windows'

I tried to use Find-UnitySetupInstaller -Version '6000.1.6f1' | Format-Table command as well. In the pipeline, I got the exception 'Could not find archives for Unity version 6000.1.6f1'. However, when executing inside a local powershell, I get the list of all possible version/component for that version:

ComponentType Version        Length LastModified        DownloadUrl
------------- -------        ------ ------------        -----------
       Windows 6000.1.6f1 4086765272 29/05/2025 07:12:02 https://download.unity3d.com/download_unity/d64b1a599cad/Windows64Ed…
         Linux 6000.1.6f1   79981896 29/05/2025 07:12:02 https://download.unity3d.com/download_unity/d64b1a599cad/TargetSuppo…
           Mac 6000.1.6f1  420593856 29/05/2025 07:12:02 https://download.unity3d.com/download_unity/d64b1a599cad/TargetSuppo…
Documentation 6000.1.6f1  376411352 29/05/2025 07:12:02 https://download.unity3d.com/download_unity/d64b1a599cad/WindowsDocu…
Windows_IL2CPP 6000.1.6f1  222950568 29/05/2025 07:12:02 https://download.unity3d.com/download_unity/d64b1a599cad/TargetSuppo…
    UWP_IL2CPP 6000.1.6f1  456131008 29/05/2025 07:12:02 https://download.unity3d.com/download_unity/d64b1a599cad/TargetSuppo…
       Android 6000.1.6f1  548683304 29/05/2025 07:12:02 https://download.unity3d.com/download_unity/d64b1a599cad/TargetSuppo…
           iOS 6000.1.6f1  292926224 29/05/2025 07:12:02 https://download.unity3d.com/download_unity/d64b1a599cad/TargetSuppo…
       AppleTV 6000.1.6f1  289150776 29/05/2025 07:12:02 https://download.unity3d.com/download_unity/d64b1a599cad/TargetSuppo…
         WebGL 6000.1.6f1  906089336 29/05/2025 07:12:02 https://download.unity3d.com/download_unity/d64b1a599cad/TargetSuppo…
  Linux_IL2CPP 6000.1.6f1   81210808 29/05/2025 07:12:02 https://download.unity3d.com/download_unity/d64b1a599cad/TargetSuppo…
Windows_Server 6000.1.6f1  387556000 29/05/2025 07:12:02 https://download.unity3d.com/download_unity/d64b1a599cad/TargetSuppo…
      VisionOS 6000.1.6f1  454091200 29/05/2025 07:12:02 https://download.unity3d.com/download_unity/d64b1a599cad/TargetSuppo…

dorszpw avatar Oct 02 '25 11:10 dorszpw