winget-cli: InternetOpenUrl() failed. 0x80072efd : unknown error
Brief description of your issue
This is very similar to #326, however I have TLS 1.2 enabled and I can access the cache fine outside winget
.
Steps to reproduce
C:\WINDOWS\system32>winget --version
v0.1.42241 Preview
C:\WINDOWS\system32>winget search github
Failed to open the source; try removing and re-adding it
An unexpected error occurred while executing the command:
InternetOpenUrl() failed.
0x80072efd : unknown error
C:\WINDOWS\system32>winget source list
Name Argument
-----------------------------------------
winget https://winget.azureedge.net/cache
C:\WINDOWS\system32>winget source reset --force
Resetting all sources...Done
C:\WINDOWS\system32>winget source update
Updating all sources...
Updating source: winget...
An unexpected error occurred while executing the command:
InternetOpenUrl() failed.
0x80072efd : unknown error
C:\WINDOWS\system32>winget source add --name test https://winget.azureedge.net/cache
Adding source:
test -> https://winget.azureedge.net/cache
An unexpected error occurred while executing the command:
A connection with the server could not be established
C:\WINDOWS\system32>curl https://winget.azureedge.net/cache
´╗┐<?xml version="1.0" encoding="utf-8"?><Error><Code>ResourceNotFound</Code><Message>The specified resource does not exist.
RequestId:a5bc7e36-e01e-009c-76ff-88e0ac000000
Time:2020-09-12T12:24:09.5326840Z</Message></Error>
Expected behavior
winget
should function
Actual behavior
winget
does not function
Environment
C:\WINDOWS\system32>winget --info
Windows Package Manager v0.1.42241 Preview
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.18362.1016
Package: Microsoft.DesktopAppInstaller v1.10.42241.0
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 20 (3 by maintainers)
Hi, can’t recall my last winget use, maybe 2 weeks ago? Now, I get
5 upgrades available. An unexpected error occurred while executing the command: InternetOpenUrl() failed. 0x80072f05 : unknown error
I had error 0x80072f7d in winget. Strange fix for this is enabling tls 1.2 in internet explorer settings.
Related issues: https://github.com/microsoft/winget-cli/issues/2956
Thanks for the suggestion. It doesn’t work in my case, but I think it’s because the Cisco Umbrella basically does some sort of MITM SSL for sites it’s blocking for non-VPN authenticated users. (I can see it if I use the URL with the error in a browser.) It’s annoying, and VPN doesn’t really help me in my case, I still need to to everything through a Citrix Virtual Desktop anyway, so I mostly don’t log it in…
The error codes of InternetOpenUrl should get mapped to a descriptive string and displayed. E.g. 0x80072efd maps to ERROR_INTERNET_CANNOT_CONNECT. I had a similar error the other day where the TLS certificate of a download was invalid. I found out by looking up the error code. “unknown error” suggests it’s a generic error code but it’s actually not.
@Lexicality we don’t get an explicit indication that the firewall is blocking the connection. I’m looking at what we can do in the error text, and getting an update at docs.microsoft.com.