Skip to content

winget update reports a Hashicorp.Terraform update is available, but winget update Hashicorp.Terraform says none is found #4761

Open

Description

Brief description of your issue

Running winget update reports a Hashicorp.Terraform update is available, but winget update Hashicorp.Terraform says none is found:

image

See logs:
WinGet-2024-08-28-09-37.zip

Steps to reproduce

On a system with Hashicorp.Terraform version 1.9.0 installed, run winget update Hashicorp.Terraform

Expected behavior

Hashicorp.Terraform version 1.9.5 should get installed

Actual behavior

winget update Hashicorp.Terraform reports No installed package found matching input criteria.

Environment

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

Windows: Windows.Desktop v10.0.19045.4780
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.23.1911.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
Installer Downloads                %USERPROFILE%\Downloads

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
ProxyCommandLineOptions                   Disabled
DefaultProxy                              Disabled

Activity

  1. denelon commented on Aug 28, 2024

    @denelon
    Collaborator

    What is the output from winget list terraform?

    Can you share verbose logs from the failure?

    winget upgrade Hashicorp.Terraform --source winget --verbose-logs --logs

  2. added
    Issue-Bug
    Area-Matching
    on Aug 28, 2024
  3. sba923 commented on Aug 28, 2024

    @sba923
    Author

    Here's the output:

    PS> winget list terraform
    Name                Id                  Version Available Source
    ----------------------------------------------------------------
    Hashicorp Terraform Hashicorp.Terraform 1.9.0   1.9.5     winget
    

    Here are the logs:
    WinGet-2024-08-28-16-5X.zip

  4. denelon commented on Aug 28, 2024

    @denelon
    Collaborator

    It looks like we're seeing multiple correlations. I'm not sure if there are extra registry entries or something else causing the failure.

    I think this is the same issue as:

    winget search hashicorp.terraform
    Name                Id                        Version              Source
    --------------------------------------------------------------------------
    Hashicorp Terraform Hashicorp.Terraform       1.9.5                winget
    Hashicorp Terraform Hashicorp.Terraform.Alpha 1.10.0-alpha20240807 winget
    Hashicorp Terraform Hashicorp.Terraform.Beta  1.7.0-beta2          winget
    Hashicorp Terraform Hashicorp.Terraform.RC    1.8.0-rc1            winget
    2024-08-28 16:54:58.417 [YAML] Detected UTF-8
    2024-08-28 16:54:58.489 [REPO] Performing search: Query:[none] Filter:Id='Hashicorp.Terraform'[CaseInsensitive]
    2024-08-28 16:54:58.498 [REPO] Finding installed package from available package using system reference search: Query:[none] Include:NormalizedNameAndPublisher='hashicorpterraform'+'hashicorp'[Exact] Include:NormalizedNameAndPublisher='terraform'+'hashicorp'[Exact]
    2024-08-28 16:54:58.498 [REPO] Performing search: Query:[none] Include:NormalizedNameAndPublisher='hashicorpterraform'+'hashicorp'[Exact] Include:NormalizedNameAndPublisher='terraform'+'hashicorp'[Exact]
    2024-08-28 16:54:58.499 [REPO] Performing search: Query:[none] Include:ProductCode='hashicorp.terraform_microsoft.winget.source_8wekyb3d8bbwe'[Exact] Include:NormalizedNameAndPublisher='hashicorpterraform'+'hashicorp'[Exact]
    2024-08-28 16:54:58.499 [REPO]  ... installed package [ARP\Machine\X64\Hashicorp.Terraform_Microsoft.Winget.Source_8wekyb3d8bbwe] had multiple correlations and is being ignored as a match for [Hashicorp.Terraform]
    
  5. stephengillie commented on Aug 28, 2024

    @stephengillie

    From the log:

    2024-08-28 16:54:58.489 [REPO] Performing search: Query:[none] Filter:Id='Hashicorp.Terraform'[CaseInsensitive]
    2024-08-28 16:54:58.498 [REPO] Finding installed package from available package using system reference search: Query:[none] Include:NormalizedNameAndPublisher='hashicorpterraform'+'hashicorp'[Exact] Include:NormalizedNameAndPublisher='terraform'+'hashicorp'[Exact]
    2024-08-28 16:54:58.498 [REPO] Performing search: Query:[none] Include:NormalizedNameAndPublisher='hashicorpterraform'+'hashicorp'[Exact] Include:NormalizedNameAndPublisher='terraform'+'hashicorp'[Exact]
    2024-08-28 16:54:58.499 [REPO] Performing search: Query:[none] Include:ProductCode='hashicorp.terraform_microsoft.winget.source_8wekyb3d8bbwe'[Exact] Include:NormalizedNameAndPublisher='hashicorpterraform'+'hashicorp'[Exact]
    2024-08-28 16:54:58.499 [REPO]  ... installed package [ARP\Machine\X64\Hashicorp.Terraform_Microsoft.Winget.Source_8wekyb3d8bbwe] had multiple correlations and is being ignored as a match for [Hashicorp.Terraform]
    2024-08-28 16:54:58.499 [CLI ] Search result size: 0
    2024-08-28 16:54:58.499 [CLI ] No app found matching input criteria
    

    2024-08-28 16:54:58.499 [REPO] ... installed package [ARP\Machine\X64\Hashicorp.Terraform_Microsoft.Winget.Source_8wekyb3d8bbwe] had multiple correlations and is being ignored as a match for [Hashicorp.Terraform]

    The package manager downloads a compressed copy of all manifests in the repo, then matches this data against the data in the Registry. It seems that the data in Registry might be matching to more than 1 manifest, and so the package manager ignores it.

    The next step would seem to be reducing the correlations to 1 through removing data that correlates to other manifest versions.

    • One way to do this might be uninstalling the application, then installing again with the package manager. This might obliterate all Registry data about the application, including the unwanted corellation.
    • Other options might be available.
  6. JohnMcPMS commented on Aug 28, 2024

    @JohnMcPMS
    Member

    That matching issue looks like it is with portables specifically, and is probably not due to other packages with ids that are longer, but rather with other packages that are so similar we can't tell them apart. Ultimately we should be able to go from portable directly to an ID and source but we aren't. I suspect that we just need some "enlightening" given to the ARP reading for portable specific info we write in. This should chain through the tracking DB back to the original package without any confusion 🤞

  7. sba923 commented on Aug 28, 2024

    @sba923
    Author

    It looks like we're seeing multiple correlations. I'm not sure if there are extra registry entries or something else causing the failure.

    Feel free to ask me to look up registry entries that winget relies upon.

  8. sba923 commented on Aug 29, 2024

    @sba923
    Author

    Seems that the registry only contains one entry:

    PS> Get-InstalledApp.ps1 -AppName '*terraform*' -MatchAll
    
    ComputerName    : <REDACTED>
    AppID           : Hashicorp.Terraform_Microsoft.Winget.Source_8wekyb3d8bbwe
    AppName         : Hashicorp Terraform
    Publisher       : HashiCorp
    Version         : 1.9.0
    UninstallString : winget uninstall --product-code Hashicorp.Terraform_Microsoft.Winget.Source_8wekyb3d8bbwe
    Scope           : Machine
    InstallDate     : 2024-07-01 00:00:00
    Architecture    : 64-bit
    
  9. sba923 commented on Sep 11, 2024

    @sba923
    Author

    Anything I can do to troubleshoot this further?

  10. sba923 commented on Sep 20, 2024

    @sba923
    Author

    Problem still present for version 1.9.6:

    image

    Exact same problem on another machine with RawTherapee.RawTherapee:

    image

  11. sba923 commented on Feb 9, 2025

    @sba923
    Author

    Would collecting data on that machine where the RawTherapee.RawTherapee problem is (still) present be of any help? If so, what should I collect?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-MatchingIssue-Bug

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions