microsoft / microsoft/winget-cli

Seems like winget is completely broken due to an SQL issue

Open
#5,630 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Bug
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Brief description of your issue

A few days ago, I noticed that the Microsoft Store on my computer was no longer able to download any applications. As what is like in the image, the download button never appears.

Image

Also, it seems like it has lost the ability to keep track of the apps that I installed via the store as well. When I tried to download an app manually, it reported to me with the error code: 0x87AF0001.
I then spent hours going around various solutions, eventually leading to the issue of the winget component on my PC.

Image Image
Steps to reproduce

Open up CMD as admin
type in: winget list
received output:
Failed in attempting to update the source: winget
Failed to open the predefined source; please report to winget maintainers.
An unexpected error occurred while executing the command:
0x87af0001 : SQL ȱݿ

Image
Expected behavior

If Winget is working normally, I should at least be able to normally download and update my apps via Microsoft Store. This is a huge issue for me, as since I'm unable to manage my apps installed, some of my outdated apps and games have stopped working, and I can't fix them with Winget broken.
I also tried updating Windows to its latest version, running dism check health and restorehealth, deleting installed.db file from the ideas back in issue 1999, but none of them makes any difference.

Actual behavior

Winget is not completely broken. I have no way to install and update apps, check what apps I installed, or even update itself; basically, any command will always lead to the same error code: 0x87af0001.
I hope there could be a way to reset Winget, as now the msixbundle I downloaded from this GitHub repository cannot be opened by the Windows App Installer: Error in parsing the app package.

Image Image
Environment
Windows Package Manager v1.11.400
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19045.6159
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.26.400.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file, test, or entry point is named. Start by reproducing winget list on the stated Windows and WinGet versions, then trace the predefined-source failure associated with error 0x87af0001 and the reported SQL message; done means identifying a reproducible cause and a verified fix or recovery path.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, sql
Domain
cli, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.