microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
23.09k stars 1.44k forks source link

Update Keeps reporting Google Chrome Needs Updating #696

Closed mrcsdf closed 2 months ago

mrcsdf commented 3 years ago

Brief description of your issue

Each time I run upgrade only one package comes up as needing an update Google Chrome

Steps to reproduce

winget upgrade # List all packages needing upgrade Name Id Version Available Source

Google Chrome Google.Chrome 87.0.4280.141 latest winget

winget upgrade Google.Chrome Found Google Chrome [Google.Chrome] 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://dl.google.com/edgedl/chrome/install/GoogleChromeStandaloneEnterprise64.msi ██████████████████████████████ 68.9 MB / 68.9 MB Successfully verified installer hash Starting package install... Successfully installed

winget upgrade Name Id Version Available Source

Google Chrome Google.Chrome 87.0.4280.141 latest winget

Expected behavior

Upgrade Chrome does not come up in list of upgradeable apps. I also suspect other apps need upgrade just not coming up as part of the report.

Actual behavior

Google Chrome upgrades and still shows up

Chrome upgrades and then shows up available for upgrade subsequently

Environment

❯ winget --info Windows Package Manager v0.2.3162 Preview Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.21286.1000 Package: Microsoft.DesktopAppInstaller v1.11.3162.0

Logs: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir

Links

Privacy Statement https://aka.ms/winget-privacy License Agreement https://aka.ms/winget-license Third Party Notices https://aka.ms/winget-3rdPartyNotice

Any other software?

jedieaston commented 3 years ago

This most likely has something to do with Google Chrome's version being "latest" and not the actual version number. Since winget list reports a real version number, it doesn't have a way to determine whether that version is latest or not.

Maybe instead of latest, whoever updates the manifest should put the real version number and just remove the previous manifest (this is usually wingetbot these days, so I don't know if it can do that by itself or not).

Edit: It already does this for Heroku (see microsoft/winget-pkgs#6003), so it could do the same for Chrome.

denelon commented 3 years ago

We're looking into whether or not we can auto-detect the version from the MSI installer. If we can, we'll see about updating the version. The automation we have will continue to update the manifest as the version changes if that's the case.

denelon commented 3 years ago

The MSI reported version 68.46.141, but when I installed it I got version 87.0.4280.141 from list.

lychichem commented 3 years ago

The MSI reported version 68.46.141, but when I installed it I got version 87.0.4280.141 from list.

image Version Number of GoogleChromeEnterprise can be found in 属性-详细信息-备注 like in this picture. For other msi, version number may be at 类别. The only problem is how to extract these strings out.

denelon commented 3 years ago

It appears that the installer version doesn't report what is actually being installed. In this case, the MSI version is below the version that is being reported by Add/Remove programs. This would mean that once you had installed the package, you would not be informed about a newer version being available. I'm expecting that other packages will exhibit the same behavior. The question is whether or not the developer/publisher would be willing to update their installer version or we need another mechanism to correctly capture the version of what is being installed in the manifest somehow.

walderston commented 3 years ago

I have the issue with Chrome were trying to update and I get 'No applicable update found'

WindowsTerminal_6T26WeC2a1

jedieaston commented 3 years ago

Can you post the output of winget --info?

walderston commented 3 years ago

Yep @jedieaston WindowsTerminal_nAB50StFyx

ItzLevvie commented 3 years ago

I have the issue with Chrome were trying to update and I get 'No applicable update found'

WindowsTerminal_6T26WeC2a1

This issue is related to the differences between the .exe and .msi versions since the manifests for Google Chrome only includes the .msi version and not both.

It's trying to look for the .exe but fails.

This is also reproducible for Microsoft Edge (Stable, Dev & Beta) & Google Chrome (Beta & Dev).

lychichem commented 3 years ago

I have the issue with Chrome were trying to update and I get 'No applicable update found' WindowsTerminal_6T26WeC2a1

This issue is related to the differences between the .exe and .msi versions since the manifests for Google Chrome only includes the .msi version and not both.

It's trying to look for the .exe but fails.

This is also reproducible for Microsoft Edge (Stable, Dev & Beta) & Google Chrome (Beta & Dev).

So, I can find .exe standalone installer for chrome, and will it fix the issue for Google Chrome? And, how to deal with .exe installer and .msi installer? Besides, as far as I know, there are no standalone exe installer for Edge, so the issue will not get fixed for edge.

ItzLevvie commented 3 years ago

So, I can find .exe standalone installer for chrome, and will it fix the issue for Google Chrome?

Yes, it should as long as the installer is from https://www.google.com/chrome because that's where most people download Google Chrome for their personal and testing machines - iirc the enterprise installer is more targeted towards businesses for corporate deployment.

I can upgrade Google Chrome Canary with no issues on WinGet but WinGet fails to update Google Chrome, Google Chrome Beta & Google Chrome Dev because those applications were downloaded using the .exe installer as there are safeguarding measures implemented for Windows Package Manager where it'll prevent updating .msi applications to .exe applications and .exe applications to .msi applications . The only methods are allowed are .msi to .msi and .exe to .exe.

And, how to deal with .exe installer and .msi installer?

You would've to include both of them in the manifest. Just like how it's done for Microsoft Teams over at https://github.com/microsoft/winget-pkgs/blob/fe6e4d1b2302b0d5eab221fffc2e93770deec27a/manifests/m/Microsoft/Teams/1.4.00.19572/Microsoft.Teams.installer.yaml#L5-L47.

Besides, as far as I know, there are no standalone exe installer for Edge, so the issue will not get fixed for edge.

There is an offline installer for Edge, but they're all using temporary URLs, so you would have to use the online installer for now which is a method that's used for Google Chrome Canary in WinGet.

Stable - neutral: https://c2rsetup.officeapps.live.com/c2r/downloadEdge.aspx?platform=Default&Channel=Stable&language=en Beta - neutral: https://c2rsetup.officeapps.live.com/c2r/downloadEdge.aspx?platform=Default&Channel=Beta&language=en Dev - neutral: https://c2rsetup.officeapps.live.com/c2r/downloadEdge.aspx?platform=Default&Channel=Dev&language=en Canary - neutral: https://c2rsetup.officeapps.live.com/c2r/downloadEdge.aspx?platform=Default&Channel=Canary&language=en

lychichem commented 3 years ago

So, I can find .exe standalone installer for chrome, and will it fix the issue for Google Chrome?

Yes, it should as long as the installer is from https://www.google.com/chrome because that's where most people download Google Chrome for their personal and testing machines - iirc the enterprise installer is more targeted towards businesses for corporate deployment.

I can upgrade Google Chrome Canary with no issues on WinGet but WinGet fails to update Google Chrome, Google Chrome Beta & Google Chrome Dev because those applications were downloaded using the .exe installer as there are safeguarding measures implemented for Windows Package Manager where it'll prevent updating .msi applications to .exe applications and .exe applications to .msi applications . The only methods are allowed are .msi to .msi and .exe to .exe.

And, how to deal with .exe installer and .msi installer?

You would've to include both of them in the manifest. Just like how it's done for Microsoft Teams over at https://github.com/microsoft/winget-pkgs/blob/fe6e4d1b2302b0d5eab221fffc2e93770deec27a/manifests/m/Microsoft/Teams/1.4.00.19572/Microsoft.Teams.installer.yaml#L5-L47.

Besides, as far as I know, there are no standalone exe installer for Edge, so the issue will not get fixed for edge.

There is an offline installer for Edge, but they're all using temporary URLs, so you would have to use the online installer for now which is a method that's used for Google Chrome Canary in WinGet.

Stable - neutral: https://c2rsetup.officeapps.live.com/c2r/downloadEdge.aspx?platform=Default&Channel=Stable&language=en Beta - neutral: https://c2rsetup.officeapps.live.com/c2r/downloadEdge.aspx?platform=Default&Channel=Beta&language=en Dev - neutral: https://c2rsetup.officeapps.live.com/c2r/downloadEdge.aspx?platform=Default&Channel=Dev&language=en Canary - neutral: https://c2rsetup.officeapps.live.com/c2r/downloadEdge.aspx?platform=Default&Channel=Canary&language=en

I mean, as we cannot select installer type (exe or msi) now, is it ok to write both types of installers into one manifest?

walderston commented 3 years ago

@lychichem I'd assume yes as MS Teams uses both .msi and .exe in the same manifest.

jedieaston commented 3 years ago

I mean, as we cannot select installer type (exe or msi) now, is it ok to write both types of installers into one manifest?

It can, but note that @wingetbot will remove the exe from the manifest when the hash changes. It should do this without removing the entire manifest, but it's something to be aware of.

@ItzLevvie, I don't know if we can figure this out or not until we have a couple versions in the repo, but Edge's exe (and the MSI, if I'm not mistaken) are used to bootstrap an appx package. Can the exe installer still upgrade this? I know I get errors when attempting to do winget install Microsoft.Edge in sandboxes that already have Edge Chromium installed, but I haven't tried upgrade.

lychichem commented 3 years ago

I mean, as we cannot select installer type (exe or msi) now, is it ok to write both types of installers into one manifest?

It can, but note that @wingetbot will remove the exe from the manifest when the hash changes. It should do this without removing the entire manifest, but it's something to be aware of.

@ItzLevvie, I don't know if we can figure this out or not until we have a couple versions in the repo, but Edge's exe (and the MSI, if I'm not mistaken) are used to bootstrap an appx package. Can the exe installer still upgrade this? I know I get errors when attempting to do winget install Microsoft.Edge in sandboxes that already have Edge Chromium installed, but I haven't tried upgrade.

If it can, then we don't need to split 7zip into 7zip.exe and 7zip.msi... If you know some switch we don't know, plz share it, thanks! Edit: I see, you mean using .exe for user install and.msi for system install, but it will not work if a package cannot install as user mode, or provide both exe and msi for user/system mode.

bozhodimitrov commented 2 years ago

I can confirm that the winget binary didn't upgrade my winget installed Google Chrome version. Strangely enough even the self-update option of Chrome wasn't working. But when I downloaded the Google Setup installer from the official Google website, it managed to upgrade my current installation of Chrome.

Very strange and annoying behavior, since the whole point of winget is to not go to external websites and deal with installers ...

Trenly commented 7 months ago

@mrcsdf - Are you still seeing this issue?

pfeileon commented 6 months ago
$ winget upgrade --all
# Google Chrome                             Google.Chrome    123.0.6312.86    123.0.6312.87    winget

But Chrome says it's already at the latest version: Version 123.0.6312.86.