v1.7.10582 `upgrade --all` fails without any errors or output
Instructions on how to reset Winget: https://github.com/microsoft/winget-cli/issues/4219#issuecomment-1975125826
Brief description of your issue
winget upgrade --silent --all suddenly fails on my system. Winget v1.7.10582.
I notice that the logs are spammed with attempting to open pinning database, last line says [REPO] Did not find a Version for { 6.0.27 }.
So maybe related to pinning? And maybe related to:
- https://github.com/microsoft/winget-cli/issues/3696#issuecomment-1962892625
Winget output:
Click to view
C:\Windows\System32>winget upgrade --silent --all --verbose-logs
Name Id Version Available Source
---------------------------------------------------------------------------------------
Signal 6.48.1 OpenWhisperSystems.Signal 6.48.1 7.0.0 winget
ONLYOFFICE Desktop Editors 8.0 (x64) ONLYOFFICE.DesktopEditors < 8.0.1 8.0.1 winget
Oh My Posh version 19.11.6 JanDeDobbeleer.OhMyPosh 19.11.6 19.11.7 winget
4 upgrades available.
The following packages have an upgrade available, but require explicit targeting for upgrade:
Name Id Version Available Source
-------------------------------------------------
Discord Discord.Discord 1.0.9017 1.0.9034 winget
1 package(s) have version numbers that cannot be determined. Use --include-unknown to see all results.
2 package(s) have pins that prevent upgrade. Use the 'winget pin' command to view and edit pins. Using the --include-pinned argument may show more results.
C:\Windows\System32>
Logs (--verbose-logs):
WinGet-2024-02-29-23-02-41.049.log
Steps to reproduce
winget upgrade --all
Expected behavior
Should upgrade all upgradable packages. If it fails it should throw an error.
Actual behavior
No packages get updated, no errors are thrown.
Environment
Windows Package Manager v1.7.10582
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.22631.3155
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.22.10582.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
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Open similar issues:
- Upgrade --all getting ignored / failing (#1985), similarity score: 0.81
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
I manually deleted %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\pinning.db, re-pinned apps I don't want updated, now it works.
Facing the same issue (also version v1.7.10582). Deleting pinning db did not resolve the issue.
@raphael-zenhaeusern-legic
Try to reset Winget? With PowerShell:
Get-AppxPackage -Name 'Microsoft.DesktopAppInstaller' | Reset-AppxPackage
Ran into the same issue today, too. I'm also on version 1.7.10582. Deleting the pinning.db did not work.
However, doing a Reset-AppxPackage as above did.
Thanks @o-l-a-v, the reset worked :+1:
@raphael-zenhaeusern-legic
Try to reset Winget? With PowerShell:
Get-AppxPackage -Name 'Microsoft.DesktopAppInstaller' | Reset-AppxPackage
I ran into this yesterday on one computer, and again today on another computer. Checked the logs and it had a bunch of repeating errors opening the pinning database.
2024-03-01 15:40:51.859 [REPO] ... opening existing pinning database
2024-03-01 15:40:51.859 [REPO] Opening database for Read at 'C:\Users\<redacted>\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\pinning.db'
2024-03-01 15:40:51.859 [REPO] Opened Pinning Index with version [1.0], last write [2023-07-11 15:54:59.000]
2024-03-01 15:40:51.859 [CLI ] Terminating context: 0x8a15002b at C:\__w\1\s\external\pkg\src\AppInstallerCLICore\Workflows\UpdateFlow.cpp:bc
I deleted the pinning.db, and that didn't change anything.
Then I tried resetting the packaged as show above, and that solved the problem.
Update --all now installs the listed updates. Thanks!
@raphael-zenhaeusern-legic
Try to reset Winget? With PowerShell:
Get-AppxPackage -Name 'Microsoft.DesktopAppInstaller' | Reset-AppxPackage
I tried it, but I get this error:
Reset-AppxPackage : The term 'Reset-AppxPackage' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:57
- ... AppxPackage -Name 'Microsoft.DesktopAppInstaller' | Reset-AppxPackage
~~~~~~~~~~~~~~~~~
- CategoryInfo : ObjectNotFound: (Reset-AppxPackage:String) [], CommandNotFoundException
- FullyQualifiedErrorId : CommandNotFoundException
It's like I don't have Reset-AppxPackage
@robertobasile84
Did you try with Windows PowerShell 5.1 (powershell.exe) too?
Edit: Also found this when searching:
- https://www.tenforums.com/software-apps/188014-reset-appxpackage.html
- https://www.reddit.com/r/PowerShell/comments/11kyhz5
Seems Reset-AppxPackage came with Windows insider build 20215.
According to this:
- https://4sysops.com/archives/fix-settings-app-crashes-in-windows-10-and-windows-11/
You can do the following instead:
Add-AppxPackage -DisableDevelopmentMode -Register (
[System.IO.Path]::Combine((Get-AppxPackage -Name 'Microsoft.DesktopAppInstaller').'InstallLocation','appxmanifest.xml')
)
Edit 2: I tried above command, but Winget did not get reset.
Edit 3: Made a workaround that seems to do the same as Reset-AppxPackage:
- See https://github.com/microsoft/winget-cli/issues/4219#issuecomment-1975125826
How to reset Winget
[!NOTE] This will reset all Winget settings.
[!WARNING] Use Windows PowerShell 5.1 (powershell.exe), not PowerShell Core (pwsh.exe).
- https://github.com/PowerShell/PowerShell/issues/13138
- https://github.com/PowerShell/PowerShell/issues/19031
How to find what Windows build you're on
Open run prompt, CMD, pwsh or PowerShell. Type winver and press enter.
Click to view
Or use winget --info, it will list Windows build.
Click to view
If on Windows 11 (build >= 20215)
# After Windows insider build 20215
Get-AppxPackage -Name 'Microsoft.DesktopAppInstaller' | Reset-AppxPackage
If on Windows 10 (build < 20215)
# Before Windows insider build 20215
## Get app in question
$App = Get-AppxPackage -Name 'Microsoft.DesktopAppInstaller'
## Delete app data
$AppDataDir = [string] [System.IO.Path]::Combine(
[System.Environment]::GetFolderPath('LocalApplicationData'),
'Packages',
$App.'PackageFamilyName'
)
[System.IO.Directory]::GetDirectories($AppDataDir).ForEach{
$null = [System.IO.Directory]::Delete($_,$true)
}
## Re-register / reinstall application
Add-AppxPackage -DisableDevelopmentMode -Register -Path (
[System.IO.Path]::Combine($App.'InstallLocation','appxmanifest.xml')
)
I am getting errors with the add-AppxPackage command:
> Get-AppxPackage -Name 'Microsoft.DesktopAppInstaller'
Get-AppxPackage: The 'Get-AppxPackage' command was found in the module 'Appx', but the module could not be loaded due to the following error: [Operation is not supported on this platform. (0x80131539)]
For more information, run 'Import-Module Appx'.
> winget --info
Windows Package Manager v1.7.10582
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.19045.4123
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.22.10582.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
though as far as I can tell, msstore and winget are down:
> winget upgrade
Failed when opening source(s); try the 'source reset' command if the problem persists.
> winget source list
Name Argument
-----------------------------------------------------
msstore https://storeedgefd.dsx.mp.microsoft.com/v9.0
winget https://cdn.winget.microsoft.com/cache
trying msstore in browser gives:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error>
<script/>
<Message>No HTTP resource was found that matches the request URI 'https://useast.storeedgefd-origin.xbetservices.akadns.net/v9.0'.</Message>
</Error>
and similarly for winget
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error>
<script/>
<Code>ResourceNotFound</Code>
<Message>The specified resource does not exist. RequestId:91cdae92-d01e-0079-2209-6ec02d000000 Time:2024-03-04T07:56:23.9195966Z</Message>
</Error>
@avicarmi
Winget is not down for me.
v7.4.1 x64
PS C:\Users\olav.birkeland> winget source update
Updating all sources...
Updating source: msstore...
Done
Updating source: winget...
Done
PS C:\Users\olav.birkeland> winget upgrade
No installed package found matching input criteria.
1 package(s) have version numbers that cannot be determined. Use --include-unknown to see all results.
2 package(s) have pins that prevent upgrade. Use the 'winget pin' command to view and edit pins. Using the --include-pinned argument may show more results.
PS C:\Users\olav.birkeland>
Try to use Windows PowerShell (powershell.exe), not PowerShell Core (pwsh.exe) for the Appx commands?
tried with powershell.exe same results:
> winget source update
Updating all sources...
Updating source: msstore...
Done
Updating source: winget...
Cancelled
and the log file:
2024-03-04 00:58:10.628 [CORE] WinGet, version [1.7.10582], activity [{02590F10-CDC2-4E40-8B38-6D1AE8E63CF0}]
2024-03-04 00:58:10.629 [CORE] OS: Windows.Desktop v10.0.19045.4123
2024-03-04 00:58:10.629 [CORE] Command line Args: "C:\Users\avi\AppData\Local\Microsoft\WindowsApps\winget.exe" source update
2024-03-04 00:58:10.629 [CORE] Package: Microsoft.DesktopAppInstaller v1.22.10582.0
2024-03-04 00:58:10.629 [CORE] IsCOMCall:0; Caller: winget-cli
2024-03-04 00:58:10.651 [CLI ] WinGet invoked with arguments: 'source' 'update'
2024-03-04 00:58:10.651 [CLI ] Found subcommand: source
2024-03-04 00:58:10.652 [CLI ] Found subcommand: update
2024-03-04 00:58:10.653 [CLI ] Leaf command to execute: root:source:update
2024-03-04 00:58:10.653 [CLI ] Executing command: update
2024-03-04 00:58:10.683 [REPO] Named source requested, found: msstore
2024-03-04 00:58:10.684 [REPO] Named source to be updated, found: msstore
2024-03-04 00:58:10.793 [REPO] Named source requested, found: winget
2024-03-04 00:58:10.795 [REPO] Named source to be updated, found: winget
2024-03-04 00:58:10.802 [CORE] Did not find extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2024-03-04 00:58:10.859 [FAIL] WindowsPackageManager.dll!00007FFDAF7F9A11: LogHr(1) tid(de4) 80072EFF
2024-03-04 00:58:10.859 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(95)\WindowsPackageManager.dll!00007FFDAFAC643F: (caller: 00007FFDAF96E9FC) LogHr(2) tid(de4) 80072EFF Msg:[winrt::hresult_error: The connection with the server was reset]
2024-03-04 00:58:10.860 [REPO] Source add/update failed, waiting 7699 milliseconds and retrying: winget
2024-03-04 00:58:18.568 [CORE] Did not find extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2024-03-04 00:58:18.595 [FAIL] WindowsPackageManager.dll!00007FFDAF7F9A11: LogHr(3) tid(de4) 80072EFF
2024-03-04 00:58:18.595 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(839)\WindowsPackageManager.dll!00007FFDAFAC5A4E: (caller: 00007FFDAF88B035) LogHr(4) tid(de4) 80072EFF Msg:[winrt::hresult_error: The connection with the server was reset]
2024-03-04 00:58:18.595 [REPO] Failed to update source: winget
2024-03-04 00:58:18.801 [CLI ] Leaf command succeeded: root:source:update
@avicarmi
I can only find errors about importing Appx if using pwsh.exe:
- https://github.com/PowerShell/PowerShell/issues/13138
- https://github.com/PowerShell/PowerShell/issues/19031
What Windows edition do you have? LTSC. Home. Professional.
Have you tried the regular Windows troubleshooting commands from CMD as admin?
sfc /scannow
and
DISM.exe /Online /Cleanup-Image /Restorehealth
oh, sorry I was not clear, Appx did not give an error with powershell.exe
yet winget still gives errors
Edition Windows 10 Pro Version 22H2 Installed on 06/18/20 OS build 19045.4123 Experience Windows Feature Experience Pack 1000.19054.1000.0
sfc /scannow
Beginning system scan. This process will take some time.
Beginning verification phase of system scan.
Verification 100% complete.
Windows Resource Protection did not find any integrity violations.
DISM.exe /Online /Cleanup-Image /Restorehealth
Deployment Image Servicing and Management tool
Version: 10.0.19041.3636
Image Version: 10.0.19045.4123
[==========================100.0%==========================] The restore operation completed successfully.
The operation completed successfully.
seems that "Microsoft.Winget.Source_8wekyb3d8bbwe" is missing from my installation 2024-03-04 01:57:47.129 [CORE] Did not find extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
but even after reinstalling winget and app installer it is still "missing"
and I still get errors with various winget commands:
winget list and winget update
Failed when opening source(s); try the 'source reset' command if the problem persists.
winget source update
Updating all sources...
Updating source: msstore...
Done
Updating source: winget...
Cancelled
@avicarmi
Try this?
- https://github.com/microsoft/winget-cli/issues/3525#issuecomment-1736846054
I have tried it earlier tonight did not seem to help, but tried it again
winget is now working better, but not perfect...
from the log file it is finding the extension (i.e. it is no longer missing - THANKS) yet still getting an error, but a different one now: The connection with the server was reset
2024-03-04 02:45:13.978 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB 2024-03-04 02:45:13.978 [CORE] Found matching extension. 2024-03-04 02:45:13.984 [CORE] Retrieving headers from url: https://cdn.winget.microsoft.com/cache/source.msix 2024-03-04 02:45:14.039 [FAIL] WindowsPackageManager.dll!00007FF955839A11: LogHr(1) tid(2fb8) 80072EFF 2024-03-04 02:45:14.039 [FAIL] C:__w\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(95)\WindowsPackageManager.dll!00007FF955B0643F: (caller: 00007FF9559AE9FC) LogHr(2) tid(2fb8) 80072EFF Msg:[winrt::hresult_error: The connection with the server was reset]
2024-03-04 02:45:14.040 [REPO] Source add/update failed, waiting 2689 milliseconds and retrying: winget 2024-03-04 02:45:16.738 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB 2024-03-04 02:45:16.738 [CORE] Found matching extension. 2024-03-04 02:45:16.741 [CORE] Retrieving headers from url: https://cdn.winget.microsoft.com/cache/source.msix 2024-03-04 02:45:16.775 [FAIL] WindowsPackageManager.dll!00007FF955839A11: LogHr(3) tid(2fb8) 80072EFF 2024-03-04 02:45:16.775 [FAIL] C:__w\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(839)\WindowsPackageManager.dll!00007FF955B05A4E: (caller: 00007FF9558CB035) LogHr(4) tid(2fb8) 80072EFF Msg:[winrt::hresult_error: The connection with the server was reset]
2024-03-04 02:45:16.775 [REPO] Failed to update source: winget 2024-03-04 02:45:16.965 [CLI ] Leaf command succeeded: root:source:update
yet I am able to access the URL via a browser: https://cdn.winget.microsoft.com/cache/source.msix
also getting this error:
Failed when searching source: msstore An unexpected error occurred while executing the command: WinHttpSendRequest: 12030: The connection with the server was terminated abnormally
more details from the log file:
2024-03-04 03:05:55.154 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB 2024-03-04 03:05:55.154 [CORE] Found matching extension. 2024-03-04 03:05:55.175 [FAIL] WindowsPackageManager.dll!00007FF930C09A11: LogHr(3) tid(2444) 80072EFF 2024-03-04 03:05:55.175 [FAIL] C:__w\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(703)\WindowsPackageManager.dll!00007FF930ED53BC: (caller: 00007FF930C2EB47) LogHr(4) tid(2444) 80072EFF Msg:[winrt::hresult_error: The connection with the server was reset]
2024-03-04 03:05:55.175 [REPO] Failed to update source: winget 2024-03-04 03:05:55.175 [REPO] Multiple sources available, creating aggregated source. 2024-03-04 03:05:55.175 [REPO] Adding to aggregated source: msstore 2024-03-04 03:05:55.176 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information 2024-03-04 03:05:55.259 [FAIL] C:__w\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(730)\WindowsPackageManager.dll!00007FF930ED563C: (caller: 00007FF930C2EB47) LogHr(5) tid(2444) 8007023E {Application Error}
The exception %s (0x Msg:[std::exception: WinHttpSendRequest: 12030: The connection with the server was terminated abnormally
]
2024-03-04 03:05:55.259 [REPO] Failed to open available source: msstore
yet I can access the URL from the browser: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information
though still getting error when trying https://storeedgefd.dsx.mp.microsoft.com/v9.0 (but I guess that it is because the URL is not complete?)
looking for WinHttpSendRequest: 12030 found that it means incompatible SSL protocol was encountered
will continue investigating tomorrow...
Windows 11 (build >= 20215)
that one worked for me, thank you 🙏