{"record":{"id":"0bb708209f777564","repo":"lucasg/Dependencies","slug":"x-peview-binary-has-not-correctly-been-downloade","errorCode":null,"errorMessage":"[x] Peview binary has not correctly been downloaded.","messagePattern":"\\[x\\] Peview binary has not correctly been downloaded\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"Deploy-Dependencies.ps1","lineNumber":104,"sourceCode":"  foreach ($ucrtdll in gci $UcrtFolder -File) {\n    Write-Host \"Copy ucrt dll $($ucrtdll.FullName)\";\n    Copy-Item $ucrtdll.FullName -Destination $OutputFolder;\n  }\n}\n\nfunction Get-DependenciesDeps {\n  param(\n    [String] $Binpath,\n    [String] $OutputFolder\n  )\n\n  # Download external dependencies like peview\n  $PeBuildVersion = \"3.0.2995\";\n  $PeviewBuildHash = \"2d6e76f6ff752cfbd595544ae0f967843e0fa2402700418d933d4d5d3ce2b99b\";\n  Get-PeviewBinary -BuildVersion $PeBuildVersion -Hash $PeviewBuildHash;\n  if (-not $env:PEVIEW_PATH)\n  {\n    Write-Error \"[x] Peview binary has not correctly been downloaded.\"\n  }\n\n\n  # Bundling dbghelp.dll along for undecorating names\n  Copy-SystemDll -DllName \"dbghelp.dll\" -OutputFolder $OutputFolder;\n\n  # Bundling every msvc redistribuables\n  $ClrPhLibPath = \"$($Binpath)/ClrPhLib.dll\";\n  $ClrPhLibImports = &\"$($Binpath)/Dependencies.exe\" -json -imports $ClrPhLibPath | ConvertFrom-Json;\n  foreach($DllImport in $ClrPhLibImports.Imports) {\n    \n    # vcruntime\n    if ($DllImport.Name.ToLower().StartsWith(\"vcruntime\"))\n    {\n      Copy-SystemDll -DllName $DllImport.Name -OutputFolder $OutputFolder;\n    }\n\n    # msvc","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/lucasg/Dependencies/blob/1997a40000b77bd3326cbc33672a7b9f78bb23f3/Deploy-Dependencies.ps1#L86-L122","documentation":"PowerShell Write-Error emitted by Get-DependenciesDeps in the deploy script. Get-PeviewBinary downloads a pinned Process Hacker build artifact from the AppVeyor API, verifies its SHA256 against a hardcoded hash, and only then extracts peview.exe into $env:PEVIEW_PATH. If PEVIEW_PATH is empty afterward, the download/verify/extract pipeline failed and the bundled peview.exe will be missing from the output.","triggerScenarios":"Running Deploy-Dependencies.ps1 / Get-DependenciesDeps when Get-PeviewBinary leaves $env:PEVIEW_PATH unset: the hash check at line 40 fails (artifact changed), Invoke-WebRequest/Invoke-RestMethod fails (network/AppVeyor down), the build version is gone, 7z.exe is missing so extraction fails, or Resolve-Path cannot find the extracted file.","commonSituations":"Process Hacker published a new build so the pinned $PeviewBuildHash no longer matches; the pinned $PeBuildVersion was removed from AppVeyor; CI runs offline or behind a proxy; 7z.exe is not on PATH; x86/x64 platform mismatch in the archive subfolder.","solutions":["Recompute and update $PeviewBuildHash (and $PeBuildVersion if needed) in Deploy-Dependencies.ps1 to match the current Process Hacker artifact.","Confirm network/proxy access to ci.appveyor.com and that the build/job/artifact endpoints return 200.","Ensure 7z.exe is installed and on PATH so the `&7z.exe x ...` extraction step succeeds.","Run Get-PeviewBinary manually and inspect $env:PEVIEW_PATH and the downloaded zip hash to isolate hash-mismatch vs download failure."],"exampleFix":"# before\nGet-PeviewBinary -BuildVersion $PeBuildVersion -Hash $PeviewBuildHash;\nif (-not $env:PEVIEW_PATH)\n{\n  Write-Error \"[x] Peview binary has not correctly been downloaded.\"\n}\n\n# after - fail fast with the actual reason\nGet-PeviewBinary -BuildVersion $PeBuildVersion -Hash $PeviewBuildHash;\nif (-not $env:PEVIEW_PATH)\n{\n  $zip = \"$($env:TEMP)/tmp/processhacker-build-bin.zip\"\n  $got = if (Test-Path $zip) { (Get-FileHash -Algorithm SHA256 $zip).Hash } else { '<not downloaded>' }\n  throw \"Peview download failed. expected=$PeviewBuildHash got=$got. Update the pinned hash or check network/7z.\"\n}","handlingStrategy":"validation","validationCode":"Get-PeviewBinary -BuildVersion $PeBuildVersion -Hash $PeviewBuildHash\nif (-not $env:PEVIEW_PATH) {\n    $zip = \"$($env:TEMP)/tmp/processhacker-build-bin.zip\"\n    $got = if (Test-Path $zip) { (Get-FileHash -Algorithm SHA256 $zip).Hash } else { 'missing' }\n    throw \"Peview not downloaded. expected=$PeviewBuildHash got=$got\"\n}","typeGuard":null,"tryCatchPattern":"try {\n    Get-PeviewBinary -BuildVersion $PeBuildVersion -Hash $PeviewBuildHash -ErrorAction Stop\n} catch [System.Net.WebException] {\n    Write-Warning \"Network failure downloading peview: $($_.Exception.Message)\"\n}","preventionTips":["Treat the pinned hash as a version pin: update both $PeBuildVersion and $PeviewBuildHash together.","Verify 7z.exe is on PATH and that $env:platform maps to 32bit/64bit in the archive.","Run the download step in isolation and echo the computed hash on failure for fast diagnosis."],"tags":["powershell","build","deploy","peviewer","hash-mismatch","network"],"backgroundTag":null,"analyzedSha":"1997a40000b77bd3326cbc33672a7b9f78bb23f3","analyzedAt":"2026-08-13T18:14:41.696Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}