Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed when searching source; results will not be included: winget #3303

Open
khewweifeng opened this issue Jun 3, 2023 · 29 comments
Open
Labels
Command-Source Issue related to WinGet Source Issue-Bug It either shouldn't be doing this or needs an investigation.
Milestone

Comments

@khewweifeng
Copy link

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

winget --info
Windows Package Manager v1.4.11071
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19045.2846
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.19.11071.0
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Jun 3, 2023
@khewweifeng
Copy link
Author

winget source list
Administrator_ Windows PowerShell 3_6_2023 6_37_01 AM

@khewweifeng
Copy link
Author

winget --info
Administrator_ Windows PowerShell 3_6_2023 6_35_43 AM

@khewweifeng
Copy link
Author

winget update
Administrator_ Windows PowerShell 3_6_2023 6_35_01 AM

@khewweifeng
Copy link
Author

Failed when searching source; results will not be included: winget
Administrator_ Windows PowerShell 3_6_2023 6_32_50 AM

@oxpayken
Copy link

oxpayken commented Jun 5, 2023

Encountering same issue.

@denelon denelon added Issue-Bug It either shouldn't be doing this or needs an investigation. and removed Needs-Triage Issue need to be triaged labels Jun 5, 2023
@denelon
Copy link
Contributor

denelon commented Jun 5, 2023

Does running winget source reset --force as an administrator resolve this?

@denelon denelon added this to the v.Next-Client milestone Jun 5, 2023
@khewweifeng
Copy link
Author

Does running winget source reset --force as an administrator resolve this?

Cannot resolve

Here is the screenshot.

Administrator_ Windows PowerShell 6_6_2023 9_03_52 AM

@khewweifeng
Copy link
Author

before this, the pc already done pc reset with cloud install.

@denelon
Copy link
Contributor

denelon commented Jun 6, 2023

@JohnMcPMS what else do you suggest here?

@JohnMcPMS
Copy link
Member

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 .

@khewweifeng
Copy link
Author

khewweifeng commented Jun 7, 2023

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.

@khewweifeng
Copy link
Author

Run powershell with non-admin can get results and update

Screenshot (2)

@denelon
Copy link
Contributor

denelon commented Jun 7, 2023

@khewweifeng thanks so much for testing and helping us to find a solid repro!

@JohnMcPMS
Copy link
Member

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.

@Shadowphoenix
Copy link

Shadowphoenix commented Jun 9, 2023

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.

@khewweifeng
Copy link
Author

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

@denelon
Copy link
Contributor

denelon commented Jun 9, 2023

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.

@Shadowphoenix
Copy link

Shadowphoenix commented Jun 9, 2023

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.

@denelon denelon added the Command-Source Issue related to WinGet Source label Jun 10, 2023
@khewweifeng
Copy link
Author

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

@Shadowphoenix
Copy link

Shadowphoenix commented Jun 11, 2023

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.

@rrous
Copy link

rrous commented Jun 19, 2023

Run powershell with non-admin can get results and update

Screenshot (2)

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.

@lambda
Copy link

lambda commented Jun 23, 2023

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

@M4mu5qu3
Copy link

M4mu5qu3 commented Jun 30, 2023

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

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.

@computerquip-work
Copy link

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

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.

@KuntaKinke
Copy link

KuntaKinke commented Oct 26, 2023

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.

@octaviordz
Copy link

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.

@MickCh
Copy link

MickCh commented Feb 5, 2024

I had the same issue and my solution was simply to upgrade "App Installer" in Microsoft Store.

@jakemarston
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Command-Source Issue related to WinGet Source Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

No branches or pull requests