microsoft / winget-pkgs

The Microsoft community Windows Package Manager manifest repository
MIT License
8.72k stars 4.55k forks source link

[Package Issue]: Mozilla.Firefox is on `winget list` but not labeled as winget source package #51343

Closed GNQG closed 1 year ago

GNQG commented 2 years ago

Please confirm these before moving forward

Category of the issue

Installation issue.

Brief description of your issue

I have installed Firefox via chocolatey and found that it was not labeled as winget source package, so I uninstalled it manually and reinstall with winget. But after re-installation it is still not labeled.

Steps to reproduce

winget install Mozilla.Firefox

Actual behavior

$ winget list firefox
名前                     ID                            バージョン
-----------------------------------------------------------------
Mozilla Firefox (x64 ja) Mozilla Firefox 98.0 (x64 ja) 98.0

Expected behavior

like:

$ winget list firefox
名前               ID                    バージョン     ソース
------------------------------------------------------------
Mozilla Firefox    Mozilla.Firefox       98.0         winget

Environment

Windows パッケージ マネージャー v1.2.10271
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19044.1586
パッケージ: Microsoft.DesktopAppInstaller v1.17.10271.0

ログ: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir

Screenshots and Logs

Note: Registry entry for Firefox (use code from Get-ARPTable from SandboxTest.ps1)

$ $registry_paths = @('HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*','HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*', 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*', 'HKCU:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*')
$ Get-ItemProperty $registry_paths -ErrorAction SilentlyContinue |  Where-Object {$_.DisplayName -like "*firefox*" }

Comments        : Mozilla Firefox 98.0 (x64 ja)
DisplayIcon     : C:\Program Files\Mozilla Firefox\firefox.exe,0
DisplayName     : Mozilla Firefox (x64 ja)
DisplayVersion  : 98.0
HelpLink        : https://support.mozilla.org
InstallLocation : C:\Program Files\Mozilla Firefox
Publisher       : Mozilla
UninstallString : "C:\Program Files\Mozilla Firefox\uninstall\helper.exe"
URLUpdateInfo   : https://www.mozilla.org/firefox/98.0/releasenotes
URLInfoAbout    : https://www.mozilla.org
NoModify        : 1
NoRepair        : 1
EstimatedSize   : 213064
PSPath          : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\Mozilla Firefox 98.0 (x64 ja)
PSParentPath    : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall
PSChildName     : Mozilla Firefox 98.0 (x64 ja)
PSDrive         : HKLM
PSProvider      : Microsoft.PowerShell.Core\Registry
Trenly commented 2 years ago

I think this is intentional behavior. Even when using winget list to show all my installed programs it doesn't show the source any of them are from. I believe this should be a feature request in the CLI repository

jedieaston commented 2 years ago

This is a bug in the winget client I think, as it shows the source on a plain winget list:

C:\Users\easton> winget list
Name                                     Id                                          Version           Available Source
-----------------------------------------------------------------------------------------------------------------------
1Password                                AgileBits.1Password                         8.5.0                       winget
Visual Studio Community 2022             Microsoft.VisualStudio.2022.Community       17.1.0                      winget
Vortex                                   NexusMods.Vortex                            1.5.6                       winget
Ubuntu                                   Canonical.Ubuntu                            2004.2021.825.0             winget
Cisco AnyConnect Secure Mobility Client  Cisco AnyConnect Secure Mobility Client     4.8.02045
Discord                                  Discord.Discord                             1.0.9003          1.0.9004  winget
Docker Desktop                           Docker.DockerDesktop                        4.5.1                       winget
GNQG commented 2 years ago

In my environment plain winget list shows sources too:

$ winget list
名前                                               ID                                                   バージョン          ソース
-----------------------------------------------------------------------------------------------------------------------------------
7-Zip                                              7zip.7zip                                            21.07               winget
Amazon Kindle                                      Amazon.Kindle                                        1.33.0.62002        winget
Ubuntu 20.04 LTS                                   Canonical.Ubuntu.2004                                2004.2022.8.0       winget
Chromium                                           Chromium                                             97.0.4692.99
Creative Sound Blaster USB Audio Drivers Installer CtKsUSBDrvInst_is1                                   1.0.03.02

 ... long result ...

Groove ミュージック                                Microsoft.ZuneMusic_8wekyb3d8bbwe                    10.21102.11411.0
映画 & テレビ                                      Microsoft.ZuneVideo_8wekyb3d8bbwe                    10.22011.10031.0
Mozilla Firefox (x64 ja)                           Mozilla Firefox 98.0 (x64 ja)                        98.0
Mozilla Maintenance Service                        MozillaMaintenanceService                            98.0
Neat Video v5.4.1 Demo plug-in for Resolve (64-bi… Neat Video v5 plug-in for Resolve_is1                Unknown
Notepad++                                          Notepad++.Notepad++                                  8.3.2               winget
Microsoft OneDrive                                 Microsoft.OneDrive                                   22.022.0130.0001    winget
Playnite                                           Playnite.Playnite                                    9.16                winget
RivaTuner Statistics Server 7.3.3                  RTSS                                                 7.3.3

 ... long result ...

Additionally listing for a correctly tracked package entry shows source correctly too:

$ winget list notepad++
名前      ID                  バージョン ソース
------------------------------------------------
Notepad++ Notepad++.Notepad++ 8.3.2      winget

So I guessed this was the problem around manifest files for Firefox (especially ProductCode?) and opened this issue. Note that core problem on this issue is that Firefox is not recognized as valid winget package via list, upgrade, uninstall subcommand. I'm sorry I set misleading title.

ivonenchev commented 2 years ago

Could you try with the command :

winget search firefox

Mozilla Firefox Mozilla.Firefox 98.0 Moniker: firefox winget Mozilla Firefox ESR Mozilla.Firefox.ESR 91.7.0 Command: firefox winget Mozilla Firefox (Beta) Mozilla.Firefox.Beta 97.0 Command: firefox winget Firefox Developer Edition Mozilla.Firefox.DeveloperEdition 98.0b2 Tag: firefox winget

GNQG commented 2 years ago
$ winget search firefox
名前                      ID                               バージョン      一致              ソース
----------------------------------------------------------------------------------------------------
Mozilla Firefox Browser   9NZVDKPMR9RD                     Unknown                           msstore
Mozilla Firefox           Mozilla.Firefox                  98.0            Moniker: firefox  winget
Mozilla Firefox ESR       Mozilla.Firefox.ESR              91.7.0          Command: firefox  winget
Mozilla Firefox (Beta)    Mozilla.Firefox.Beta             97.0            Command: firefox  winget
Firefox Developer Edition Mozilla.Firefox.DeveloperEdition 98.0b2          Tag: firefox      winget
MozBackup                 JasnaPaka.MozBackup              1.5.1           Tag: firefox      winget
PWAsForFirefox            filips.FirefoxPWA                1.4.0           Tag: firefox      winget
Mypal                     Feodor2.Mypal                    29.3.0          Tag: firefox      winget
Basilisk                  basilisk.basilisk                52.9.2021.12.13 Tag: firefox      winget
Nightly                   Mozilla.Firefox.Nightly          97.0a1                            winget
Pale Moon                 MoonchildProductions.PaleMoon    29.4.4          Tag: firefox-fork winget
LibreWolf                 LibreWolf.LibreWolf              98.0            Tag: firefox-fork winget
jedieaston commented 2 years ago

We haven't been accounting for non-GUID Product Codes for Firefox (since the MSI doesn't have them). I think we'll have to fix that.

GNQG commented 2 years ago

Hmm I tried to install Mozilla.Firefox.ESR and got correct winget list entry for it, then uninstalled it and reinstall Mozilla.Firefox, finally got correct entry on winget list for Mozilla.Firefox...

I cannot explain why the problem resolved but thank you anyway.

OfficialEsco commented 2 years ago

I believe the issue is Mozilla Firefox (x64 ja) winget-cli does not detect (x64 ja) as a ARP match, looks like we have to use AppsAndFeaturesEntries

nevermind, this just turned into a weird issue, the en-US version's DisplayName is actually Mozilla Firefox (x64 en-US) too

  1. boot up a clean VM/Sandbox
  2. Install a) https://download-installer.cdn.mozilla.net/pub/firefox/releases/98.0/win64/en-US/Firefox%20Setup%2098.0.msi b) https://download-installer.cdn.mozilla.net/pub/firefox/releases/98.0/win64/en-US/Firefox%20Setup%2098.0.exe
  3. winget list
    Name                                       Id                                          Version           Available    Source
    ----------------------------------------------------------------------------------------------------------------------------
    Mozilla Firefox (x64 en-US)                Mozilla Firefox 98.0 (x64 en-US)            98.0

Earlier it fixed it self after doing a winget install mozilla.firefox, but it does not anymore

GNQG commented 1 year ago

winget-firefox

I realized current manifest worked well in sandbox. Thank you all :)