Repository navigation
Description
Brief description of your issue
For a week now, the winget source in Winget is totally broken and will not work for package updates, package installs, nor package searches. When attempting to do winget upgrade --all I get an 0x80070005 : Access is denied. error. The funny part is I get this error when I run as a normal user which is funny because I shouldn't have to be admin to simply run an upgrade command; that generally kicks in when packages actually want to upgrade (which is the behavior I experienced before)
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:
0x80070005 : Access is denied.
Running the command under an admin powershell instance produces this error
winget update --all --verbose-logs
Failed when searching source: winget
An unexpected error occurred while executing the command:
0x8a15000f : Data required by the source is missing
It's also worth nothing I am on a preview, but this issue existed before I switched to a preview build as part of troubleshooting.
Steps to reproduce
Attempt to upgrade or install anything.
Expected behavior
I expect Winget to work like a functional package manager
Actual behavior
Winget is broken beyond belief.
Environment
Windows Package Manager (Preview) v1.9.1981-preview
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.22621.3880
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.24.1981.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
ProxyCommandLineOptions Disabled
DefaultProxy Disabled
Activity
github-actions commentedon Jul 29, 2024
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:
Closed similar issues:
RyanHakurei commentedon Jul 29, 2024
Here's the log output when running as the normal user. I did actually manage to get it working under an admin powershell instance.
denelon commentedon Jul 29, 2024
Try running "as user"
winget source update --verbose-logs --logsand share the log if that doesn't work.RyanHakurei commentedon Jul 29, 2024
denelon commentedon Jul 29, 2024
What results do you get when you run
winget list winget?I'm suspecting something isn't correct with permissions on the default source package.
RyanHakurei commentedon Jul 29, 2024
denelon commentedon Jul 29, 2024
Try running the following commands (as administrator):
Remove-AppxPackage -Package 'Microsoft.Winget.Source_2024.729.1610.52_neutral__8wekyb3d8bbwe'Then run:
winget source reset --forceRyanHakurei commentedon Jul 29, 2024
I get an error about another user being logged on, but I am the only user logged on.
3 remaining items
denelon commentedon Jul 29, 2024
You might have a different version installed.
See if you can remove the "Windows Package Manager Source (winget)" from the Settings app under "Apps > Installed apps".
RyanHakurei commentedon Jul 29, 2024
I was able to remove it via the Settings GUI.
denelon commentedon Jul 29, 2024
OK, now try running
winget source update --name wingetto see if it will pull the latest source down correctly.RyanHakurei commentedon Jul 29, 2024
denelon commentedon Jul 29, 2024
Try installing the source using "https://cdn.winget.microsoft.com/cache/source2.msix"
RyanHakurei commentedon Jul 29, 2024
So that one seems to work in that I am able to update the source, but I still get an access denied error when I try to list or upgrade.
RyanHakurei commentedon Jul 29, 2024
I fixed the issue. For some reason the Winget folder in my user's temp directory
%localappdata%\Temp\WinGetwas owned by my admin user instead of my normal user. Upon deleting that folder Winget has returned to full functionality. I am doing a package upgrade as we speak.RyanHakurei commentedon Jul 29, 2024
Ok so something keeps flipping the folder back to being owned by my admin user. I have manually given my normal user read/write access though and I will monitor what happens.
RyanHakurei commentedon Jul 29, 2024
Yep something keeps changing the permissions of that folder and my normal user got kicked off.
davidldennison commentedon Aug 1, 2024
Have you tried enabling the self elevate experimental feature?
RyanHakurei commentedon Aug 2, 2024
I have not. How do you do that?
davidldennison commentedon Aug 3, 2024
Follow the instructions here:
https://github.com/microsoft/winget-cli/blob/master/doc/Settings.md#configureselfelevate
Let me know if that works or if you need more help!
pdhermann commentedon Aug 15, 2024
Same problem here. And after analysing, i found that if you run winget updates through UniGetUi (3.1.1) this happens. if you install the updates with winget-cli all is fine. -> But not on all machines. I think the difference could private user and company user, i have the problem only with my company notebook (EntraID / Active Directory).
pdhermann commentedon Aug 15, 2024
is not working on my site.
DuckDuckStudio commentedon Nov 13, 2024
Same issue on my system...
This doesn't seem to be an isolated case: https://github.com/microsoft/winget-cli/issues?q=0x80070005
Also because there is no permission on
%temp%\WinGet.But I'm the only user on the system...