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

0x801901f4 : Internal server error (500) when I try to execute winget list and winget install (Source is down) #1437

Closed
Fukubi opened this issue Sep 6, 2021 · 48 comments · Fixed by #1470
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Milestone

Comments

@Fukubi
Copy link

Fukubi commented Sep 6, 2021

Brief description of your issue

When I try to execute winget list or winget install command I get an 0x801901f4 : Internal error in server (500) error.

Steps to reproduce

Execute winget list, winget install.

[winget list]
Ocorreu um erro inesperado ao executar o comando:
0x801901f4 : Erro interno de servidor (500).

[winget install Mozilla.Firefox]
Ocorreu um erro inesperado ao executar o comando:
0x801901f4 : Erro interno de servidor (500).

Expected behavior

List installed apps (with winget list) or install a new app (with winget install)

Actual behavior

Throw an internal server error

Environment

[winget --info]
Windows Package Manager v1.0.11694
Copyright (c) Microsoft Corporation. Todos os direitos reservados.

Windows: Windows.Desktop v10.0.22000.176
Pacote: Microsoft.DesktopAppInstaller v1.15.11694.0

Registros: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
@jedieaston
Copy link
Contributor

jedieaston commented Sep 6, 2021

The newstore source is down, which breaks the client entirely unless you add --source winget to all of your commands. I made a bug about this a few weeks ago: #1349.

BTW, for anyone at MS troubleshooting, it's the manifestSearch endpoint throwing 500s:

image

@Fukubi
Copy link
Author

Fukubi commented Sep 6, 2021

With --source winget it works perfectly, many thanks.

@Fukubi Fukubi closed this as completed Sep 6, 2021
@jedieaston
Copy link
Contributor

jedieaston commented Sep 6, 2021

@denelon Can you reopen this? It's the only issue noting that the source is down.

Edit: I just remembered that it's Labor Day, so the team is probably off. Uh, @Fukubi, can you do it?

@Fukubi Fukubi reopened this Sep 6, 2021
@Fukubi
Copy link
Author

Fukubi commented Sep 6, 2021

Yeah, no problem.

@Fukubi Fukubi changed the title 0x801901f4 : Internal server error (500) when I try to execute any command 0x801901f4 : Internal server error (500) when I try to execute winget list and winget install (Source is down) Sep 6, 2021
@derkrasseleo
Copy link

I just turned on my machine and also got this error..
image

@ket0x4
Copy link

ket0x4 commented Sep 7, 2021

I have same issue + I can't download apps from microsoft store too

@denelon denelon added the Issue-Bug It either shouldn't be doing this or needs an investigation. label Sep 7, 2021
@feoh
Copy link

feoh commented Sep 8, 2021

Same here and it's super frustrating. Reproduced on both a System76 Thelio and a Lenovo Thinkpad T15 gen2 both running Windows 11 Insiders Beta/latest update.

I submitted feedback at: https://aka.ms/AAdr7rh

@yooakim
Copy link

yooakim commented Sep 8, 2021

I have the same issue as well, frustrating.

PS C:\Users\joakim.westin> winget --info
Windows Package Manager v1.0.11694
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22000.176
Package: Microsoft.DesktopAppInstaller v1.15.11694.0

Logs: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir

Links
--------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
Licence Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget

image

@danyalahmed
Copy link

I am facing same issue, as mentioned above for now --source winget seems to work

@jedieaston
Copy link
Contributor

@denelon should this issue be moved to microsoft/winget-cli-restsource? I don't know who's responsible for making sure the store source is up...

@denelon
Copy link
Contributor

denelon commented Sep 8, 2021

@jedieaston the REST source for the store packages is a different internal package. We've already contacted them regarding the 500 errors. @Fukubi thanks for reopening this. There was a small misunderstanding when implementing the API. I believe the issue for the errors has been resolved, but I wanted to keep this open so we can make sure to do a better job handling these kinds of issues in the client.

@denelon
Copy link
Contributor

denelon commented Sep 8, 2021

@Fukubi is there an update to the Microsoft Store application available? Can you share what version you have? I believe it's under App settings when you select the account logged into the store in the top right corner.

@jedieaston
Copy link
Contributor

I'm currently also having the issue. My Microsoft Store version is 22109.1401.3.0 (there aren't any updates available).

Also:

Windows Package Manager v1.0.11694
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22000.176
Package: Microsoft.DesktopAppInstaller v1.15.11694.0

Logs: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir

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

@Fukubi
Copy link
Author

Fukubi commented Sep 8, 2021

@denelon I don't have any updates in the MS Store, maybe it's because I'm using the preview version?

Here's the version details that you asked

image

And about the internal server error, I still have it

[winget list]
Ocorreu um erro inesperado ao executar o comando:
0x801901f4 : Erro interno de servidor (500).

@denelon
Copy link
Contributor

denelon commented Sep 8, 2021

Thanks for the data points! It looks like we may have another release coming for the experimental store source in the next day or two. It was not built with the reference implementation, so we're working through some design decisions and legacy systems.

For a bit more transparency, the engineering team working on the store source is working through some technical limitations on how some of the search criteria works. The current implementation is tightly coupled with the search UI in the Microsoft Store. This is likely to have a very long lead time (many months) to get where we want it to be for command-line scenarios supporting the Windows Package Manager.

@i-zanis
Copy link

i-zanis commented Sep 8, 2021

I am current facing in the same issue (W11).

@denelon
Copy link
Contributor

denelon commented Sep 8, 2021

In addition to the -s winget workaround to avoid the responses from the store source, you may also disable the experimental feature to improve productivity.

@feoh
Copy link

feoh commented Sep 8, 2021

@denelon Thanks and pardon my ignorance but how do we disable the experimental feature?

@denelon
Copy link
Contributor

denelon commented Sep 8, 2021

@feoh, no worries. You can see what features are enabled via winget features.

You can set the value to "false" in your settings file. I set Visual Studio Code as my default .json editor. Run winget settings to open up the file. Be sure to save it before running winget again.

@adrianghc
Copy link

In addition to the -s winget workaround to avoid the responses from the store source, you may also disable the experimental feature to improve productivity.

I'm having this problem despite having that feature disabled.

@denelon
Copy link
Contributor

denelon commented Sep 8, 2021

@adrianghc if you run winget source list with the experimental store disabled, you should only see the default "winget" source. Can you confirm?

@adrianghc
Copy link

@adrianghc if you run winget source list with the experimental store disabled, you should only see the default "winget" source. Can you confirm?

Well, no, I do get this:

Name     Argument
------------------------------------------------------
winget   https://winget.azureedge.net/cache
newstore https://storeedgefd.dsx.mp.microsoft.com/v9.0

But I do get this for winget features:

Funktion                Status      Eigenschaft         Link
--------------------------------------------------------------------------------------
Microsoft Store Support Deaktiviert experimentalMSStore https://aka.ms/winget-settings
Packaged API Support    Aktiviert   packagedAPI         https://aka.ms/winget-settings

@denelon
Copy link
Contributor

denelon commented Sep 8, 2021

@adrianghc you can winget source remove newstore. It still gets a "tombstone" so it shouldn't show back up unless you disable/reenable the experimental store and then do a winget source reset --force from an elevated prompt.

@adrianghc
Copy link

adrianghc commented Sep 9, 2021

So if I understand this right, the default when not setting the experimental store flag should be that winget is the only source? Why does newstore not get removed automatically when disabling the feature? Or are they not linked at all in the first place (and just the msstore source is)?

@denelon
Copy link
Contributor

denelon commented Sep 9, 2021

@adrianghc, I think it's a bug. Which version are you using? Would you mind sharing the output from winget info in the bug?

@Jaifroid
Copy link

Jaifroid commented Sep 9, 2021

Just to add to this that I'm getting the same issue on Windows 11 (latest Beta insider - 22000.176). I have never enabled the newstore source for this and it's not in my winget settings.

image

@adrianghc
Copy link

adrianghc commented Sep 9, 2021

@adrianghc, I think it's a bug. Which version are you using? Would you mind sharing the output from winget info in the bug?

Sure thing, done. Thanks for creating the issue about it!

@denelon
Copy link
Contributor

denelon commented Sep 9, 2021

@Jaifroid can you share the output from winget source list and winget features?

@Jaifroid
Copy link

Jaifroid commented Sep 9, 2021

@Jaifroid can you share the output from winget source list and winget features?

Here you go:

PS C:\Users\gkant> winget source list
Name     Argument
------------------------------------------------------
winget   https://winget.azureedge.net/cache
newstore https://storeedgefd.dsx.mp.microsoft.com/v9.0
PS C:\Users\gkant> winget features
The following experimental features are in progress.
They can be configured through the settings file 'winget settings'.

Feature                 Status   Property            Link
-----------------------------------------------------------------------------------
Microsoft Store Support Disabled experimentalMSStore https://aka.ms/winget-settings
Packaged API Support    Enabled  packagedAPI         https://aka.ms/winget-settings

@feoh
Copy link

feoh commented Sep 9, 2021

@feoh, no worries. You can see what features are enabled via winget features.

You can set the value to "false" in your settings file. I set Visual Studio Code as my default .json editor. Run winget settings to open up the file. Be sure to save it before running winget again.

Sorry to jump into the pig-pile, but I added the following as per the docs to my winget settings:

    "experimentalFeatures": {
       "experimentalCmd": false,
       "experimentalArg": false
    },
    "experimentalFeatures": {
       "experimentalMSStore": false
    }

and I still get the exact same error.

@voltagex
Copy link

voltagex commented Sep 9, 2021

Fiddler shows the following

Connection: Keep-Alive
Content-Type: application/json
User-Agent: cpprestsdk/2.10.18
Version: 1.0.0
Content-Length: 519
Host: storeedgefd.dsx.mp.microsoft.com

{"Inclusions":[{"PackageMatchField":"PackageFamilyName","RequestMatch":{"KeyWord":"firefox","MatchType":"Exact"}},{"PackageMatchField":"ProductCode","RequestMatch":{"KeyWord":"firefox","MatchType":"Exact"}},{"PackageMatchField":"PackageIdentifier","RequestMatch":{"KeyWord":"firefox","MatchType":"CaseInsensitive"}},{"PackageMatchField":"PackageName","RequestMatch":{"KeyWord":"firefox","MatchType":"CaseInsensitive"}},{"PackageMatchField":"Moniker","RequestMatch":{"KeyWord":"firefox","MatchType":"CaseInsensitive"}}]}
HTTP/1.1 500 Internal Server Error
Content-Length: 296
Content-Type: application/json; charset=utf-8
Server: Microsoft-HTTPAPI/2.0
X-OSG-Served-By: SOUTHEASTASIA_Legacy00003D_1.0.0.0
MS-CV: ZbX0ovP+hkm22Zu9.0
Vary: Accept-Encoding
Expires: Thu, 09 Sep 2021 02:38:15 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Thu, 09 Sep 2021 02:38:15 GMT
Connection: close

{"code":"UnknownServerError","data":[],"details":[],"innererror":{"code":"UnknownServerError","data":[],"details":[],"message":"Object reference not set to an instance of an object.","source":"StoreEdgeFD"},"message":"Object reference not set to an instance of an object.","source":"StoreEdgeFD"}

@Fukubi
Copy link
Author

Fukubi commented Sep 9, 2021

It looks like it's fixed, it's working normally here even without the -s winget and with the newstore source on.

@adrianghc
Copy link

I reset the sources to check and unfortunately, it still doesn't seem to work for me. Maybe it's a regional thing?

@Jaifroid
Copy link

Jaifroid commented Sep 9, 2021

It looks like it's fixed, it's working normally here even without the -s winget and with the newstore source on.

Not fixed for me.

image

@ItzLevvie
Copy link

ItzLevvie commented Sep 9, 2021

Just to add to this that I'm getting the same issue on Windows 11 (latest Beta insider - 22000.176). I have never enabled the newstore source for this and it's not in my winget settings.

image

The newstore source is added by default in WinGet on Windows 11 devices.

You can temporarily fix it by doing winget source remove newstore

@Fukubi
Copy link
Author

Fukubi commented Sep 9, 2021

Maybe? I'm in Brazil using the windows 11, want me to send some infos?

@adrianghc
Copy link

The newstore source is added by default on Windows 11.

You can fix it by doing winget source remove newstore

Do you know if this is by design or if it's a bug?

@adrianghc
Copy link

Maybe? I'm in Brazil using the windows 11, want me to send some infos?

If it's a regional thing (e.g. because of new server code that needs to roll out across all regions) it should work for everybody at some point, so I'll just check again later.

@Jaifroid
Copy link

Jaifroid commented Sep 9, 2021

The newstore source is added by default in WinGet on Windows 11 devices.

You can temporarily fix it by doing winget source remove newstore

That fixed it in Windows 11, thanks @ItzLevvie.

image

@Jaifroid
Copy link

Jaifroid commented Sep 9, 2021

Do you know if this is by design or if it's a bug?

Not an answer to the question, but I think it's fine for the Microsoft Store to be an available source by default, so long as winget doesn't bomb out if it can't reach one of the stores. It should give a message that the store is unavailable but still install if the right ID or moniker has been set for a package in the main winget repo.

I would like to be able to set a moniker for the MIcrosoft Store version, so there's no confusion between the packages. The MS Store version will auto-update, so would be the superior choice in principle, but only if I can set different monikers for the different packages. The one in the winget repo is signed with our org's cert. The one in the MS Store is signed with the MS Store cert.

@feoh
Copy link

feoh commented Sep 9, 2021

+1 this started working for me this morning as well. Thanks to whoever brought it back to life! Having to remember --source winget was a drag :)

@denelon denelon linked a pull request Sep 16, 2021 that will close this issue
@cloudrootab
Copy link

I removed the newstore, since it made winget all but unusable (who has time to input --source every time!?). However, I'm trying to add it back again since people are saying it started working again (and it's also working on my laptop). But trying to addit results in the same Internal server error (500)

winget source add newstore https://storeedgefd.dsx.mp.microsoft.com/v9.0
Adding source:
newstore -> https://storeedgefd.dsx.mp.microsoft.com/v9.0
An unexpected error occurred while executing the command:
Internal server error (500).

@Jaifroid
Copy link

I removed the newstore, since it made winget all but unusable (who has time to input --source every time!?). However, I'm trying to add it back again since people are saying it started working again (and it's also working on my laptop). But trying to addit results in the same Internal server error (500)

I have the same issue.

@jedieaston
Copy link
Contributor

I think you need to add -t Microsoft.Rest.

winget source add -t Microsoft.Rest -n newstore https://storeedgefd.dsx.mp.microsoft.com/v9.0 worked for me.

@cloudrootab
Copy link

I think you need to add -t Microsoft.Rest.

winget source add -t Microsoft.Rest -n newstore https://storeedgefd.dsx.mp.microsoft.com/v9.0 worked for me.

Can confirm that it worked. But imho, it's surprising that this was necessary. 'winget source list' doesn't mention "Type" anywhere. So it's far from obvious that this flag needs to be added. Especially since the error code didn't mention it either.

@Jaifroid
Copy link

I think you need to add -t Microsoft.Rest.

winget source add -t Microsoft.Rest -n newstore https://storeedgefd.dsx.mp.microsoft.com/v9.0 worked for me.

Also works for me. Thanks!

@denelon
Copy link
Contributor

denelon commented Sep 17, 2021

You can also run winget source reset to have the client attempt resolving source related issues and add "default" sources back.

@denelon denelon added this to the v1.3-Client milestone Jun 21, 2022
@Uj947nXmRqV2nRaWshKtHzTvckUUpD

Microsoft.Rest

found it documented here:
https://github.com/microsoft/winget-cli-restsource

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

Successfully merging a pull request may close this issue.