winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

Winget upgrade or install fails

Open NVT223 opened this issue 1 year ago • 14 comments

Brief description of your issue

I can't install any software or upgrade on Winget

Steps to reproduce

winget install 7zip.7zip

Expected behavior

error

Actual behavior

I don'i know

Environment

winget install 7zip.7zip
Failed in attempting to update the source: winget
An unexpected error occurred while executing the command:
InternetOpenUrl() failed.
0x80072efd : unknown error

NVT223 avatar Oct 28 '23 05:10 NVT223

Can't update and show completely wrong info.

winget search -q "Microsoft.Powershell"
Failed in attempting to update the source: winget
Name               Id                           Version Source
---------------------------------------------------------------
PowerShell         Microsoft.PowerShell         7.3.5.0 winget
PowerShell Preview Microsoft.PowerShell.Preview 7.4.0.4 winget

I don't have 7.3.5 installed, I have 7.3.8 and trying to upgrade to 7.3.9 !!

eabase avatar Oct 28 '23 17:10 eabase

If you run winget list powershell how many entries do you see?

denelon avatar Oct 30 '23 14:10 denelon

I get: winget update --id microsoft.powershell --version 7.3.9.0 --source winget in pwsh at 10:09:34 No available upgrade found. No newer package versions are available from the configured sources. Though starting powershell: A new PowerShell stable release is available: v7.3.9 Upgrade now, or check out the release page at: https://aka.ms/PowerShell-Release?tag=v7.3.9 Que?

verrierRoberts avatar Oct 31 '23 10:10 verrierRoberts

If you run winget list powershell how many entries do you see?

2:

Name             Id                        Version     Source
--------------------------------------------------------------
PowerShell 7-x64 Microsoft.PowerShell      7.3.9.0     winget
Windows Terminal Microsoft.WindowsTerminal 1.18.2822.0 winget

eabase avatar Nov 02 '23 16:11 eabase

@NVT223 which version of WinGet is installed?

Run winget --info and share the results please.

denelon avatar Nov 02 '23 17:11 denelon

winget --info

Here:

PS C:\windows\system32> winget --info Windows Package Manager v1.6.2771 Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19045.3570 System Architecture: X64 Package: Microsoft.DesktopAppInstaller v1.21.2771.0

Winget Directories

Logs %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag… User Settings %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett… Portable Links Directory (User) %LOCALAPPDATA%\Microsoft\WinGet\Links Portable Links Directory (Machine) C:\Program Files\WinGet\Links Portable Package Root (User) %LOCALAPPDATA%\Microsoft\WinGet\Packages Portable Package Root C:\Program Files\WinGet\Packages Portable Package Root (x86) C:\Program Files (x86)\WinGet\Packages Installer Downloads %USERPROFILE%\Downloads

Links

Privacy Statement https://aka.ms/winget-privacy License Agreement https://aka.ms/winget-license Third Party Notices https://aka.ms/winget-3rdPartyNotice Homepage https://aka.ms/winget Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting State

LocalManifestFiles Disabled BypassCertificatePinningForMicrosoftStore Disabled InstallerHashOverride Disabled LocalArchiveMalwareScanOverride Disabled

NVT223 avatar Nov 03 '23 09:11 NVT223

You could try changing your default download provider to "wininet" in WinGet settings. The URL at the bottom of the help output will take you to the settings page so you can see how to make the change.

PS C:\Users\denelon> winget settings -?
Windows Package Manager (Preview) v1.7.2782-preview
Copyright (c) Microsoft Corporation. All rights reserved.

Open settings in the default json text editor. If no editor is configured, opens settings in notepad. For available settings see https://aka.ms/winget-settings This command can also be used to set administrator settings by providing the --enable or --disable arguments

usage: winget settings [<command>] [<options>]

The following command aliases are available:
  config

The following sub-commands are available:
  export  Export settings

For more details on a specific command, pass it the help argument. [-?]

The following options are available:
  --enable                  Enables the specific administrator setting
  --disable                 Disables the specific administrator setting
  -?,--help                 Shows help about the selected command
  --wait                    Prompts the user to press any key before exiting
  --logs,--open-logs        Open the default logs location
  --verbose,--verbose-logs  Enables verbose logging for winget
  --disable-interactivity   Disable interactive prompts

More help can be found at: https://aka.ms/winget-settings

denelon avatar Nov 06 '23 16:11 denelon

choco upgrade epicgameslauncher Chocolatey v2.2.2 Upgrading the following packages: epicgameslauncher By upgrading, you accept licenses for the packages. epicgameslauncher is not installed. Installing... Unable to load the service index for source https://community.chocolatey.org/api/v2/. The request was aborted: Could not create SSL/TLS secure channel. For more information on this issue and guidance in resolving the problem, see https://ch0.co/t/svcidx Unable to connect to source 'https://community.chocolatey.org/api/v2/': Object reference not set to an instance of an object. epicgameslauncher not installed. The package was not found with the source(s) listed. Source(s): 'https://community.chocolatey.org/api/v2/' NOTE: When you specify explicit sources, it overrides default sources. If the package version is a prerelease and you didn't specify --pre, the package may not be found. Please see https://docs.chocolatey.org/en-us/troubleshooting for more assistance.

Chocolatey upgraded 0/1 packages. 1 packages failed. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures

  • epicgameslauncher - epicgameslauncher not installed. The package was not found with the source(s) listed. Source(s): 'https://community.chocolatey.org/api/v2/' NOTE: When you specify explicit sources, it overrides default sources. If the package version is a prerelease and you didn't specify --pre, the package may not be found. Please see https://docs.chocolatey.org/en-us/troubleshooting for more assistance.

Did you know the proceeds of Pro (and some proceeds from other licensed editions) go into bettering the community infrastructure? Your support ensures an active community, keeps Chocolatey tip-top, plus it nets you some awesome features! https://chocolatey.org/compare

Plz help!!!

NVT223 avatar Nov 21 '23 05:11 NVT223

@NVT223 winget has nothing to do with chocolatey.....

Masamune3210 avatar Nov 22 '23 04:11 Masamune3210

@nvt223 - - Are you still experiencing this issue with the latest release of the cli?

Trenly avatar Mar 15 '24 04:03 Trenly

@Trenly I'm not OP but I'm still getting the issue with the latest release v1.7.10661 of the CLI:

 huyz  winget --version
v1.7.10661

 huyz  winget source update winget
Updating source: winget...
Cancelled

 huyz  winget update
Failed in attempting to update the source: winget
Name                                                      Id                           Version       Available     Source
-------------------------------------------------------------------------------------------------------------------------
Microsoft Edge                                            Microsoft.Edge               122.0.2365.80 122.0.2365.92 winget
WinSCP 6.3.1                                              WinSCP.WinSCP                6.3.1         6.3.2         winget
Microsoft Visual C++ 2015-2022 Redistributable (x86) - 1… Microsoft.VCRedist.2015+.x86 14.38.33135.0 14.40.33617.1 winget
Microsoft Visual Studio Code (User)                       Microsoft.VisualStudioCode   1.87.1        1.87.2        winget
Microsoft Visual C++ 2015-2022 Redistributable (x64) - 1… Microsoft.VCRedist.2015+.x86 14.38.33135.0 14.40.33617.1 winget
5 upgrades available.

 huyz  winget install WinSCP.WinSCP
Found an existing package already installed. Trying to upgrade the installed package...
An unexpected error occurred while executing the command:
InternetOpenUrl() failed.
0x80072f7d : unknown error

But when I open a VPN connection to another country:

 huyz  winget source update winget
Updating source: winget...
Done

 huyz  winget update
Name                                                      Id                           Version       Available     Source
-------------------------------------------------------------------------------------------------------------------------
Microsoft Edge                                            Microsoft.Edge               122.0.2365.80 122.0.2365.92 winget
WinSCP 6.3.1                                              WinSCP.WinSCP                6.3.1         6.3.2         winget
Microsoft Visual C++ 2015-2022 Redistributable (x86) - 1… Microsoft.VCRedist.2015+.x86 14.38.33135.0 14.40.33617.1 winget
Microsoft Visual Studio Code (User)                       Microsoft.VisualStudioCode   1.87.1        1.87.2        winget
Microsoft Visual C++ 2015-2022 Redistributable (x64) - 1… Microsoft.VCRedist.2015+.x86 14.38.33135.0 14.40.33617.1 winget
5 upgrades available.

 huyz  winget install WinSCP.WinSCP
Found an existing package already installed. Trying to upgrade the installed package...
Found WinSCP [WinSCP.WinSCP] Version 6.3.2
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://sourceforge.net/projects/winscp/files/WinSCP/6.3.2/WinSCP-6.3.2-Setup.exe/download
  ██████████████████████████████  11.0 MB / 11.0 MB
Successfully verified installer hash
Starting package install...
Successfully installed

Is something wrong with the Microsoft servers around the world?

huyz avatar Mar 15 '24 08:03 huyz

Check that TLS 1.2 and TLS 1.3 are enabled if you're experiencing this issue.

Location: > Internet Properties > Advanced > Use TLS 1.x

5l2 avatar Jun 01 '24 11:06 5l2

I've tried a lot of options. Only this solved it: my computer has a VPN program installed. winget can't update anything, then I start the VPN, now winget work without error.

jacattrongnlh avatar Sep 16 '24 08:09 jacattrongnlh

@jaccattrongnlh Sounds like you're in VN. If so, switch your connection from VNPT to FPT (or maybe Viettel)

huyz avatar Sep 16 '24 13:09 huyz

@jaccattrongnlh Sounds like you're in VN. If so, switch your connection from VNPT to FPT (or maybe Viettel)

You're genius, I'm from VN too. It's worked with VPN connected to my office. Doesn't know why. I'm using Viettel at home, VNPT at office.

huyxdong avatar Nov 10 '24 09:11 huyxdong

Hey guys. any news when the issue will be resolved? I see the 7zip url is unavailable at all: Image

ReshaSD avatar Dec 16 '24 18:12 ReshaSD

If you are failing to open the page in a browser, its not an issue with winget, its an issue with your connection or something deeper in the system.

Masamune3210 avatar Dec 18 '24 12:12 Masamune3210

@Masamune3210 Ok you are right. My home provider doesn't allow to download that URL. But it works in different place.

ReshaSD avatar Dec 18 '24 17:12 ReshaSD

It probably did at some point, but no longer does. Either way, that's not what this issue is about, that's just a case of the manifest being incorrect and needing to be updated.

Ok you are right. My home provider doesn't allow to download that URL. But it works in different place.

ReshaSD avatar Dec 18 '24 17:12 ReshaSD

@jaccattrongnlh Sounds like you're in VN. If so, switch your connection from VNPT to FPT (or maybe Viettel)

You're genius, I'm from VN too. It's worked with VPN connected to my office. Doesn't know why. I'm using Viettel at home, VNPT at office.

I have found an easier option: change the DNS settings to another DNS server, not the Viet Nam ISP DNS server.

atom-tr avatar Dec 23 '24 04:12 atom-tr