winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

Failed to open the predefined source/Failed when searching source: msstore

Open johnnyde94 opened this issue 2 years ago • 48 comments

Hello I am currently getting the error: "Failed to open the predefined source; please report to winget maintainers. An unexpected error occurred while executing the command: 0x800700b7 : Cannot create a file when that file already exists."

When trying to use winget. I have tried to install the latest dev build but that has not solved the issue. I tried a few different steps found in other posts such as updating sources but no go. This error is on my work computer running normal build of win 11.

Oddly I'm also having issues with winget on my home PC with win 11 beta ring but that error says the following: "Failed when searching source: msstore An unexpected error occurred while executing the command: 0x8a150044 : The rest source endpoint is not found."

I can make two separate posts if that is better.

johnnyde94 avatar May 18 '23 13:05 johnnyde94

@johnnyde94 would you mind running winget source reset --force --verbose-logs --open-logs in administrator mode and sharing the logs?

denelon avatar May 18 '23 15:05 denelon

Sure thing this is from the computer with the first issue.

WinGetPC1-2023-05-12-14-52-13.785.log

That last line is really odd as I do not have a D drive installed at the moment and windows was never on the D drive anyway.

Output from the second PC is below.... odd it didn't even want to run

C:\Windows\System32>winget source reset --force --verbose-logs --open-logs Windows Package Manager v1.4.11071 Copyright (c) Microsoft Corporation. All rights reserved.

This feature is a work in progress, and may be changed dramatically or removed altogether in the future. To enable it, edit your settings ('winget settings') to include the experimental feature: 'openLogsArgument'

This command drops existing sources, potentially leaving any local data behind. Without any argument, it will drop all sources and add the defaults. If a named source is provided, only that source will be dropped.

usage: winget source reset [[-n] ] []

The following arguments are available: -n,--name Name of the source

The following options are available: --force Forces the reset of the sources -?,--help Shows help about the selected command --wait Prompts the user to press any key before exiting --verbose,--verbose-logs Enables verbose logging for WinGet --disable-interactivity Disable interactive prompts

More help can be found at: https://aka.ms/winget-command-source

That lead me down a rabbit hole so I edited my json to include that experimental feature but it still will not make a log output. I check the folder location nothing of use there.

johnnyde94 avatar May 18 '23 16:05 johnnyde94

Possibly related to:

  • #2947

denelon avatar May 18 '23 16:05 denelon

On computer 1 we got a bit further using the info from that article but sill no go. That D drive error is gone. Failed to open the predefined source; please report to winget maintainers. An unexpected error occurred while executing the command: 0x800700b7 : Cannot create a file when that file already exists. WinGet-2023-05-18-12-42-37.810.log

Second PC I have a feeling I need to reinstall winget. Failed when searching source: msstore An unexpected error occurred while executing the command: 0x8a150044 : The rest source endpoint is not found.

johnnyde94 avatar May 18 '23 16:05 johnnyde94

You can use: https://aka.ms/getwinget - Latest stable version at GitHub https://aka.ms/getwingetpreview - Latest preview version at GitHub

denelon avatar May 18 '23 16:05 denelon

installed dev preview no luck on pc 2 but I do get logs now. 2023-05-18 12:49:39.375 [CORE] WinGet, version [1.5.1081-preview], activity [{3B4CE009-927F-47A9-9582-C2F34B63304D}] 2023-05-18 12:49:39.375 [CORE] OS: Windows.Desktop v10.0.22624.1616 2023-05-18 12:49:39.375 [CORE] Command line Args: winget source reset --force --verbose-logs --open-logs 2023-05-18 12:49:39.376 [CORE] Package: Microsoft.DesktopAppInstaller v1.20.1081.0 2023-05-18 12:49:39.376 [CORE] IsCOMCall:0; Caller: winget-cli 2023-05-18 12:49:39.380 [CLI ] WinGet invoked with arguments: 'source' 'reset' '--force' '--verbose-logs' '--open-logs' 2023-05-18 12:49:39.380 [CLI ] Found subcommand: source 2023-05-18 12:49:39.380 [CLI ] Found subcommand: reset 2023-05-18 12:49:39.380 [CLI ] Leaf command to execute: root:source:reset 2023-05-18 12:49:39.380 [CLI ] Executing command: reset 2023-05-18 12:49:39.394 [CORE] Setting action: Remove, Type: Secure, Name: user_sources 2023-05-18 12:49:39.394 [CORE] Setting action: Remove, Type: Standard, Name: sources_metadata 2023-05-18 12:49:39.442 [CLI ] Leaf command succeeded: root:source:reset

johnnyde94 avatar May 18 '23 16:05 johnnyde94

can i remove winget from add and remove apps safely?

johnnyde94 avatar May 18 '23 16:05 johnnyde94

I tired the repair and reset from their no luck

johnnyde94 avatar May 18 '23 16:05 johnnyde94

It's the App Installer. I don't believe it will let you remove it via Windows Apps & Features. I was going to suggest repair or reset, but you already did that.

What do you get from winget --info?

denelon avatar May 18 '23 16:05 denelon

It was able to let me uninstall it from there, but i still have winget

johnnyde94 avatar May 18 '23 16:05 johnnyde94

Odd the store is still saying the app installer is installed too but its no longer in installed apps

johnnyde94 avatar May 18 '23 16:05 johnnyde94

pc 1

Windows: Windows.Desktop v10.0.22621.1702 System Architecture: X64 Package: Microsoft.DesktopAppInstaller v1.20.1081.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

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

johnnyde94 avatar May 18 '23 16:05 johnnyde94

pc 2

Windows: Windows.Desktop v10.0.22624.1616 System Architecture: X64 Package: Microsoft.DesktopAppInstaller v1.20.1081.0

Winget Directories

Logs %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir User Settings %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json 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

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

johnnyde94 avatar May 18 '23 16:05 johnnyde94

winget also does nothing on pc 2 if i use powershell oddly like its looking for the app to open

johnnyde94 avatar May 18 '23 16:05 johnnyde94

Do you have the App Execution Alias enabled on both machines?

denelon avatar May 18 '23 17:05 denelon

No clue lol

johnnyde94 avatar May 18 '23 17:05 johnnyde94

You can search for it in "settings" AEA1 AEA2

denelon avatar May 18 '23 17:05 denelon

On the first machine, I think that somehow we are seeing the same MSIX package on the system twice, with the same version. We can mitigate it in the code, but it would be interesting to see what the root cause is (and it would probably fix you now).

This in PowerShell should hopefully show the culprit (a duplicate value). If you paste the output here I will find the dupe if you don't want to:

Get-AppxPackage -PackageTypeFilter Main | %{ $_.PackageFamilyName }

JohnMcPMS avatar May 18 '23 17:05 JohnMcPMS

yep I do if I turn it off it can't find winget

johnnyde94 avatar May 18 '23 17:05 johnnyde94

Microsoft.YourPhone_8wekyb3d8bbwe Microsoft.MicrosoftEdge.Stable_8wekyb3d8bbwe Microsoft.ZuneVideo_8wekyb3d8bbwe Microsoft.WindowsStore_8wekyb3d8bbwe Microsoft.MicrosoftStickyNotes_8wekyb3d8bbwe Microsoft.GetHelp_8wekyb3d8bbwe DropboxInc.Dropbox_wkt425jdc3sga Microsoft.MicrosoftEdge.Stable_8wekyb3d8bbwe Microsoft.WindowsNotepad_8wekyb3d8bbwe Microsoft.ScreenSketch_8wekyb3d8bbwe AD2F1837.HPDesktopSupportUtilities_v10z8vjag6ke6 Microsoft.HEIFImageExtension_8wekyb3d8bbwe Microsoft.HEVCVideoExtension_8wekyb3d8bbwe Microsoft.Paint_8wekyb3d8bbwe Microsoft.WindowsFeedbackHub_8wekyb3d8bbwe Microsoft.WindowsCamera_8wekyb3d8bbwe MicrosoftWindows.Client.CBS_cw5n1h2txyewy MicrosoftWindows.Client.WebExperience_cw5n1h2txyewy AD2F1837.HPPrinterControl_v10z8vjag6ke6 Clipchamp.Clipchamp_yxz26nhyzhsrt Microsoft.WindowsMaps_8wekyb3d8bbwe Microsoft.SecHealthUI_8wekyb3d8bbwe AdvancedMicroDevicesInc-RSXCM_fhmx3h6dzfmvj Microsoft.MicrosoftEdge_8wekyb3d8bbwe Microsoft.WindowsAlarms_8wekyb3d8bbwe microsoft.windowscommunicationsapps_8wekyb3d8bbwe NotepadPlusPlus_7njy0v32s6xk6 Microsoft.DesktopAppInstaller_8wekyb3d8bbwe Microsoft.Winget.Source_8wekyb3d8bbwe

johnnyde94 avatar May 18 '23 17:05 johnnyde94

For the other PC, you can try just going to this link: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information

From the error, that should give the failing PC a 404. If it isn't, then I'm not sure what is failing. You can get around the experimental feature issue by just removing --open-logs and instead getting the log location from winget --info. The log file should give a better indication of exactly what is getting a 404.

JohnMcPMS avatar May 18 '23 17:05 JohnMcPMS

nope works fine

e "Microsoft.Marketplace.Storefront.StoreEdgeFD.BusinessLogic.Response.PackageMetadata.PackageMetadataResponse, StoreEdgeFD" Data $type "Microsoft.Marketplace.Storefront.StoreEdgeFD.BusinessLogic.Response.PackageMetadata.PackageMetadataData, StoreEdgeFD" SourceIdentifier "StoreEdgeFD" SourceAgreements $type "Microsoft.Marketplace.Storefront.StoreEdgeFD.BusinessLogic.Response.PackageMetadata.SourceAgreements, StoreEdgeFD" AgreementsIdentifier "StoreEdgeFD" Agreements 0 $type "Microsoft.Marketplace.Storefront.StoreEdgeFD.BusinessLogic.Response.PackageManifest.AgreementDetail, StoreEdgeFD" AgreementLabel "Terms of Transaction" AgreementUrl "https://aka.ms/microsoft-store-terms-of-transaction" ServerSupportedVersions 0 "1.0.0" 1 "1.1.0" RequiredQueryParameters 0 "market" RequiredPackageMatchFields 0 "market"

johnnyde94 avatar May 18 '23 17:05 johnnyde94

So Microsoft.MicrosoftEdge.Stable_8wekyb3d8bbwe is probably the problem (although I apparently have 45 of those on my machine, but no version conflicts...).

Get-AppxPackage Microsoft.MicrosoftEdge.Stable

Should hopefully give us more information about the two.

JohnMcPMS avatar May 18 '23 17:05 JohnMcPMS

kk

johnnyde94 avatar May 18 '23 17:05 johnnyde94

anything to try?

johnnyde94 avatar May 18 '23 17:05 johnnyde94

I looked on computer two to where the winget symlink is and winget.exe is not there. I tried installing the latest preview build but it's still not showing up.

johnnyde94 avatar May 24 '23 14:05 johnnyde94

It keeps looking for the D (drive lol) on both PC have no clue wtf is going on.

PC1: WinGet-2023-05-24-16-04-34.135.log

PC2: WinGet-2023-05-24-16-03-37.424.log

johnnyde94 avatar May 24 '23 20:05 johnnyde94

PC1: 2023-05-24 16:04:35.141 [CLI ] Caught wil::ResultException: D:\a_work\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(190)\WindowsPackageManager.dll!00007FFF95BAAA7D: (caller: 00007FFF95BB0BE9) Exception(1) tid(9898) 800700B7 Cannot create a file when that file already exists.

PC 2: 2023-05-24 16:03:41.378 [CLI ] Caught wil::ResultException: D:\a_work\1\s\external\pkg\src\AppInstallerRepositoryCore\Rest\Schema\HttpClientHelper.cpp(137)\WindowsPackageManager.dll!00007FF811DCBBF3: (caller: 00007FF811DCB558) Exception(1) tid(56d8) 8A150044

johnnyde94 avatar May 24 '23 20:05 johnnyde94

@JohnMcPMS I think you said this might be an artifact from something else. Could you elaborate a bit?

denelon avatar May 25 '23 16:05 denelon

Any help on this its annoying widget is not working on two of my devices lol

johnnyde94 avatar Jun 02 '23 16:06 johnnyde94