microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
23.09k stars 1.44k forks source link

Error upgrading PostgreSQL 15 version 15.3.1 #3722

Open johanvanmol opened 1 year ago

johanvanmol commented 1 year ago

Brief description of your issue

When using winget upgrade --all

Upgrading PostgreSQL fails most of the times. This is the error message: WindowsTerminal_Winget_Postgres error

Other upgrades succeed.

The URL https://get.enterprisedb.com/postgresql/postgresql-15.3-1-windows-x64.exe is working, and doesn't return a 403 when pasted into a webbrowser.

Steps to reproduce

  1. use winget to install PostgreSQL.PostgreSQL
  2. use winget upgrade --all

Expected behavior

PosgreSQL upgrades to version 15.3.1

Actual behavior

The upgrade fails

Environment

PS C:\Users\Johan> winget --info
Windows Package Manager v1.6.2701
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22621.2283
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.21.2701.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
denelon commented 1 year ago

Can you attempt upgrading just that one package with "--verbose-logs --logs" and share the resulting log file? I suspect they are not allowing the WinGet user-agent string to succeed on their server/CDN.

johanvanmol commented 1 year ago

This is the resulting log file of running winget upgrade PostgreSQL.PostgreSQL --verbose-logs --logs WinGet-2023-10-03-08-50-57.365.log

denelon commented 1 year ago

This section of the log below is where I'm seeing trouble.

You could try changing your winget settings use use "wininet" rather than "do" (Delivery Optimization) as the default downloader.

https://github.com/microsoft/winget-cli/blob/master/doc/Settings.md#network

2023-10-03 08:51:00.808 [CORE] DeliveryOptimization downloading from url: https://get.enterprisedb.com/postgresql/postgresql-15.3-1-windows-x64.exe
2023-10-03 08:51:01.733 [CORE] DO State 1, 0 / 0, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:03.136 [CORE] DO State 1, 1048576 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:04.476 [CORE] DO State 1, 11534336 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:05.774 [CORE] DO State 1, 19922944 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:06.836 [CORE] DO State 1, 26214400 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:07.867 [CORE] DO State 1, 31457280 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:09.152 [CORE] DO State 1, 38797312 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:10.302 [CORE] DO State 1, 42991616 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:11.595 [CORE] DO State 1, 48234496 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:12.909 [CORE] DO State 1, 54525952 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:14.226 [CORE] DO State 1, 60817408 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:15.623 [CORE] DO State 1, 67108864 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:16.626 [CORE] DO State 1, 72351744 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:17.677 [CORE] DO State 1, 77594624 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:18.772 [CORE] DO State 1, 82837504 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:19.960 [CORE] DO State 1, 89128960 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:21.194 [CORE] DO State 1, 95420416 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:22.196 [CORE] DO State 1, 100663296 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:23.317 [CORE] DO State 1, 105906176 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:24.545 [CORE] DO State 1, 112197632 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:25.844 [CORE] DO State 1, 118489088 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:27.057 [CORE] DO State 1, 124780544 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:28.480 [CORE] DO State 1, 131072000 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:29.549 [CORE] DO State 1, 135266304 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:30.734 [CORE] DO State 1, 138412032 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:31.779 [CORE] DO State 1, 142606336 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:32.992 [CORE] DO State 1, 146800640 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:34.180 [CORE] DO State 1, 150994944 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:35.434 [CORE] DO State 1, 154140672 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:35.508 [CORE] DO State 5, 155189248 / 336432992, Error 0x80190193, extended error 0x00000000
2023-10-03 08:51:35.508 [CORE] DeliveryOptimization error: 0x80190193, extended error: 0x00000000
2023-10-03 08:51:35.508 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerCommonCore\DODownloader.cpp(289)\WindowsPackageManager.dll!00007FF8E4838995: (caller: 00007FF8E4839231) Exception(1) tid(649c) 80190193 Verboden (403).
Yiniau commented 1 year ago

This section of the log below is where I'm seeing trouble.

You could try changing your winget settings use use "wininet" rather than "do" (Delivery Optimization) as the default downloader.

https://github.com/microsoft/winget-cli/blob/master/doc/Settings.md#network

2023-10-03 08:51:00.808 [CORE] DeliveryOptimization downloading from url: https://get.enterprisedb.com/postgresql/postgresql-15.3-1-windows-x64.exe
2023-10-03 08:51:01.733 [CORE] DO State 1, 0 / 0, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:03.136 [CORE] DO State 1, 1048576 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:04.476 [CORE] DO State 1, 11534336 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:05.774 [CORE] DO State 1, 19922944 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:06.836 [CORE] DO State 1, 26214400 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:07.867 [CORE] DO State 1, 31457280 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:09.152 [CORE] DO State 1, 38797312 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:10.302 [CORE] DO State 1, 42991616 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:11.595 [CORE] DO State 1, 48234496 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:12.909 [CORE] DO State 1, 54525952 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:14.226 [CORE] DO State 1, 60817408 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:15.623 [CORE] DO State 1, 67108864 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:16.626 [CORE] DO State 1, 72351744 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:17.677 [CORE] DO State 1, 77594624 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:18.772 [CORE] DO State 1, 82837504 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:19.960 [CORE] DO State 1, 89128960 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:21.194 [CORE] DO State 1, 95420416 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:22.196 [CORE] DO State 1, 100663296 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:23.317 [CORE] DO State 1, 105906176 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:24.545 [CORE] DO State 1, 112197632 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:25.844 [CORE] DO State 1, 118489088 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:27.057 [CORE] DO State 1, 124780544 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:28.480 [CORE] DO State 1, 131072000 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:29.549 [CORE] DO State 1, 135266304 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:30.734 [CORE] DO State 1, 138412032 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:31.779 [CORE] DO State 1, 142606336 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:32.992 [CORE] DO State 1, 146800640 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:34.180 [CORE] DO State 1, 150994944 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:35.434 [CORE] DO State 1, 154140672 / 336432992, Error 0x00000000, extended error 0x00000000
2023-10-03 08:51:35.508 [CORE] DO State 5, 155189248 / 336432992, Error 0x80190193, extended error 0x00000000
2023-10-03 08:51:35.508 [CORE] DeliveryOptimization error: 0x80190193, extended error: 0x00000000
2023-10-03 08:51:35.508 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerCommonCore\DODownloader.cpp(289)\WindowsPackageManager.dll!00007FF8E4838995: (caller: 00007FF8E4839231) Exception(1) tid(649c) 80190193 Verboden (403).

wininet not help for me

johanvanmol commented 1 year ago

You could try changing your winget settings use use "wininet" rather than "do" (Delivery Optimization) as the default downloader.

https://github.com/microsoft/winget-cli/blob/master/doc/Settings.md#network

Thank you denelon, I changed this setting, and PostgreSQL has now successfully downloaded and upgraded.

afbeelding

kingsley-3z3nw4k4 commented 11 months ago

Newbie here. I had the same issue, and @denelon's suggestion worked for me as well:

You could try changing your winget settings use use "wininet" rather than "do" (Delivery Optimization) as the default downloader.

https://github.com/microsoft/winget-cli/blob/master/doc/Settings.md#network

Although I also increased the 'doProgressTimeOutInSeconds' variable to 120, just in case it was my slow network timing out. Newbie mistake: I initially couldn't get the new settings to apply until I noticed that the braces { } indents were not lining up; once I fixed that and saved, all worked.

settings progress