Get-ChecksumFromUrl : Cannot bind argument to parameter 'Path' because it is null. #12635
Replies: 9 comments 1 reply
-
Hi @alpapone1 , |
Beta Was this translation helpful? Give feedback.
-
Hi @alpapone1 ,
|
Beta Was this translation helpful? Give feedback.
-
thanks for your message, we have fixed the issue by adding the TEMP_DIR variable in the variable file and in the HCL task where the PowershellCore.ps1 file was called. Now we are having issue with the download of the file for the PowershellCore.ps1 script : ==> azure-arm.image: Provisioning with powershell script: scripts/build/Install-PowershellCore.ps1 ==> azure-arm.image: Get-Item : Cannot find path 'D:\temp\w5k3vhwz.zyq' because it does not exist. Did you face this issue in your run ? Paolo Pisani |
Beta Was this translation helpful? Give feedback.
-
Hi @alpapone1 , We have analyzed our builds , didnt found an error while installation. Further , kindly use your VM size, which does have a temporary disk. Fsv2 sizes series do have such drive
|
Beta Was this translation helpful? Give feedback.
-
I have changed the vm size to "Standard_F8s_v2" and rerun the build, but still getting the same issue : azure-arm.image: Downloading package from https://github.com/PowerShell/PowerShell/releases/download/v7.4.11/hashes.sha256 to D:\temp\oldfx4pt.4fr... What else could be the problem ? Thanks |
Beta Was this translation helpful? Give feedback.
-
Hi @alpapone1 , |
Beta Was this translation helpful? Give feedback.
-
I have rerun twice the build but still getting the same error : ==> azure-arm.image: Provisioning with powershell script: scripts/build/Install-PowershellCore.ps1 Attached our config files we use to build the windows image. Please note that before refactoring we were able to create the windows image with these config files. Thanks |
Beta Was this translation helpful? Give feedback.
-
in addition I tried to replicate locally what the InstallHelpers.ps1 script does ($checksums = (Invoke-DownloadWithRetry -Url $Url -Path $tempFile | Get-Item | Get-Content) -as [string[]]) , and I get the same error with pwsh 7.5.2 : PS : I don't have D drive on my machine, I created the folder on C drive. PS C:\Users\adminlocale> $Url = "https://github.com/PowerShell/PowerShell/releases/download/v7.4.11/hashes.sha256" |
Beta Was this translation helpful? Give feedback.
-
Hi @alpapone1 , from the logs its observed that, you are using custom Packer template Kindly try to use this fix the issue.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Hi everybody,
I'm having issue by building the windows images after refactoring signature (7eede67) :
==> azure-arm.image: Provisioning with powershell script: scripts/build/Install-PowershellCore.ps1
2025/07/16 14:08:46 packer-provisioner-powershell plugin: Opening scripts/build/Install-PowershellCore.ps1 for reading
2025/07/16 14:08:46 packer-provisioner-powershell plugin: Uploading env vars to c:/Windows/Temp/packer-ps-env-vars-6877b26e-94a8-9968-2090-81fa9a896294.ps1
2025/07/16 14:08:46 packer-provisioner-powershell plugin: [INFO] 100 bytes written for 'uploadData'
2025/07/16 14:08:46 [INFO] 100 bytes written for 'uploadData'
2025/07/16 14:08:47 packer-provisioner-powershell plugin: [INFO] 2132 bytes written for 'uploadData'
2025/07/16 14:08:47 [INFO] 2132 bytes written for 'uploadData'
==> azure-arm.image: Get-ChecksumFromUrl : Cannot bind argument to parameter 'Path' because it is null.
==> azure-arm.image: At C:\Windows\Temp\script-6877b26e-fb0a-913b-cadc-d22b1c6f9e10.ps1:27 char:21
==> azure-arm.image: + $externalHash = Get-ChecksumFromUrl -Type "SHA256" `
==> azure-arm.image: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
==> azure-arm.image: + CategoryInfo : InvalidData: (:) [Get-ChecksumFromUrl], ParameterBindingValidationException
==> azure-arm.image: + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Get-ChecksumFromUrl
Could you please advise what should be done to fix it ?
Thank you
Paolo Pisani
Platforms affected
Runner images affected
Image version and build link
Starting: Initialize job
Agent name: 'xxx-iac-ado-agent-mwjsk-hfbkb'
Agent machine name: 'xxx-iac-ado-agent-mwjsk-hfbkb'
Current agent version: '4.258.1'
Agent running as: 'ado'
Prepare build directory.
Set build variables.
Download all required tasks.
Downloading task: Bash (3.259.0)
Downloading task: AzureKeyVault (2.259.1)
Downloading task: AzureCLI (2.259.1)
Checking job knob settings.
Knob: ContinueAfterCancelProcessTreeKillAttempt = true Source: $(VSTSAGENT_CONTINUE_AFTER_CANCEL_PROCESSTREEKILL_ATTEMPT)
Knob: ProcessHandlerSecureArguments = false Source: $(AZP_75787_ENABLE_NEW_LOGIC)
Knob: ProcessHandlerSecureArguments = false Source: $(AZP_75787_ENABLE_NEW_LOGIC_LOG)
Knob: ProcessHandlerTelemetry = true Source: $(AZP_75787_ENABLE_COLLECT)
Knob: UseNewNodeHandlerTelemetry = True Source: $(DistributedTask.Agent.USENEWNODEHANDLERTELEMETRY)
Knob: ProcessHandlerEnableNewLogic = true Source: $(AZP_75787_ENABLE_NEW_PH_LOGIC)
Knob: EnableResourceMonitorDebugOutput = true Source: $(AZP_ENABLE_RESOURCE_MONITOR_DEBUG_OUTPUT)
Knob: EnableResourceUtilizationWarnings = true Source: $(AZP_ENABLE_RESOURCE_UTILIZATION_WARNINGS)
Knob: IgnoreVSTSTaskLib = true Source: $(AZP_AGENT_IGNORE_VSTSTASKLIB)
Knob: FailJobWhenAgentDies = true Source: $(FAIL_JOB_WHEN_AGENT_DIES)
Knob: CheckForTaskDeprecation = true Source: $(AZP_AGENT_CHECK_FOR_TASK_DEPRECATION)
Knob: CheckIfTaskNodeRunnerIsDeprecated246 = False Source: $(DistributedTask.Agent.CheckIfTaskNodeRunnerIsDeprecated246)
Knob: UseNode20ToStartContainer = True Source: $(DistributedTask.Agent.UseNode20ToStartContainer)
Knob: LogTaskNameInUserAgent = true Source: $(AZP_AGENT_LOG_TASKNAME_IN_USERAGENT)
Knob: UseFetchFilterInCheckoutTask = true Source: $(AGENT_USE_FETCH_FILTER_IN_CHECKOUT_TASK)
Knob: Rosetta2Warning = true Source: $(ROSETTA2_WARNING)
Knob: AddForceCredentialsToGitCheckout = True Source: $(DistributedTask.Agent.AddForceCredentialsToGitCheckout)
Knob: UseSparseCheckoutInCheckoutTask = true Source: $(AGENT_USE_SPARSE_CHECKOUT_IN_CHECKOUT_TASK)
Is it regression?
No
Expected behavior
The script scripts/build/Install-PowershellCore.ps1 should continue without error
Actual behavior
The script scripts/build/Install-PowershellCore.ps1 should not exit with such error
Repro steps
Create a Windows 2022 image by packer hcl file
Beta Was this translation helpful? Give feedback.
All reactions