Skip to content

Hash Mismatch #3517

@briangadepro

Description

@briangadepro

Describe the bug

Running Install-Module -Name 'Microsoft.Graph.Authentication' -Force -Verbose results in an error saying the hash for the package does not match the hash provided from the server and "End of Central Directory record could not be found." This happens for other Microsoft.Graph.* modules as well. I've tested from multiple devices on multiple networks using multiple internet connections and all see the same result. Adding -MaximumVersion 2.34.0 allows for successful installation, so this appears to be a new bug with 2.35.0.

Expected behavior

The module installs/updates successfully.

How to reproduce

Install-Module -Name 'Microsoft.Graph.Authentication' -Force -Verbose

SDK Version

2.35.0

Latest version known to work for scenario above?

2.34.0

Known Workarounds

Use previous version

Debug output

Install-Module -Name 'Microsoft.Graph.Authentication' -Force -Debug
DEBUG: 00:00:00.0000093 Calling New() : MethodName = 'GetDynamicOptions'
DEBUG: 00:00:00.0000327 Debug: True
DEBUG: 00:00:00.0000430 Name: Microsoft.Graph.Authentication
DEBUG: 00:00:00.0000498 Force: True
DEBUG: 00:00:00.0020510 INVOKING PowerShell Fn Get-DynamicOptions with args Provider that has length 1
DEBUG: 00:00:00.0064330 In PowerShellGet Provider - 'Get-DynamicOptions'.
DEBUG: 00:00:00.0098577 Done calling powershell «Get-DynamicOptions» «PSModule»
DEBUG: 00:00:00.0152991 Calling New() : MethodName = 'GetDynamicOptions'
DEBUG: 00:00:00.0153137 Debug: True
DEBUG: 00:00:00.0153220 Name: Microsoft.Graph.Authentication
DEBUG: 00:00:00.0153276 Force: True
DEBUG: 00:00:00.0170750 INVOKING PowerShell Fn Get-DynamicOptions with args Source that has length 1
DEBUG: 00:00:00.0201727 In PowerShellGet Provider - 'Get-DynamicOptions'.
DEBUG: 00:00:00.0239959 Done calling powershell «Get-DynamicOptions» «PSModule»
DEBUG: 00:00:00.0293163 Calling New() : MethodName = 'GetDynamicOptions'
DEBUG: 00:00:00.0293388 Debug: True
DEBUG: 00:00:00.0293454 Name: Microsoft.Graph.Authentication
DEBUG: 00:00:00.0293532 Force: True
DEBUG: 00:00:00.0311914 INVOKING PowerShell Fn Get-DynamicOptions with args Package that has length 1
DEBUG: 00:00:00.0341435 In PowerShellGet Provider - 'Get-DynamicOptions'.
DEBUG: 00:00:00.0393343 Done calling powershell «Get-DynamicOptions» «PSModule»
DEBUG: 00:00:00.0449512 Calling New() : MethodName = 'GetDynamicOptions'
DEBUG: 00:00:00.0449650 Debug: True
DEBUG: 00:00:00.0449716 Name: Microsoft.Graph.Authentication
DEBUG: 00:00:00.0449799 Force: True
DEBUG: 00:00:00.0467103 INVOKING PowerShell Fn Get-DynamicOptions with args Install that has length 1
DEBUG: 00:00:00.0494869 In PowerShellGet Provider - 'Get-DynamicOptions'.
DEBUG: 00:00:00.0537533 Done calling powershell «Get-DynamicOptions» «PSModule»
DEBUG: 00:00:00.0685424 Calling SearchForPackages. Name='Microsoft.Graph.Authentication'
VERBOSE: Using the provider 'PowerShellGet' for searching packages.

Confirm
Continue with this operation?
[Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"): a
DEBUG: 00:00:00.0705335 PackageProvider::FindPackage with name Microsoft.Graph.Authentication
DEBUG: 00:00:00.0723333 Calling SearchForPackages After Select 1
DEBUG: 00:00:04.4542278 Calling New() : MethodName = 'FindPackage'
DEBUG: 00:00:04.4548180 Force: True
DEBUG: 00:00:04.4553217 ProviderName: PowerShellGet
DEBUG: 00:00:04.4557773 Scope: CurrentUser
DEBUG: 00:00:04.4561563 Debug: True
DEBUG: 00:00:04.4565069 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:04.4568445 Type: Module
DEBUG: 00:00:04.4572326 Name: Microsoft.Graph.Authentication
DEBUG: 00:00:04.4609440 INVOKING PowerShell Fn Find-Package with args System.String[], , , that has length 4
DEBUG: 00:00:04.4640299 In PowerShellGet Provider - 'Find-Package'.
DEBUG: 00:00:04.4643161 OPTION: Force => True
DEBUG: 00:00:04.4645620 OPTION: ProviderName => PowerShellGet
DEBUG: 00:00:04.4648600 OPTION: Scope => CurrentUser
DEBUG: 00:00:04.4650983 OPTION: Debug => True
DEBUG: 00:00:04.4653446 OPTION: MessageResolver => Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:04.4655960 OPTION: Type => Module
DEBUG: 00:00:04.4658499 OPTION: Name => Microsoft.Graph.Authentication
VERBOSE: The -Repository parameter was not specified. PowerShellGet will use all of the registered repositories.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2' and PackageManagementProvider is 'NuGet'.
DEBUG: 00:00:04.4692870 PackageProvider::FindPackage with name Microsoft.Graph.Authentication
DEBUG: 00:00:04.4760650 Calling 'NuGet'::'FindPackage' - name='Microsoft.Graph.Authentication', requiredVersion='',minimumVersion='', maximumVersion='''.
DEBUG: 00:00:04.4766425 Iterating 'Microsoft.Graph.Authentication'.
DEBUG: 00:00:04.4790353 There are '1' registered sources in 'NuGet' provider.
DEBUG: 00:00:04.4796228 Source 'https://www.powershellgallery.com/api/v2' is not one of the registered sources in 'NuGet' provider.
DEBUG: 00:00:04.4803767 Source 'https://www.powershellgallery.com/api/v2' is validated.
DEBUG: 00:00:04.4808410 Calling 'NuGetRequest'::'GetPackageById', 'Microsoft.Graph.Authentication'.
DEBUG: 00:00:04.4812154 Calling 'NuGetPackageRepository'::'FindPackagesById', 'Microsoft.Graph.Authentication'.
DEBUG: 00:00:04.4815967 Calling 'NuGetPackageFeed2'::'FindPackage', 'Microsoft.Graph.Authentication'.
DEBUG: 00:00:04.4819841 Calling 'NuGetClient'::'FindPackage'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.Graph.Authentication'' for ''.
DEBUG: 00:00:04.4826725 Downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.Graph.Authentication'&$skip=0&$top=40'.
DEBUG: 00:00:04.5866108 Completed downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.Graph.Authentication'&$skip=0&$top=40'.
DEBUG: 00:00:04.5900038 Downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.Graph.Authentication'&$skip=0&$top=40'.
DEBUG: 00:00:04.6407929 Completed downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.Graph.Authentication'&$skip=0&$top=40'.
DEBUG: 00:00:04.6454448 Downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.Graph.Authentication'&$skip=40&$top=40'.
DEBUG: 00:00:04.6455104 Downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.Graph.Authentication'&$skip=120&$top=40'.
DEBUG: 00:00:04.6455694 Downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.Graph.Authentication'&$skip=80&$top=40'.
DEBUG: 00:00:04.6456587 Downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.Graph.Authentication'&$skip=160&$top=40'.
DEBUG: 00:00:04.6956248 Completed downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.Graph.Authentication'&$skip=40&$top=40'.
DEBUG: 00:00:04.7034461 Downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.Graph.Authentication'&$skip=200&$top=40'.
DEBUG: 00:00:04.7328820 Completed downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.Graph.Authentication'&$skip=120&$top=40'.
DEBUG: 00:00:04.7333660 '0' packages received in the last request.
DEBUG: 00:00:04.7503539 Completed downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.Graph.Authentication'&$skip=200&$top=40'.
DEBUG: 00:00:04.7508833 '0' packages received in the last request.
DEBUG: 00:00:04.7940838 Completed downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.Graph.Authentication'&$skip=160&$top=40'.
DEBUG: 00:00:04.7951914 '0' packages received in the last request.
DEBUG: 00:00:04.8346858 Completed downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.Graph.Authentication'&$skip=80&$top=40'.
DEBUG: 00:00:04.8366453 '27' packages received in the last request.
VERBOSE: Total package yield:'1' for the specified package 'Microsoft.Graph.Authentication'.
DEBUG: 00:00:04.8426252 Completed iterating for 'Microsoft.Graph.Authentication'.
DEBUG: 00:00:04.8509618 Done calling powershell «Find-Package» «PSModule»
DEBUG: 00:00:04.8687909 Calling New() : MethodName = 'GetInstalledPackages'
DEBUG: 00:00:04.8692625 Force: True
DEBUG: 00:00:04.8695687 ProviderName: PowerShellGet
DEBUG: 00:00:04.8698261 Scope: CurrentUser
DEBUG: 00:00:04.8701283 Debug: True
DEBUG: 00:00:04.8703633 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:04.8705837 Type: Module
DEBUG: 00:00:04.8707893 Name: Microsoft.Graph.Authentication
DEBUG: 00:00:04.8733128 INVOKING PowerShell Fn Get-InstalledPackage with args Microsoft.Graph.Authentication, 2.35.0, , that has length 4
DEBUG: 00:00:04.8763550 In PowerShellGet Provider - 'Get-InstalledPackage'.
DEBUG: 00:00:04.8767812 OPTION: Force => True
DEBUG: 00:00:04.8771445 OPTION: ProviderName => PowerShellGet
DEBUG: 00:00:04.8775104 OPTION: Scope => CurrentUser
DEBUG: 00:00:04.8778460 OPTION: Debug => True
DEBUG: 00:00:04.8782349 OPTION: MessageResolver => Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:04.8784882 OPTION: Type => Module
DEBUG: 00:00:04.8797935 OPTION: Name => Microsoft.Graph.Authentication
DEBUG: 00:00:05.0341338 PowerShell Script 'PSModule' Function 'Get-InstalledPackage' returns null.
DEBUG: 00:00:05.0383198 Done calling powershell «Get-InstalledPackage» «PSModule»

Confirm
Are you sure you want to perform this action?
Performing the operation "Install-Module" on target "Version '2.35.0' of module 'Microsoft.Graph.Authentication'".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): a
DEBUG: 00:00:07.8495441 Calling New() : MethodName = 'InstallPackage'
DEBUG: 00:00:07.8499598 Force: True
DEBUG: 00:00:07.8502578 ProviderName: PowerShellGet
DEBUG: 00:00:07.8505118 Scope: CurrentUser
DEBUG: 00:00:07.8507686 Debug: True
DEBUG: 00:00:07.8510164 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:07.8512453 Type: Module
DEBUG: 00:00:07.8514758 Name: Microsoft.Graph.Authentication
DEBUG: 00:00:07.8536841 INVOKING PowerShell Fn Install-Package with args NuGet|Microsoft.Graph.Authentication|2.35.0|https://www.powershellgallery.com/api/v2|Module that has length 1
DEBUG: 00:00:07.8566827 In PowerShellGet Provider - 'Install-Package'.
DEBUG: 00:00:07.8570833 In PowerShellGet Provider - 'Install-PackageUtility'.
DEBUG: 00:00:07.8573583 The FastPackageReference is 'NuGet|Microsoft.Graph.Authentication|2.35.0|https://www.powershellgallery.com/api/v2|Module'.
DEBUG: 00:00:07.8578800 OPTION: Force => True
DEBUG: 00:00:07.8581652 OPTION: ProviderName => PowerShellGet
DEBUG: 00:00:07.8584182 OPTION: Scope => CurrentUser
DEBUG: 00:00:07.8586406 OPTION: Debug => True
DEBUG: 00:00:07.8588718 OPTION: MessageResolver => Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:07.8591037 OPTION: Type => Module
DEBUG: 00:00:07.8593303 OPTION: Name => Microsoft.Graph.Authentication
VERBOSE: The installation scope is specified to be 'CurrentUser'.
VERBOSE: The specified module will be installed in 'C:\Users\bgade\Documents\PowerShell\Modules'.
DEBUG: 00:00:07.8601057 ArtifactType is Module
VERBOSE: The specified Location is 'NuGet' and PackageManagementProvider is 'NuGet'.
VERBOSE: Downloading module 'Microsoft.Graph.Authentication' with version '2.35.0' from the repository 'https://www.powershellgallery.com/api/v2'.
DEBUG: 00:00:07.9004746 Calling 'NuGet'::'InstallPackage', '$aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcnkuY29tL2FwaS92Mg==\TWljcm9zb2Z0LkdyYXBoLkF1dGhlbnRpY2F0aW9u\Mi4zNS4w\aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcnkuY29tL2FwaS92Mg==\cG93ZXJzaGVsbGdldA=='.
DEBUG: 00:00:07.9008480 Calling 'NuGetRequest'::'GetPackageByFastpath', '$aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcnkuY29tL2FwaS92Mg==\TWljcm9zb2Z0LkdyYXBoLkF1dGhlbnRpY2F0aW9u\Mi4zNS4w\aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcnkuY29tL2FwaS92Mg==\cG93ZXJzaGVsbGdldA=='.
DEBUG: 00:00:07.9012113 Calling 'NuGetRequest'::'ResolvePackageSource', 'https://www.powershellgallery.com/api/v2'.
DEBUG: 00:00:07.9015277 Calling 'NuGetRequest'::'FindRegisteredSource', 'https://www.powershellgallery.com/api/v2'.
DEBUG: 00:00:07.9018516 Source 'https://www.powershellgallery.com/api/v2' is not one of the registered sources in 'NuGet' provider.
DEBUG: 00:00:07.9873960 Calling 'NuGetPackageRepository'::'FindPackage', 'Microsoft.Graph.Authentication'.
DEBUG: 00:00:07.9878311 Calling 'NuGetPackageFeed2'::'FindPackage', 'Microsoft.Graph.Authentication'.
DEBUG: 00:00:07.9893320 Calling 'NuGetClient'::'FindPackage'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.Graph.Authentication'' for ''.
DEBUG: 00:00:07.9914178 Downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.Graph.Authentication'&$skip=0&$top=40'.
DEBUG: 00:00:08.0706088 Completed downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.Graph.Authentication'&$skip=0&$top=40'.
DEBUG: 00:00:08.0753310 Downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.Graph.Authentication'&$skip=40&$top=40'.
DEBUG: 00:00:08.0770432 Downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.Graph.Authentication'&$skip=80&$top=40'.
DEBUG: 00:00:08.0785881 Downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.Graph.Authentication'&$skip=120&$top=40'.
DEBUG: 00:00:08.0785808 Downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.Graph.Authentication'&$skip=160&$top=40'.
DEBUG: 00:00:08.1342752 Completed downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.Graph.Authentication'&$skip=40&$top=40'.
DEBUG: 00:00:08.1416957 Downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.Graph.Authentication'&$skip=200&$top=40'.
DEBUG: 00:00:08.1613984 Completed downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.Graph.Authentication'&$skip=80&$top=40'.
DEBUG: 00:00:08.1668859 '27' packages received in the last request.
DEBUG: 00:00:08.1705671 'Package version' is '2.35.0'.
DEBUG: 00:00:08.1711132 'Request's Destination' is 'C:\Users\bgade\AppData\Local\Temp\1615296787'.
DEBUG: 00:00:08.1716436 Calling 'NuGetPackageRepository'::'InstallPackage'.
DEBUG: 00:00:08.1721567 Calling 'NuGetFilesFeed2'::'InstallPackage'.
DEBUG: 00:00:08.1726124 Calling 'NuGetFilesFeed2'::'InstallPackage', '$aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcnkuY29tL2FwaS92Mg==\TWljcm9zb2Z0LkdyYXBoLkF1dGhlbnRpY2F0aW9u\Mi4zNS4w\aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcnkuY29tL2FwaS92Mg==\cG93ZXJzaGVsbGdldA=='.
DEBUG: 00:00:08.1730150 Calling 'NuGetClient'::'GetPackageDependencies'.
DEBUG: 00:00:08.1734468 Returning the call 'NuGetClient'::'GetPackageDependencies'.
DEBUG: 00:00:08.1756362 Calling 'NuGetClient'::'InstallPackage'.
VERBOSE: InstallPackage' - name='Microsoft.Graph.Authentication', version='2.35.0',destination='C:\Users\bgade\AppData\Local\Temp\1615296787'
DEBUG: 00:00:08.1776938 Completed downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.Graph.Authentication'&$skip=200&$top=40'.
VERBOSE: DownloadPackage' - name='Microsoft.Graph.Authentication', version='2.35.0',destination='C:\Users\bgade\AppData\Local\Temp\1615296787\Microsoft.Graph.Authentication.2.35.0\Microsoft.Graph.Authentication.2.35.0.nupkg', uri='https://www.powershellgallery.com/api/v2/package/Microsoft.Graph.Authentication/2.35.0'
VERBOSE: Downloading 'https://www.powershellgallery.com/api/v2/package/Microsoft.Graph.Authentication/2.35.0'.
DEBUG: 00:00:08.2578433 Completed downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.Graph.Authentication'&$skip=160&$top=40'.
DEBUG: 00:00:08.2806678 Completed downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='Microsoft.Graph.Authentication'&$skip=120&$top=40'.
VERBOSE: Completed downloading 'https://www.powershellgallery.com/api/v2/package/Microsoft.Graph.Authentication/2.35.0'.
VERBOSE: Completed downloading 'Microsoft.Graph.Authentication'.
VERBOSE: Hash for package 'Microsoft.Graph.Authentication' does not match hash provided from the server.
DEBUG: 00:00:08.3326779 Calling 'NuGetClient'::'InstallPackageLocal'.
VERBOSE: InstallPackageLocal' - name='Microsoft.Graph.Authentication', version='2.35.0',destination='C:\Users\bgade\AppData\Local\Temp\1615296787'
DEBUG: 00:00:08.3366283 C:\Users\bgade\AppData\Local\Temp\1615296787\Microsoft.Graph.Authentication.2.35.0\Microsoft.Graph.Authentication.2.35.0.nupkg
DEBUG: 00:00:08.3400113 System.IO.InvalidDataException: End of Central Directory record could not be found.
at System.IO.Compression.ZipArchive.ReadEndOfCentralDirectory()
at System.IO.Compression.ZipArchive..ctor(Stream stream, ZipArchiveMode mode, Boolean leaveOpen, Encoding entryNameEncoding)
at System.IO.Compression.ZipFile.Open(String archiveFileName, ZipArchiveMode mode, Encoding entryNameEncoding)
at System.IO.Compression.ZipFile.ExtractToDirectory(String sourceArchiveFileName, String destinationDirectoryName, Encoding entryNameEncoding, Boolean overwriteFiles)
at Microsoft.PackageManagement.NuGetProvider.PackageUtility.DecompressFile(String fullZipPath)
at Microsoft.PackageManagement.NuGetProvider.NuGetClient.InstallPackageLocal(String packageName, String version, NuGetRequest request, PackageSource source, String sourceFilePath, ProgressTracker progressTracker)
Install-Package: Package 'Microsoft.Graph.Authentication' failed to be installed because: End of Central Directory record could not be found.

Configuration

$PSVersionTable

Name Value


PSVersion 7.5.4
PSEdition Core
GitCommitId 7.5.4
OS Microsoft Windows 10.0.26100
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

Windows 11 24H2 Enterprise x64

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:waiting-for-triageAn issue that is yet to be reviewed or assignedtype:bugA broken experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions