microsoft / winget-pkgs

The Microsoft community Windows Package Manager manifest repository
MIT License
8.62k stars 4.48k forks source link

[Bug]: Issue with Microsoft.WindowsTerminal #36878

Closed sirinath closed 5 months ago

sirinath commented 2 years ago

Brief description of your issue

I get:

winget install -e --id Microsoft.WindowsTerminal                                         --scope machine --accept-package-agreements --accept-source-agreements
No applicable installer found; see logs for more details.

Steps to reproduce

Run winget install -e --id Microsoft.WindowsTerminal --scope machine --accept-package-agreements --accept-source-agreements

Expected behavior

Should install

Actual behavior

Gets and error and does not install

Environment

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

Windows: Windows.Desktop v10.0.19043.1348
Package: Microsoft.DesktopAppInstaller v1.16.12986.0
sirinath commented 2 years ago

Similarly:

winget install -e --id Canonical.Ubuntu                                                  --scope machine --accept-package-agreements --accept-source-agreements
No applicable installer found; see logs for more details.
OfficialEsco commented 2 years ago

Not sure where you are getting this information from, but Microsoft.WindowsTerminal is working as intended because it does not contain any User/Machine scope, its a MSIX so its always User.

PS C:\Users\User> winget install -e --id Canonical.Ubuntu
Found Ubuntu [Canonical.Ubuntu] Version 2004.2020.424.0
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Successfully verified installer hash
Starting package install...
  ██████████████████████████████  100%
Successfully installed

Do take note there are also Canonical.Ubuntu.1604, Canonical.Ubuntu.1804 and Canonical.Ubuntu.2004

sirinath commented 2 years ago

Maybe additional option to 1st try machine and then user scope would help.

OfficialEsco commented 2 years ago

Take that up with the people over here https://github.com/microsoft/winget-cli :)

The log does say:

2021-12-05 01:37:48.562 [CLI ] Starting installer selection.
2021-12-05 01:37:48.562 [CLI ] Installer [X64,Msix,Unknown,] not applicable: Installer scope does not match required scope: Unknown != Machine
2021-12-05 01:37:48.562 [CLI ] Installer [Arm64,Msix,Unknown,] not applicable: Installer scope does not match required scope: Unknown != Machine
2021-12-05 01:37:48.562 [CLI ] Installer [X86,Msix,Unknown,] not applicable: Installer scope does not match required scope: Unknown != Machine

It could probably be a bit more friendly to explain that there is no machine installer available. However i believe this is what winget settings is used for.

    "InstallPrefReq": {
        "scope": "machine",
    }

but that does obv affect every installer.

thetredev commented 2 years ago

I can confirm this issue on Windows 10. For me, the logs state the following:

[...]
2022-05-01 23:17:11.185 [CLI ] Found one app. App id: Microsoft.WindowsTerminal App name: Windows Terminal
2022-05-01 23:17:11.186 [REPO] Downloading manifest
2022-05-01 23:17:11.186 [CORE] WinINet downloading from url: https://winget.azureedge.net/cache/manifests/m/Microsoft/WindowsTerminal/1.12.10983.0/1899-Microsoft.WindowsTerminal.yaml
2022-05-01 23:17:11.839 [CORE] Download hash: 13986f2255623d2524b88da4db3c7fe5990af86c088bdf6eaed9a487d08f19b5
2022-05-01 23:17:11.839 [CORE] Download completed.
2022-05-01 23:17:11.840 [CLI ] Manifest fields: Name [Windows Terminal], Version [1.12.10983.0]
2022-05-01 23:17:11.840 [CLI ] Starting installer selection.
2022-05-01 23:17:11.840 [CLI ] Installer [X64,msix,Unknown,] not applicable: Current OS is lower than MinOSVersion 10.0.22000.0
2022-05-01 23:17:11.840 [CLI ] Installer [Arm64,msix,Unknown,] not applicable: Current OS is lower than MinOSVersion 10.0.22000.0
2022-05-01 23:17:11.840 [CLI ] Installer [Arm64,msix,Unknown,] not applicable: Machine is not compatible with Arm64
2022-05-01 23:17:11.840 [CLI ] Installer [X86,msix,Unknown,] not applicable: Current OS is lower than MinOSVersion 10.0.22000.0
2022-05-01 23:17:11.846 [CLI ] Terminating context: 0x8a150010 at D:\a\_work\1\s\external\pkg\src\AppInstallerCLICore\Workflows\InstallFlow.cpp:74

Basically it's Current OS is lower than MinOSVersion. I don't understand that statement. I updated Windows today and it's at version 21H2 19044.1682 according to winver.

According to the manifest https://winget.azureedge.net/cache/manifests/m/Microsoft/WindowsTerminal/1.12.10983.0/1899-Microsoft.WindowsTerminal.yaml the MinimumOSVersion is 10.0.22000.0. Is that different from the OS build version? Maybe it confuses something here?

dpprdan commented 2 years ago

@thetredev it seems you're on Win10 not Win11 (which is MinOSVersion 10.0.22000.0).

See https://github.com/microsoft/winget-cli/issues/2134

thetredev commented 2 years ago

@thetredev it seems you're on Win10 not Win11 (which is MinOSVersion 10.0.22000.0).

See https://github.com/microsoft/winget-cli/issues/2134

Yes I'm on Windows 10. But the application itself is supported on 10, isn't it? Maybe we need 2 manifests, one for 10 and one for 11, and based on that the CLI chooses the right one?

OfficialEsco commented 2 years ago

They started to release 2 different versions 2 releases ago, one for win10 and one for win11, the wingetbot team just added Windows 11 support and found a bug in WinGet-cli, WinGet-cli apparently respects MinOSVersion but not MinimumOSVersion because it got changed earlier 🤦‍♂️

The only possible fix is to fix it in WinGet-CLI.

dpprdan commented 2 years ago

@thetredev There already is a manifest for Win10, winget just does not pick it up. As a workaround you can specify the latest version (you'd have to figure out for yourself, which version is the latest by looking through the manifests in the repository, AFAICT). Right now, this would be winget install Microsoft.WindowsTerminal -v 1.12.10982.0

thetredev commented 2 years ago

Thank you both!

Trenly commented 5 months ago

Thank you for taking the time to report this issue. In the amount of time the issue has been open, there have been several updates to the WinGet CLI which may have helped mitigate some of these concerns. I encourage you to try out the latest version of the CLI and see if your problem still persists.

If additional problems persist, it would be extremely helpful if a new issue could be opened. Thanks!

Close with reason: Stale;