microsoft / microsoft/MSLab

DownloadLatestCUs.ps1 - Broken - Change Int32 to Long

Open
#627 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PowerShell
Stars
1.3k
Forks
304
PR merge metrics
No merged PRs in 30d

Description

Looks like a problem downloading updates now.

I tend to get this error:

Cannot convert value "3212082007" to type "System.Int32". Error: "Value was either too large or too small for an Int32."
At C:\Program Files\WindowsPowerShell\Modules\MSCatalog\0.27.0\Classes\MSCatalogUpdate.Class.ps1:22 char:9
+         $this.SizeInBytes = [Int] $Cells[6].SelectNodes("span")[1].In ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvalidCastFromStringToInteger

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with DownloadLatestCUs.ps1 and inspect how it invokes MSCatalog, then review MSCatalogUpdate.Class.ps1 at line 22 where SizeInBytes is assigned. Reproduce the download with an update larger than the Int32 range and verify that the update completes without the conversion error.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.