Open khewweifeng opened 1 year ago
winget source list
winget --info
winget update
Failed when searching source; results will not be included: winget
Encountering same issue.
Does running winget source reset --force
as an administrator resolve this?
Does running
winget source reset --force
as an administrator resolve this?
Cannot resolve
Here is the screenshot.
before this, the pc already done pc reset with cloud install.
@JohnMcPMS what else do you suggest here?
Without logs, it is hard to say what is happening. You can attach logs here, (winget --info
will show you where they are) or you can submit a feedback item with http://aka.ms/winget-feedback .
Without logs, it is hard to say what is happening. You can attach logs here, (
winget --info
will show you where they are) or you can submit a feedback item with http://aka.ms/winget-feedback .
WinGetCOM-2023-06-07-18-08-42.759.log
@JohnMcPMS Hi, here is the latest log.
Run powershell with non-admin can get results and update
@khewweifeng thanks so much for testing and helping us to find a solid repro!
The files that start with WinGetCOM-
are likely from Microsoft Store and/or the PowerShell module usage. The log files for winget.exe usage start with WinGet-
. The best thing to do would be to run your update command and then upload the newest log file.
For me, winget throws the same errors with and without privileges, even after resetting source. Windows-Store-Installations error out as well. It seemingly all broke down with the latest wingetupdate, on my Laptop. Before it was running just fine. Initially, when trying to install Winget on a Fresh install of Windows i made yesterday with a Windowsiso i downloaded a week ago, it threw errors about being unable to source Dependencies and WindowsStore kept crashing on boot. I (seemingly) fixed that by completely reinstalling Windows Store using GetAppx. I can upload all the Logs i have (if you tell me where to find them.).
Afterwards i would probably reinstall this PC using the same iso, to check if that fixes it, provide logs, and if that fails, i can try fetching the iso again and reinstall - that being said i am not sure if these steps are all that helpful.
Surprisingly, i reinstalled my main Desktop-PC on Monday using the same Iso on the same stick and its running fine there, even when i seemingly have the same versions of pretty much everything, even the newest winget update.
EDIT - Clarification: Windows Store initially installed updates to a bunch of other random stuff on my Laptop (3D Viewer and such). Those Updates ran fine, then it started downloading an update for App-Installer. Winget was open in a Powershell and chugging along until then and both winget and store seized function THE SECOND it installed App-Installer Version 1.19.11071.0. All Store-Apps trying to get updates after that just failed to update after their Download completed.
For me, winget throws the same errors with and without privileges, even after resetting source. Windows-Store-Installations error out as well. It seemingly all broke down with the latest wingetupdate, on my Laptop. Before it was running just fine. Initially, when trying to install Winget on a Fresh install of Windows i made yesterday with a Windowsiso i downloaded a week ago, it threw errors about being unable to source Dependencies and WindowsStore kept crashing on boot. I (seemingly) fixed that by completely reinstalling Windows Store using GetAppx. I can upload all the Logs i have (if you tell me where to find them.).
Afterwards i would probably reinstall this PC using the same iso, to check if that fixes it, provide logs, and if that fails, i can try fetching the iso again and reinstall - that being said i am not sure if these steps are all that helpful.
Surprisingly, i reinstalled my main Desktop-PC on Monday using the same Iso on the same stick and its running fine there, even when i seemingly have the same versions of pretty much everything, even the newest winget update.
winget --info
will show the logs location
You can also append "--verbose-logs --logs" to the end of a command and logging will be "verbose", and the folder with the logs will open after the command completes.
seems something fundamental was broken with that install - now after windows ran a few updates it doesnt even start... guess i will reinstall and see if can reproduce
EDIT: Reinstalling the PC fixed it. Could be that Winget-cli and Store broke because both were doing stuff at the same time. -> broken Package-Library or so? Because now i first let Windows Store fully update all the stuff and THEN ran my wingetcommands and it works fine.
seems something fundamental was broken with that install - now after windows ran a few updates it doesnt even start... guess i will reinstall and see if can reproduce
EDIT: Reinstalling the PC fixed it. Could be that Winget-cli and Store broke because both were doing stuff at the same time. -> broken Package-Library or so? Because now i first let Windows Store fully update all the stuff and THEN ran my wingetcommands and it works fine.
@Shadowphoenix May I know how you reinstall? by using pc reset or usb drive method? because mine was reinstalled with pc reset (cloud install) method
seems something fundamental was broken with that install - now after windows ran a few updates it doesnt even start... guess i will reinstall and see if can reproduce EDIT: Reinstalling the PC fixed it. Could be that Winget-cli and Store broke because both were doing stuff at the same time. -> broken Package-Library or so? Because now i first let Windows Store fully update all the stuff and THEN ran my wingetcommands and it works fine.
@Shadowphoenix May I know how you reinstall? by using pc reset or usb drive method? because mine was reinstalled with pc reset (cloud install) method
i always do it via Iso on USB - i chose completely deleting the old partition and reinstalling into a fresh new partition, because using the Overwrite-Method via Cloud or even from within the USB somehow ALWAYS ends up carrying over the bugs that led me to reinstalling in the first place, when i try that.
Run powershell with non-admin can get results and update
I experience the same behaviour. BTW: Our company AD policy forbids MS Store for users PCs. My local admin account is not in AD domain. But chocolatey works fine as admin. In our domain we have a proxy, but I experience the same issues also without proxy on NAT network.
I ran into this problem when I was in an elevated PowerShell prompt for an admin user who may not have ever logged in directly. This meant that winget wasn't installed, so following the instructions at https://learn.microsoft.com/en-us/windows/package-manager/winget/ I ran the following to install winget:
Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe
However, that led to the error discussed in this ticket when trying to use winget
.
Looking in the logs I got an error about Microsoft.Winget.Source_8wekyb3d8bbwe
so I tried installing that as well with Add-AppxPackage
and that seemed to work:
PS C:\> Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.Winget.Source_8wekyb3d8bbwe
PS C:\> winget search Microsoft.PowerShell
Name Id Version Source
---------------------------------------------------------------
PowerShell Microsoft.PowerShell 7.3.4.0 winget
PowerShell Preview Microsoft.PowerShell.Preview 7.4.0.3 winget
PS C:\>
Log snippet of the failure:
2023-06-23 17:00:12.358 [REPO] Adding to aggregated source: winget
2023-06-23 17:00:12.359 [CORE] Did not find extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2023-06-23 17:00:12.359 [REPO] Package not found Microsoft.Winget.Source_8wekyb3d8bbwe
2023-06-23 17:00:12.360 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\PreIndexedPackageSourceFactory.cpp(205)\WindowsPackageManager.dll!00007FFBE1244D7A: (caller: 00007FFBE123145E) Exception(1) tid(47fc) 8A15000F
2023-06-23 17:00:12.360 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(564)\WindowsPackageManager.dll!00007FFBE1367133: (caller: 00007FFBE1128DDD) LogHr(2) tid(47fc) 8A15000F Msg:[D:\a\_work\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\PreIndexedPackageSourceFactory.cpp(205)\WindowsPackageManager.dll!00007FFBE1244D7A: (caller: 00007FFBE123145E) Exception(1) tid(47fc) 8A15000F ]
2023-06-23 17:00:12.360 [REPO] Failed to open available source: winget
I ran into this problem when I was in an elevated PowerShell prompt for an admin user who may not have ever logged in directly. This meant that winget wasn't installed, so following the instructions at https://learn.microsoft.com/en-us/windows/package-manager/winget/ I ran the following to install winget:
Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe
However, that led to the error discussed in this ticket when trying to use
winget
.Looking in the logs I got an error about
Microsoft.Winget.Source_8wekyb3d8bbwe
so I tried installing that as well withAdd-AppxPackage
and that seemed to work:PS C:\> Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.Winget.Source_8wekyb3d8bbwe PS C:\> winget search Microsoft.PowerShell Name Id Version Source --------------------------------------------------------------- PowerShell Microsoft.PowerShell 7.3.4.0 winget PowerShell Preview Microsoft.PowerShell.Preview 7.4.0.3 winget PS C:\>
Log snippet of the failure:
2023-06-23 17:00:12.358 [REPO] Adding to aggregated source: winget 2023-06-23 17:00:12.359 [CORE] Did not find extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB 2023-06-23 17:00:12.359 [REPO] Package not found Microsoft.Winget.Source_8wekyb3d8bbwe 2023-06-23 17:00:12.360 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\PreIndexedPackageSourceFactory.cpp(205)\WindowsPackageManager.dll!00007FFBE1244D7A: (caller: 00007FFBE123145E) Exception(1) tid(47fc) 8A15000F 2023-06-23 17:00:12.360 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(564)\WindowsPackageManager.dll!00007FFBE1367133: (caller: 00007FFBE1128DDD) LogHr(2) tid(47fc) 8A15000F Msg:[D:\a\_work\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\PreIndexedPackageSourceFactory.cpp(205)\WindowsPackageManager.dll!00007FFBE1244D7A: (caller: 00007FFBE123145E) Exception(1) tid(47fc) 8A15000F ] 2023-06-23 17:00:12.360 [REPO] Failed to open available source: winget
It Works absolutely!!! I've done this in non admin and admin session too, and it works!
I was in the same situation of @khewweifeng
Many thanks guys.
I ran into this problem when I was in an elevated PowerShell prompt for an admin user who may not have ever logged in directly. This meant that winget wasn't installed, so following the instructions at https://learn.microsoft.com/en-us/windows/package-manager/winget/ I ran the following to install winget:
Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe
However, that led to the error discussed in this ticket when trying to use
winget
. Looking in the logs I got an error aboutMicrosoft.Winget.Source_8wekyb3d8bbwe
so I tried installing that as well withAdd-AppxPackage
and that seemed to work:PS C:\> Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.Winget.Source_8wekyb3d8bbwe PS C:\> winget search Microsoft.PowerShell Name Id Version Source --------------------------------------------------------------- PowerShell Microsoft.PowerShell 7.3.4.0 winget PowerShell Preview Microsoft.PowerShell.Preview 7.4.0.3 winget PS C:\>
Log snippet of the failure:
2023-06-23 17:00:12.358 [REPO] Adding to aggregated source: winget 2023-06-23 17:00:12.359 [CORE] Did not find extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB 2023-06-23 17:00:12.359 [REPO] Package not found Microsoft.Winget.Source_8wekyb3d8bbwe 2023-06-23 17:00:12.360 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\PreIndexedPackageSourceFactory.cpp(205)\WindowsPackageManager.dll!00007FFBE1244D7A: (caller: 00007FFBE123145E) Exception(1) tid(47fc) 8A15000F 2023-06-23 17:00:12.360 [FAIL] D:\a\_work\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(564)\WindowsPackageManager.dll!00007FFBE1367133: (caller: 00007FFBE1128DDD) LogHr(2) tid(47fc) 8A15000F Msg:[D:\a\_work\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\PreIndexedPackageSourceFactory.cpp(205)\WindowsPackageManager.dll!00007FFBE1244D7A: (caller: 00007FFBE123145E) Exception(1) tid(47fc) 8A15000F ] 2023-06-23 17:00:12.360 [REPO] Failed to open available source: winget
It Works absolutely!!! I've done this in non admin and admin session too, and it works!
I was in the same situation of @khewweifeng
Many thanks guys.
The mentioned source package doesn't exist.
Bases in my experience with this DAILY (I use winget every day), take in consideration 2 things: 1-SysOp update/upgrade in full, some of those missing module is the reason why winget doesn't work (.net? whatever), most of the time I full upgrade windows and fix the issue. Of course don't forget to install latest winget version. 2-Winget still on Frankenstein/beta level, means, no matter what you do, it will still fail and it will act weird. Just now, it gave me the same error, I run it again (I run it always from a .bat) and the problem didn't show up the second time. Go figure.
I was facing the same error message "Failed when searching source; results will not be included: winget".
Adding my information, in my case I was trying to install git by the command winget install --id Git.Git -e --source winget
under a elevated PowerShell terminal, the current/signed-in user being a standard user.
The way it worked for me was signing in as the administrator user.
I mention git because, although this instance is a new installation I do remember that I in another machine I have never been able to upgrade git using 'winget' under the similar circumstance, standard user trying to update 'machine' scope installation hence the issue might be reproducible trying with git installer.
Also I just found out about the scope issues in case that is related.
Best.
I had the same issue and my solution was simply to upgrade "App Installer" in Microsoft Store.
I had the same issue and my solution was simply to upgrade "App Installer" in Microsoft Store.
Confirmed this fixed it for me as well. Coming from a brand new Windows 11 install.
I found this thread while experiencing the same issue. Turns out, if you are logged in as a non-admin and elevate your CLI-of-choice (CMD, Powershell, Terminal, etc.), winget will error as observed by myself and others in this thread. If you run your CLI as a non-admin, winget works as expected. It's strange that this behavior is not already compensated for by Windows, as being logged in as a standard user and elevating privileges only to do the sysadmin tasks required is a standard best practice.
I had the same issue and my solution was simply to upgrade "App Installer" in Microsoft Store.
Yup. Brand new PC just today and winget is broken out of the box.
In a fresh windows 11, was receiving this errors from winget.
The winget version was
Was trying with some commands in the PowerShell, commands like these. winget --info winget -v winget source list winget source update winget upgrade. In the next day after an Windows-Update (system) suddenly one alert told me about App-Installer App update. After restart the Terminal App, winget was updated to
And the errors were fixed. Hope this information helps you.
A screen recorded of where you can find de "App Installer" App.
https://github.com/microsoft/winget-cli/assets/10623247/3c31caaf-3203-41f3-973f-1192bdb89b52
I have the same issue.
the version of winget shipping in win11 is unable to upgrade itself.
@ALERTua: what's confusing about this?
I have the same issue.
- Brand new install of Windows 11 Home.
- Windows Updates are up-to-date.
the version of winget shipping in win11 is unable to upgrade itself.
@ALERTua: what's confusing about this?
try Restart the Delivery Optimization service:
Open Run (Windows + R), type services.msc, and press Enter. Find the Delivery Optimization service, right-click on it, and select Restart.
and next: Reset and re-add the winget source:
Open PowerShell with administrative privileges (Admin). Run the following commands to remove and re-add the winget source:
winget source remove winget winget source add -n winget https://winget.azureedge.net/cache winget source update
I have the same issue.
- Brand new install of Windows 11 Home.
- Windows Updates are up-to-date.
the version of winget shipping in win11 is unable to upgrade itself. @ALERTua: what's confusing about this?
try Restart the Delivery Optimization service:
Open Run (Windows + R), type services.msc, and press Enter. Find the Delivery Optimization service, right-click on it, and select Restart.
and next: Reset and re-add the winget source:
Open PowerShell with administrative privileges (Admin). Run the following commands to remove and re-add the winget source:
winget source remove winget winget source add -n winget https://winget.azureedge.net/cache winget source update
The result is the same:
hi there i have the same issue in W11 updated to last , but find this video on youtube: and reinstall appx manager and edit the path on Enviroment variables and it works again. https://www.youtube.com/watch?v=ES4LfzbSxMA
Man Winget is so fragile. I get this seemingly randomly when I elevate to an admin account and it reappears after some time (not sure how long). I used to always just reinstall winget in the admin session and that would fix it. But computerquip-work's solution is much faster. Still, I have to reapply the fix randomly from time to time. I don't understand why winget is so fragile! Does MS seriously not have a single tester who isn't running their main PC as an admin at all times?? Having a separate admin account has been best practice for ages.
Reinstalling AppInstaller fixed this for me, via.
I ran this in a powershell window as admin
Get-AppxPackage appInstaller | Reset-AppxPackage
I have the same question too
I have the same question too
Brief description of your issue
Failed when searching source; results will not be included: winget
Steps to reproduce
winget update
Expected behavior
update / install / find apps with winget
Actual behavior
Failed when searching source; results will not be included: winget
Environment