Closed charlesroper closed 3 months ago
Hello @charlesroper,
The exit codes shown on the logs point to the following Winget error: APPINSTALLER_CLI_ERROR_INTERNAL_ERROR
Please try:
Thank you, enabling system winget worked - I've now got sources and I am seeing winget packages again.
However, my winget seems to be broken. E.g., if I try and run an update, it fails. I've no idea why.
Here's an example output:
Found Microsoft Visual Studio Code [Microsoft.VisualStudioCode] Version 1.87.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.
An unexpected error occurred while executing the command:
0x80070005 : unknown error
Here's the corresponding winget log:
2024-03-19 23:44:22.063 [CORE] WinGet, version [1.8.532-preview], activity [{673F7E32-E06F-40AD-BD2D-F46247F87330}]
2024-03-19 23:44:22.063 [CORE] OS: Windows.Desktop v10.0.22631.3155
2024-03-19 23:44:22.063 [CORE] Command line Args: "C:\Users\c.roper\AppData\Local\Microsoft\WindowsApps\winget.exe" update --id Microsoft.VisualStudioCode --exact --accept-source-agreements --silent --disable-interactivity --accept-package-agreements --force --include-unknown
2024-03-19 23:44:22.064 [CORE] Package: Microsoft.DesktopAppInstaller v1.23.532.0
2024-03-19 23:44:22.064 [CORE] IsCOMCall:0; Caller: winget-cli
2024-03-19 23:44:22.080 [CLI ] WinGet invoked with arguments: 'update' '--id' 'Microsoft.VisualStudioCode' '--exact' '--accept-source-agreements' '--silent' '--disable-interactivity' '--accept-package-agreements' '--force' '--include-unknown'
2024-03-19 23:44:22.080 [CLI ] Found subcommand: update
2024-03-19 23:44:22.080 [CLI ] Leaf command to execute: root:upgrade
2024-03-19 23:44:22.081 [CLI ] Executing command: upgrade
2024-03-19 23:44:22.089 [REPO] Default source requested, multiple sources available, adding all to source references.
2024-03-19 23:44:22.089 [REPO] Adding to source references msstore
2024-03-19 23:44:22.089 [REPO] Adding to source references winget
2024-03-19 23:44:22.089 [CLI ] Created authentication arguments. Mode: silent, Account:
2024-03-19 23:44:22.106 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2024-03-19 23:44:22.106 [CORE] Found matching extension.
2024-03-19 23:44:22.111 [REPO] Source `winget` after auto update time [5 mins]; it has been at least 684 mins
2024-03-19 23:44:22.118 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2024-03-19 23:44:22.118 [CORE] Found matching extension.
2024-03-19 23:44:23.545 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerCommonCore\Runtime.cpp(331)\WindowsPackageManager.dll!00007FFCFFBC3985: (caller: 00007FFCFFBC55E4) Exception(1) tid(6e34) 80070005 Access is denied.
2024-03-19 23:44:23.545 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(95)\WindowsPackageManager.dll!00007FFCFFEC8FDF: (caller: 00007FFCFFD7066E) LogHr(1) tid(6e34) 80070005 Access is denied.
Msg:[C:\__w\1\s\external\pkg\src\AppInstallerCommonCore\Runtime.cpp(331)\WindowsPackageManager.dll!00007FFCFFBC3985: (caller: 00007FFCFFBC55E4) Exception(1) tid(6e34) 80070005 Access is denied.
]
2024-03-19 23:44:23.545 [REPO] Source add/update failed, waiting 4614 milliseconds and retrying: winget
2024-03-19 23:44:28.176 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2024-03-19 23:44:28.176 [CORE] Found matching extension.
2024-03-19 23:44:28.394 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerCommonCore\Runtime.cpp(331)\WindowsPackageManager.dll!00007FFCFFBC3985: (caller: 00007FFCFFBC55E4) Exception(2) tid(6e34) 80070005 Access is denied.
2024-03-19 23:44:28.394 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(703)\WindowsPackageManager.dll!00007FFCFFEC7F5C: (caller: 00007FFCFFC1F117) LogHr(2) tid(6e34) 80070005 Access is denied.
Msg:[C:\__w\1\s\external\pkg\src\AppInstallerCommonCore\Runtime.cpp(331)\WindowsPackageManager.dll!00007FFCFFBC3985: (caller: 00007FFCFFBC55E4) Exception(2) tid(6e34) 80070005 Access is denied.
]
2024-03-19 23:44:28.394 [REPO] Failed to update source: winget
2024-03-19 23:44:28.394 [REPO] Multiple sources available, creating aggregated source.
2024-03-19 23:44:28.394 [REPO] Adding to aggregated source: msstore
2024-03-19 23:44:28.394 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information
2024-03-19 23:44:29.322 [REPO] Response status: 200
2024-03-19 23:44:29.322 [REPO] Authentication node not found. Assuming authentication type none.
2024-03-19 23:44:29.322 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information
2024-03-19 23:44:29.523 [REPO] Response status: 200
2024-03-19 23:44:29.524 [REPO] Authentication node not found. Assuming authentication type none.
2024-03-19 23:44:29.524 [REPO] Adding to aggregated source: winget
2024-03-19 23:44:29.534 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2024-03-19 23:44:29.534 [CORE] Found matching extension.
2024-03-19 23:44:29.574 [REPO] Opening database for ImmutableRead at 'C:\Program Files\WindowsApps\Microsoft.Winget.Source_2024.319.923.775_neutral__8wekyb3d8bbwe\Public\index.db'
2024-03-19 23:44:29.575 [REPO] Opened SQLite Index with version [1.7], last write [2024-03-19 08:23:33.000]
2024-03-19 23:44:29.783 [REPO] Creating new SQLite Index with version [Latest] at ':memory:'
2024-03-19 23:44:29.788 [REPO] Reading MSI UpgradeCodes
2024-03-19 23:44:29.844 [REPO] Reading MSI UpgradeCodes
2024-03-19 23:44:29.933 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFCFFDB450D: (caller: 00007FFCFFDBAD19) Exception(3) tid(6e34) 800700B7 Cannot create a file when that file already exists.
2024-03-19 23:44:29.939 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFCFFDB450D: (caller: 00007FFCFFDBAD19) Exception(4) tid(6e34) 800700B7 Cannot create a file when that file already exists.
2024-03-19 23:44:29.946 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFCFFDB450D: (caller: 00007FFCFFDBAD19) Exception(5) tid(6e34) 800700B7 Cannot create a file when that file already exists.
2024-03-19 23:44:29.950 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFCFFDB450D: (caller: 00007FFCFFDBAD19) Exception(6) tid(6e34) 800700B7 Cannot create a file when that file already exists.
2024-03-19 23:44:30.025 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFCFFDB450D: (caller: 00007FFCFFDBAD19) Exception(7) tid(6e34) 800700B7 Cannot create a file when that file already exists.
2024-03-19 23:44:30.059 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFCFFDB450D: (caller: 00007FFCFFDBAD19) Exception(8) tid(6e34) 800700B7 Cannot create a file when that file already exists.
2024-03-19 23:44:30.106 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFCFFDB450D: (caller: 00007FFCFFDBAD19) Exception(9) tid(6e34) 800700B7 Cannot create a file when that file already exists.
2024-03-19 23:44:30.110 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFCFFDB450D: (caller: 00007FFCFFDBAD19) Exception(10) tid(6e34) 800700B7 Cannot create a file when that file already exists.
2024-03-19 23:44:30.113 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFCFFDB450D: (caller: 00007FFCFFDBAD19) Exception(11) tid(6e34) 800700B7 Cannot create a file when that file already exists.
2024-03-19 23:44:30.116 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFCFFDB450D: (caller: 00007FFCFFDBAD19) Exception(12) tid(6e34) 800700B7 Cannot create a file when that file already exists.
2024-03-19 23:44:30.203 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFCFFDB450D: (caller: 00007FFCFFDBAD19) Exception(13) tid(6e34) 800700B7 Cannot create a file when that file already exists.
2024-03-19 23:44:30.286 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFCFFDB450D: (caller: 00007FFCFFDBAD19) Exception(14) tid(6e34) 800700B7 Cannot create a file when that file already exists.
2024-03-19 23:44:30.413 [REPO] Opening database for ReadWrite at 'C:\Users\c.roper\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\StoreEdgeFD\installed.db'
2024-03-19 23:44:30.414 [REPO] Opened SQLite Index with version [1.7], last write [2024-03-18 23:56:04.000]
2024-03-19 23:44:30.417 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/packageManifests/Microsoft.VisualStudioCode?Market=GB
2024-03-19 23:44:30.604 [REPO] Response status: 200
2024-03-19 23:44:30.610 [REPO] Opening database for ReadWrite at 'C:\Users\c.roper\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Microsoft.Winget.Source_8wekyb3d8bbwe\installed.db'
2024-03-19 23:44:30.611 [REPO] Opened SQLite Index with version [1.7], last write [2024-03-18 23:56:04.000]
2024-03-19 23:44:30.713 [REPO] Finding installed package from available package using system reference search: Query:[none] Include:NormalizedNameAndPublisher='microsoftvisualstudiocode'+'microsoft'[Exact] Include:NormalizedNameAndPublisher='visualstudiocode'+'microsoft'[Exact]
2024-03-19 23:44:30.728 [CLI ] Found one app. App id: Microsoft.VisualStudioCode App name: Microsoft Visual Studio Code
2024-03-19 23:44:30.740 [REPO] Attempting to open pinning database: C:\Users\c.roper\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\pinning.db
2024-03-19 23:44:30.740 [REPO] ... opening existing pinning database
2024-03-19 23:44:30.740 [REPO] Opening database for Read at 'C:\Users\c.roper\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\pinning.db'
2024-03-19 23:44:30.741 [REPO] Opened Pinning Index with version [1.0], last write [2024-01-30 02:30:59.000]
2024-03-19 23:44:30.745 [REPO] Downloading manifest
2024-03-19 23:44:30.745 [CORE] WinINet downloading from url: https://cdn.winget.microsoft.com/cache/manifests/m/Microsoft/VisualStudioCode/1.87.2/bfa0
2024-03-19 23:44:31.349 [CORE] Download hash: e0268076ee074cc55a4e48eaade3cb4351197279b860472489309dbb67654edc
2024-03-19 23:44:31.349 [CORE] Download completed.
2024-03-19 23:44:31.354 [CLI ] Manifest fields: Name [Microsoft Visual Studio Code], Version [1.87.2]
2024-03-19 23:44:31.359 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerCommonCore\Runtime.cpp(331)\WindowsPackageManager.dll!00007FFCFFBC3985: (caller: 00007FFCFFBC55E4) Exception(15) tid(6e34) 80070005 Access is denied.
2024-03-19 23:44:31.361 [CLI ] Caught wil::ResultException: C:\__w\1\s\external\pkg\src\AppInstallerCommonCore\Runtime.cpp(331)\WindowsPackageManager.dll!00007FFCFFBC3985: (caller: 00007FFCFFBC55E4) Exception(15) tid(6e34) 80070005 Access is denied.
After hours of searching for a solution to the 80070005 Access is denied
problem, I posted a discussion item on the winget-cli repo:
https://github.com/microsoft/winget-cli/discussions/4285
After more searching I found a solution: the permissions on my WinGet temp directory were messed up. Deleting the whole C:\Users\c.roper\AppData\Local\Temp\WinGet
directory (not just defaultState
) fixed the problem and now everything is working nicely again.
Please confirm these before moving forward
Describe your issue
My winget sources is empty and I see no winget packages. If I try to add the sources manually, it fails and I see this error:
What's notable about this is the
Working Directory: C:\Users\c.roper
. This is my non-admin user directory. The admin user should beC:\Users\charles-local-admin
, which is a local administrator account. Is it finding the existing sources in my user account?I get the same result if I run an elevated command prompt anyway.
I've tried running the reset, but that doesn't help. Note how the
delete_winget_databases.ps1
script doesn't run.If I run
delete_winget_databases.ps1
manually with gsudo or from an elevated command prompt, it deletes thedefaultState
directories as expected. But, unlike with 2.x, deleting these directories doesn't help (manually deleting them was the first thing I tried).Looking at the package manager logs, it looks like winget.exe is having trouble, but I don't know what
Exit Code: -1978335231
is.Steps to reproduce the issue
No response
WingetUI Log
Package Managers Logs
Relevant information
No response
Screenshots and videos