-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chocolatey's signature is not valid #11169
Comments
It appears that https://chocolatey.org/install.ps1 cannot be downloaded (after 20 retries have been exhausted) for some reason. EDIT 2024-12-12T12:35:00 EDIT 2024-12-12T12:43:00
Question: can anyone still build the Windows images using the main branch? Same issue in our Windows logs, see below:
|
Given the exception "Exception calling "DownloadFile" with "2" argument(s): "An exception occurred during a WebClient request."" In my log the value of the Path parameter appears to be 'D:\temp\install.ps1'.
On my test machine the folder 'D:\temp' does not exist: ➜ $url = 'https://chocolatey.org/install.ps1'
# on my test machine the folder 'D:\temp' does not exist
➜ $path = "D:\temp\install.ps1"
# images/windows/scripts/helpers/InstallHelpers.ps1#L187
➜ (New-Object System.Net.WebClient).DownloadFile($url, $path)
MethodInvocationException: Exception calling "DownloadFile" with "2" argument(s): "An exception occurred during a WebClient request." So one scenario that mimics the exception on Win2019 and Win2022 is to call 'DownloadFile' with a target path containing a non-existent folder. EDIT 20241212T14:42
Since 'WebClient' is obsolete, and used in InstallHelpers.ps1#L187, a replacement could be 'Invoke-WebRequest': Invoke-WebRequest -Uri $url -Outfile $path which yields: 'Could not find a part of the path 'D:\temp\install.ps1'.' straight of the bat. All that remains is to make sure the target path exists. |
We have been experiencing the same issue since November 25th, but haven't had the time to investigate it yet. I took some time today to investigate it further and found out that we currently use the VM type ' Standard_D8s_v4' image which doesn't come with a D drive. By setting the temp_dir param in the HCL file to C:\Temp instead of D:\Temp, the image is getting build. |
Hi all, Please be informed. The VM size (Standard_D8s_v4) does not have a local (temporary) disk. However Fsv2 sizes series do have such drive. To workaround this issue, you can either update VM size variable "vm_size" or update the variable for temporary files variable "temp_dir". Thanks |
Thank you @denyos for investigating, and @vidyasagarnimmagaddi for your summary.
For example in the case of win2022 these vars should be exposed which are currently not exposed: The above is equivalent to PR #10884 (which has been rejected). |
Would you be willing to consider a PR to fix the above, by exposing the variables listed in the 'build-image.ps1' and 'image-generation.yml' for windows and ubuntu? If yes, I will post such a PR. |
It should be great if those params would become available in the Even a small thing like a key-value pair collection to overwrite those values will help without making the list of inputs to long/complex. @vidyasagarnimmagaddi Can you log a feature request for this? |
Hi @denyos , @baidarka |
Description
Chocolatey fails when trying to be installed due to outdated signature.
Platforms affected
Runner images affected
Image version and build link
Latest
Is it regression?
Don't know
Expected behavior
That it can download chocolatey
Actual behavior
2024-12-12T10:35:02+01:00: windows.azure-arm.windowsbuildserver: Install chocolatey
2024-12-12T10:35:02+01:00: windows.azure-arm.windowsbuildserver: Downloading package from https://chocolatey.org/install.ps1 to D:\temp\install.ps1...
2024-12-12T10:35:02+01:00: windows.azure-arm.windowsbuildserver: WARNING: Package download failed in 0.01 seconds
2024-12-12T10:35:02+01:00: windows.azure-arm.windowsbuildserver: WARNING: Exception calling "DownloadFile" with "2" argument(s): "An exception occurred during a WebClient request."
2024-12-12T10:35:02+01:00: windows.azure-arm.windowsbuildserver: WARNING: Waiting 30 seconds before retrying (retries left: 20)...
2024-12-12T09:19:16+01:00: ==> windows.azure-arm.windowsbuildserver: Get-AuthenticodeSignature : File D:\temp\install.ps1 was not found.
2024-12-12T09:19:16+01:00: ==> windows.azure-arm.windowsbuildserver: At C:\Program Files\WindowsPowerShell\Modules\ImageHelpers\InstallHelpers.ps1:980 char:18
2024-12-12T09:19:16+01:00: ==> windows.azure-arm.windowsbuildserver: + $signature = Get-AuthenticodeSignature $Path
2024-12-12T09:19:16+01:00: ==> windows.azure-arm.windowsbuildserver: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2024-12-12T09:19:16+01:00: ==> windows.azure-arm.windowsbuildserver: + CategoryInfo : ObjectNotFound: (:) [Get-AuthenticodeSignature], FileNotFoundException
2024-12-12T09:19:16+01:00: ==> windows.azure-arm.windowsbuildserver: + FullyQualifiedErrorId : SignatureCommandsBaseFileNotFound,Microsoft.PowerShell.Commands.GetAuthenticodeSignature
2024-12-12T09:19:16+01:00: ==> windows.azure-arm.windowsbuildserver: Command
2024-12-12T09:19:16+01:00: ==> windows.azure-arm.windowsbuildserver:
2024-12-12T09:19:16+01:00: ==> windows.azure-arm.windowsbuildserver: Signature status is not valid. Status:
2024-12-12T09:19:16+01:00: ==> windows.azure-arm.windowsbuildserver: At C:\Program Files\WindowsPowerShell\Modules\ImageHelpers\InstallHelpers.ps1:983 char:9
2024-12-12T09:19:16+01:00: ==> windows.azure-arm.windowsbuildserver: + throw "Signature status is not valid. Status: $($signature.St ...
2024-12-12T09:19:16+01:00: ==> windows.azure-arm.windowsbuildserver: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2024-12-12T09:19:16+01:00: ==> windows.azure-arm.windowsbuildserver: + CategoryInfo : OperationStopped: (Signature status is not valid. Status: :String) [], RuntimeException
2024-12-12T09:19:16+01:00: ==> windows.azure-arm.windowsbuildserver: + FullyQualifiedErrorId : Signature status is not valid. Status:
Repro steps
--
The text was updated successfully, but these errors were encountered: