microsoft / microsoft/winget-pkgs

Winget "A newer package version is available in a configured source, but it does not apply to your system or requirements." tries to install wrong package

Open
#217,693 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Help-Wanted Issue-Task Package-Update
Dominant language
No language data
Stars
11.1k
Forks
9.7k
Avg merge
1h 32m
Merged PRs (30d)
376

Description

Brief description of your issue

Trying to upgrade Microsoft.OpenJDK.17 from installed version 17.0.13.11 to 17.0.14.7 failed. It looks like that winget tries to install for DE-DE (that's correct, there I am working from, but OS is EN-US) the ARM package instead of the (also available) x64 package. Details and log excerpt below.

Steps to reproduce

Hi,

winget list --upgrade-available --source=winget

Name                                         Id                       Version       Available
-------------------------------------------------------------------------------------------------
Microsoft Build of OpenJDK  17.0.13+11 (x64) Microsoft.OpenJDK.17     17.0.13.11    17.0.14.7

winget upgrade Microsoft.OpenJDK.17 --verbose-logs

No applicable upgrade found.
A newer package version is available in a configured source, but it does not apply to your system or requirements.

Log:

2025-01-25 20:57:43.050 [CLI ] Search result size: 1
2025-01-25 20:57:43.050 [CLI ] Found one app. App id: Microsoft.OpenJDK.17 App name: Microsoft Build of OpenJDK with Hotspot 17
2025-01-25 20:57:43.051 [CLI ] Market Filter created with market: DE
2025-01-25 20:57:43.051 [CLI ] Locale Comparator created with Required Locales: [] , Preferred Locales: [de-DE] , IsInstalledLocale: 1
2025-01-25 20:57:43.051 [CLI ] Architecture Comparator created with allowed architectures: [X64, X86, Neutral]
2025-01-25 20:57:43.054 [REPO] Attempting to open pinning database: C:\Users\HaraldvonAschen\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\pinning.db
2025-01-25 20:57:43.054 [REPO] ... opening existing pinning database
2025-01-25 20:57:43.054 [REPO] Opening database for Read at 'C:\Users\HaraldvonAschen\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\pinning.db'
2025-01-25 20:57:43.054 [REPO] Opened Pinning Index with version [1.0], last write [2023-07-17 08:25:34.000]
2025-01-25 20:57:43.054 [REPO] Did not find pin Package=[ARP\Machine\X64\{879C3E29-AA5D-4009-B30D-7F4C8EC13044}] Source=[*PredefinedInstalledSource]
2025-01-25 20:57:43.054 [CLI ] Updating from [17.0.13.11] to [17.0.14.7]
2025-01-25 20:57:43.055 [REPO] Did not find pin Package=[Microsoft.OpenJDK.17] Source=[Microsoft.Winget.Source_8wekyb3d8bbwe]
2025-01-25 20:57:43.055 [CORE] Reading cached file [C:\Users\HARALD~1\AppData\Local\Temp\WinGet\cache\V2_M\Microsoft.Winget.Source_8wekyb3d8bbwe\manifests/m/Microsoft/OpenJDK/17/17.0.14.7/72f3]
2025-01-25 20:57:43.062 [YAML] Detected UTF-8
2025-01-25 20:57:43.064 [CLI ] Starting installer selection.
2025-01-25 20:57:43.064 [CLI ] Installer [X64,wix,Machine,en-US] not applicable: Installer locale does not match required locale: en-USRequired locales: [] Or does not satisfy compatible match for Preferred Locales: [de-DE]
2025-01-25 20:57:43.064 [CLI ] Installer [Arm64,wix,Machine,en-US] not applicable: Installer locale does not match required locale: en-USRequired locales: [] Or does not satisfy compatible match for Preferred Locales: [de-DE]
2025-01-25 20:57:43.064 [CLI ] Installer [Arm64,wix,Machine,en-US] not applicable: Machine is not compatible with Arm64
2025-01-25 20:57:43.069 [CLI ] Terminating context: 0x8a15002b at C:\__w\1\s\external\pkg\src\AppInstallerCLICore\Workflows\UpdateFlow.cpp:be

Web page Microsoft:
https://learn.microsoft.com/en-us/java/openjdk/download

Here you can check that there is of course a x64 package available:

Image

No clue why winget tries to install on an x64 machine with an already installed x64 package an ARM version and saying that the locale is not correct?

Expected behavior

Winget installs the correct binary for the current OS with the OS localization.

Actual behavior

Winget tries to install the ARM binaries.

Environment
`winget --info`

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

Windows: Windows.Desktop v10.0.22631.4751
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.24.25200.0



Processor	Intel(R) Xeon(R) W-11955M CPU @ 2.60GHz   2.61 GHz
System type	64-bit operating system, x64-based processor
Edition	Windows 11 Enterprise
Version	23H2
Installed on	‎07.‎10.‎2022
OS build	22631.4751
Experience	Windows Feature Experience Pack 1000.22700.1055.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the upgrade with winget 1.9.25200 and inspect the cached manifest under Microsoft/OpenJDK/17/17.0.14.7. Review the installer-selection diagnostics in UpdateFlow.cpp, then verify that an x64 installer is selected for the reported system and the upgrade completes.

Written by the indexing model from the issue text.

Assessment

Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.