Open jedieaston opened 3 years ago
Thanks for the report. I believe this is related to the user not being logged on to the store. Can you log into the store and retry? I suspect this will address the issue.
I can't log into the store because the store isn't installed on LTSC builds (or on Server, or in the Sandbox)[^1]. Therefore, I think the expected behavior here would be that the msstore source isn't available on systems that don't have the Microsoft Store installed.
[^1]: explanation here, specifically "Features from Windows 10 that could be updated with new functionality, including Cortana, Edge, and all in-box Universal Windows apps, are also not included.". I can still install winget manually (or use the in-box App Installer eventually), but in that case the Microsoft Store still isn't available.
It looks like we might need to expand on the scenario for purchased apps. We may need to add some kind of authentication method for the Windows Package Manager if/when the Microsoft Store isn't present.
@jedieaston I need a head slap emoji. :) Thanks for clarifying.
Due to architectural reasons, the msstore
source is a combination of different catalogs internally. So there are some packages that will be able to install in your scenarios. I think the right answer is not to remove the source completely, but rather detect it and limit the available packages.
Even better if we can get anonymous installs to work where appropriate, but there may be legal hurdles there that we are not aware of. Additionally, I'm not sure if the OS components are even present in these cases.
We're working on enabling the anonymous scenario. Most free packages rated "e" for everyone should not require MSA authentication in the Microsoft Store source.
@jedieaston
Does this Issue look like it's resolved in your opinion? Since the bug has been fixed for anonymous install this might be resolved. Let me know what you think.
The issue was that the Microsoft Store source exists even if the Microsoft Store itself isn't installed, and therefore some apps can't be installed (regardless of authentication being necessary). In Windows Sandbox, where the Microsoft Store isn't available, the store source is still installed by default in the latest preview but doesn't work correctly since there isn't a store:
PS C:\Users\WDAGUtilityAccount\Desktop\Dev> winget install iTunes --source msstore
The `msstore` source requires that you view the following agreements before using.
Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction
The source requires the current machine's 2-letter geographic region to be sent to the backend service to function properly (ex. "US").
Do you agree to all the source agreements terms?
[Y] Yes [N] No: y
Found iTunes [9PB2MZ1ZMB1S] Version Unknown
# snip the long description
The publisher requires that you view the above information and accept the agreements before installing.
Do you agree to the terms?
[Y] Yes [N] No: y
Verifying/Requesting package acquisition...
Verifying/Requesting package acquisition success
Starting package install...
Failed to install or update Microsoft Store package. Error code: 0x80070422
PS C:\Users\WDAGUtilityAccount\Desktop\Dev> winget install -s msstore "Visual Studio Code" # a Win32 app from the Microsoft Store
Found Visual Studio Code [XP9KHM4BK9FZ7Q] Version Unknown
# snip the long description
The publisher requires that you view the above information and accept the agreements before installing.
Do you agree to the terms?
[Y] Yes [N] No: y
Downloading https://github.com/microsoft/vscode-winsta11er/releases/download/v0.0.5/vscode-winsta11er-x64.exe
██████████████████████████████ 6.34 MB / 6.34 MB
Successfully verified installer hash
Starting package install...
Successfully installed
@JohnMcPMS is right, there are packages that will install (Win32 apps, specifically, since they act like other winget apps). I think that winget should be able to detect which apps are installable and hide the others from searches to prevent confusion. It's up to you if that's a different bug or not, since strictly speaking, the Microsoft Store source works a bit more than it did (it's still confusing though).
OK, I'll keep this open, and start some internal discussions on what kind of options might get the right desired behavior.
Brief description of your issue
If you're on a version of Windows that doesn't have the Microsoft Store (LTSC, Server, the weird build Sandbox runs), winget adds the Microsoft Store source even though you can't use it since you can't sign in.
Steps to reproduce
winget install solitaire
.Expected behavior
Either the Microsoft Store source won't be added at all so the searches make more sense, or it will do the install without auth (as that's the same behavior that the Microsoft Store app has for free apps).
Actual behavior
Environment