Skip to content
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

"The Server Certificate did not match any of the expected values" #3444

Closed
DarylGraves opened this issue Jul 17, 2023 · 5 comments
Closed

"The Server Certificate did not match any of the expected values" #3444

DarylGraves opened this issue Jul 17, 2023 · 5 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Milestone

Comments

@DarylGraves
Copy link

Brief description of your issue

Just imaged my Windows 11 and ran Winget to install some applications. Every attempt to install an app returns this:

Failed when searching source: msstore An unexpected error occurred while executing the command: 0x8a15005e : The server certificate did not match any of the expected values.

Google tells me it's more likely SSL Interception but I have no SSL Interception configured. This laptop is going straight to the home WiFi. No VPN, No Ad-Blocker.

My Desktop Computer is running Winget fine, same Network, the only difference is the Desktop is on the LAN.

The only thing I've done "odd" is I tried to run Winget from a powershell script. Is there a T&C you need to accept for MS Store before it'll work? If so, is there a way to bring it back up because I can't find it.

Steps to reproduce

Fresh build of Windows 11 Home (22H2), OS Build 22621.1992 with all Windows Updates (tried restoring laptop to factory settings too)
Run winget install $app

Expected behavior

I expected the app to install.

Actual behavior

Failed when searching source: msstore An unexpected error occurred while executing the command: 0x8a15005e : The server certificate did not match any of the expected values.

Environment

Windows: Windows.Desktop v10.0.22621.1992
System Architecture: X64
Package: Microsoft.DesktopAppInstaller: V1.19.10173.0
@DarylGraves
Copy link
Author

Ok I've just found the issue. Choosing to factory reset Windows 11 from the Control Panel, even when choosing the option to download all the files from the internet, installs v1.4.10173 which I now understand is broken...

Weird as my machine is saying it's fully 100% up to date on Windows Updates and yet I'm still on v1.4 whereas My desktop is on v1.5.

I'll leave this open in case this is something you weren't aware of - It sounds like winget is potentially broken for anyone on a new machine?

@Trenly
Copy link
Contributor

Trenly commented Jul 18, 2023

Because of how windows installation works on a clean install, winget doesn’t register itself until after several of the other windows components. The Microsoft Store update service should update the version of winget included in a clean install of Windows, but it may take some time as several other components also receive updates immediately upon install. So yes, it may be broken for a new install, but it should also fix itself if given sufficient time (at least in theory).

@DarylGraves
Copy link
Author

Because of how windows installation works on a clean install, winget doesn’t register itself until after several of the other windows components. The Microsoft Store update service should update the version of winget included in a clean install of Windows, but it may take some time as several other components also receive updates immediately upon install. So yes, it may be broken for a new install, but it should also fix itself if given sufficient time (at least in theory).

Thank you! For what it's worth I did check I'm fully up to date on my patches but I guess it's done through the Windows Store or something?

Untitled

@denelon denelon added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Jul 19, 2023
@denelon
Copy link
Contributor

denelon commented Jul 19, 2023

For others looking at this issue:
https://github.com/microsoft/winget-cli/releases/tag/v1.4.11071 is the first release with the fix for the certificate changes. It was released ahead of the change and the version shipped with earlier versions of Windows needs to be updated to this version at a minimum to receive the updated certificate.

In all likelihood updating the App in the Microsoft Store will get the latest 1.5 version.

@denelon denelon added this to the v1.6 Client milestone Jul 19, 2023
@denelon denelon closed this as completed Jul 19, 2023
@Tataz2
Copy link

Tataz2 commented Apr 23, 2024

C:\Windows\system32>winget -v
v1.5.2201

Cannot install any packages.
Failed when opening source(s); try the 'source reset' command if the problem persists.

winget source reset does not help.

If I install winget by command
Add-AppxPackage -Path https://cdn.winget.microsoft.com/cache/source.msix

The version is still the same

C:\Windows\system32>winget -v
v1.5.2201

but now I get an error:

Failed in attempting to update the source: winget
Failed when searching source: msstore
An unexpected error occurred while executing the command:
0x8a15005e : The server certificate did not match any of the expected values.
PS C:\Windows\system32> winget source update
Updating all sources...
Updating source: msstore...
Done
Updating source: winget...
Cancelled

I have tried to update Winget by installing Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.txt.msixbundle
Add-AppxPackage -Path "https://aka.ms/getwinget"
but even it's msixbundle it doesn't work.

Windows cannot install package Microsoft.DesktopAppInstaller_1.22.11132.0_x64__8wekyb3d8bbwe because this package depen
ds on a framework that could not be found. Provide the framework "Microsoft.UI.Xaml.2.8" published by "CN=Microsoft Cor
poration, O=Microsoft Corporation, L=Redmond, S=Washington, C=US", with neutral or x64 processor architecture and minim
um version 8.2310.30001.0, along with this package to install. The frameworks with name "Microsoft.UI.Xaml.2.8" current
ly installed are: {Microsoft.UI.Xaml
Windows cannot install package Microsoft.DesktopAppInstaller_1.22.11132.0_x64__8wekyb3d8bbwe because this package depen
ds on a framework that could not be found. Provide the framework "Microsoft.UI.Xaml.2.8" published by "CN=Microsoft Cor
poration, O=Microsoft Corporation, L=Redmond, S=Washington, C=US", with neutral or x64 processor architecture and minim
um version 8.2310.30001.0, along with this package to install. The frameworks with name "Microsoft.UI.Xaml.2.8" current
ly installed are: {Microsoft.UI.Xaml.2.8_8.2306.22001.0_x64__8wekyb3d8bbwe Microsoft.UI.Xaml.2.8_8.2306.22001.0_x86__8w
ekyb3d8bbwe}
NOTE: For additional information, look for [ActivityId] 1c44a6e6-9617-0000-d3bf-441c1796da01 in the Event Log or use th
e command line Get-AppPackageLog -ActivityID 1c44a6e6-9617-0000-d3bf-441c1796da01

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

No branches or pull requests

4 participants