microsoft / microsoft/winget-cli

Winget unable to install firefox when version number is specified

Open
#4,859 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Command-Search Issue-Bug
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Brief description of your issue

Winget search currently shows the Mozilla.Firefox package at version 131

❯ winget.exe search mozilla.firefox
Name                              Id                               Version Source
----------------------------------------------------------------------------------
Mozilla Firefox                   Mozilla.Firefox                  131     winget

When attempting to install with that version number, I get an error:

❯ winget.exe install --id "Mozilla.Firefox" --exact --source winget --accept-source-agreements --version "131" --silent --disable-interactivity --accept-package-agreements
No version found matching: 131

However, if the version number is left off, I see:

❯ winget.exe install --id "Mozilla.Firefox" --exact --source winget --accept-source-agreements  --accept-package-agreements
Found Mozilla Firefox [Mozilla.Firefox] Version 131.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.
Downloading https://download-installer.cdn.mozilla.net/pub/firefox/releases/131.0/win64/en-GB/Firefox%20Setup%20131.0.exe

And if I attempt to then install specifying "131.0" as the version number, it does work:

❯ winget.exe install --id "Mozilla.Firefox" --exact --source winget --accept-source-agreements --version "131.0" --accept-package-agreements
Found Mozilla Firefox [Mozilla.Firefox] Version 131.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.
Downloading https://download-installer.cdn.mozilla.net/pub/firefox/releases/131.0/win64/en-GB/Firefox%20Setup%20131.0.exe
  ██████████████████████████████  63.5 MB / 63.5 MB
Successfully verified installer hash
Starting package install...
Successfully installed
Steps to reproduce

winget.exe search Mozilla.Firefox
winget.exe install --id "Mozilla.Firefox" --version "131"
winget.exe install --id "Mozilla.Firefox" --version "131.0"

Expected behavior

I expect Winget to be able to install Mozilla Firefox when specifying the version number that is shown in winget search

Actual behavior

Winget is not able to install Mozilla Firefox if the version number shown with winget search is specified, however, a more precise version number works

Environment

❯ winget --info
Windows Package Manager v1.8.1911
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22631.4249
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.23.1911.0

Winget Directories

Logs %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
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

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 reported winget search and install commands with Mozilla.Firefox, comparing the displayed version 131 with the installable version 131.0. Trace the CLI's version matching path for package installation. Done means a version shown by winget search can be passed directly to winget install and succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
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.