Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Trying to update all apps where old and new version coexists with each update run #539

Closed
ztrhgf opened this issue Dec 20, 2023 · 9 comments
Labels
bug Something isn't working stale

Comments

@ztrhgf
Copy link

ztrhgf commented Dec 20, 2023

The problem

Imagine a situation where you have two versions of some app (7zip in my case) installed. For example 16.04 and 21.00 and the 21.00 is the latest available version.

If you run update task, it detects the 16.04 and tries to update it to 21.00. Because it is already installed, nothing happens, just a successful installation notification will pop up.

The problem is that this process will be repeated with every update task run.

Btw in my test environment, this relates to SSMS, 7zip, PowerShell Core, Putty, and Python.

The situation where you have more than one version of the app installed can occur by failed update task, where it just installs a new version side by side with the older one:

image
image

What version of WAU has the issue?

1.19.1

What version of Windows are you using (ex. Windows 11 22H2)?

Windows 10 22H2

What version of winget are you using?

v1.6.3482

Log information

################################################################
#     20.12.2023 - CHECK FOR APP UPDATES (System context - Connected user)
################################################################
10:32:33 - Notification Level: Full. Notification Language: English
10:32:33 - Checking internet connection...
10:32:33 - Connected !
10:32:33 - Winget Version: v1.6.3482
10:32:33 - WAU current version: 1.19.1
10:32:33 - WAU AutoUpdate is Disabled.
10:32:33 - WAU uses External Mods from: C:\WINDOWS\Scripts2\Tools\Winget-Install\mods
10:32:33 - Mods are up to date.
10:32:33 - WAU uses Black List config
10:32:33 - Checking application updates on Winget Repository...
-> Available update : PuTTY release 0.78 (64-bit). Current version : 0.78.0.0. Available version : 0.80.0.0.
-> Available update : Python Launcher. Current version : < 3.12.0. Available version : 3.12.0.
-> Available update : Microsoft SQL Server Management Studio - 18.10. Current version : 18.10. Available version : 19.2.
-> Available update : Mozilla Firefox (x64 en-US). Current version : 112.0. Available version : 120.0.1.
-> Available update : PowerShell 7.3.10.0-x64. Current version : 7.3.10.0. Available version : 7.4.0.0.
-> Available update : 7-Zip 16.04 (x64 edition). Current version : 16.04.00.0. Available version : 23.01.
10:32:36 - Updating PuTTY release 0.78 (64-bit) from 0.78.0.0 to 0.80.0.0...
10:32:40 - ##########   WINGET UPGRADE PROCESS STARTS FOR APPLICATION ID 'PuTTY.PuTTY'   ##########
10:32:40 - -> Running: Winget upgrade --id PuTTY.PuTTY -e --accept-package-agreements --accept-source-agreements -s winget -h


  ███▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  1024 KB / 8.64 MB
  ██████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  2.00 MB / 8.64 MB
  ██████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  3.00 MB / 8.64 MB
  █████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  4.00 MB / 8.64 MB
  █████████████████▒▒▒▒▒▒▒▒▒▒▒▒▒  5.00 MB / 8.64 MB
  ████████████████████▒▒▒▒▒▒▒▒▒▒  6.00 MB / 8.64 MB
  ████████████████████████▒▒▒▒▒▒  7.00 MB / 8.64 MB
  ███████████████████████████▒▒▒  8.00 MB / 8.64 MB
  ██████████████████████████████  8.64 MB / 8.64 MB
No installed package found matching input criteria.
10:32:43 - ##########   WINGET UPGRADE PROCESS FINISHED FOR APPLICATION ID 'PuTTY.PuTTY'   ##########
10:32:43 - PuTTY release 0.78 (64-bit) updated to 0.80.0.0 !
10:32:48 - Updating Python Launcher from < 3.12.0 to 3.12.0...
10:32:51 - ##########   WINGET UPGRADE PROCESS STARTS FOR APPLICATION ID 'Python.Launcher'   ##########
10:32:51 - -> Running: Winget upgrade --id Python.Launcher -e --accept-package-agreements --accept-source-agreements -s winget -h


  ███▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  1024 KB / 8.64 MB
  ██████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  2.00 MB / 8.64 MB
  ██████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  3.00 MB / 8.64 MB
  █████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  4.00 MB / 8.64 MB
  █████████████████▒▒▒▒▒▒▒▒▒▒▒▒▒  5.00 MB / 8.64 MB
  ████████████████████▒▒▒▒▒▒▒▒▒▒  6.00 MB / 8.64 MB
  ████████████████████████▒▒▒▒▒▒  7.00 MB / 8.64 MB
  ███████████████████████████▒▒▒  8.00 MB / 8.64 MB
  ██████████████████████████████  8.64 MB / 8.64 MB
No installed package found matching input criteria.
10:32:55 - ##########   WINGET UPGRADE PROCESS FINISHED FOR APPLICATION ID 'Python.Launcher'   ##########
10:32:55 - Python Launcher updated to 3.12.0 !
10:32:59 - Updating Microsoft SQL Server Management Studio - 18.10 from 18.10 to 19.2...
10:33:02 - ##########   WINGET UPGRADE PROCESS STARTS FOR APPLICATION ID 'Microsoft.SQLServerManagementStudio'   ##########
10:33:02 - -> Running: Winget upgrade --id Microsoft.SQLServerManagementStudio -e --accept-package-agreements --accept-source-agreements -s winget -h


  ███▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  1024 KB / 8.64 MB
  ██████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  2.00 MB / 8.64 MB
  ██████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  3.00 MB / 8.64 MB
  █████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  4.00 MB / 8.64 MB
  █████████████████▒▒▒▒▒▒▒▒▒▒▒▒▒  5.00 MB / 8.64 MB
  ████████████████████▒▒▒▒▒▒▒▒▒▒  6.00 MB / 8.64 MB
  ████████████████████████▒▒▒▒▒▒  7.00 MB / 8.64 MB
  ███████████████████████████▒▒▒  8.00 MB / 8.64 MB
  ██████████████████████████████  8.64 MB / 8.64 MB
No available upgrade found.
No newer package versions are available from the configured sources.
10:33:06 - ##########   WINGET UPGRADE PROCESS FINISHED FOR APPLICATION ID 'Microsoft.SQLServerManagementStudio'   ##########
10:33:06 - Microsoft SQL Server Management Studio - 18.10 updated to 19.2 !
10:33:09 - Mozilla Firefox (x64 en-US) : Skipped upgrade because it is in the excluded app list
10:33:10 - Updating PowerShell 7.3.10.0-x64 from 7.3.10.0 to 7.4.0.0...
10:33:13 - ##########   WINGET UPGRADE PROCESS STARTS FOR APPLICATION ID 'Microsoft.PowerShell'   ##########
10:33:13 - -> Running: Winget upgrade --id Microsoft.PowerShell -e --accept-package-agreements --accept-source-agreements -s winget -h


  ███▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  1024 KB / 8.64 MB
  ██████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  2.00 MB / 8.64 MB
  ██████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  3.00 MB / 8.64 MB
  █████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  4.00 MB / 8.64 MB
  █████████████████▒▒▒▒▒▒▒▒▒▒▒▒▒  5.00 MB / 8.64 MB
  ████████████████████▒▒▒▒▒▒▒▒▒▒  6.00 MB / 8.64 MB
  ████████████████████████▒▒▒▒▒▒  7.00 MB / 8.64 MB
  ███████████████████████████▒▒▒  8.00 MB / 8.64 MB
  ██████████████████████████████  8.64 MB / 8.64 MB
No available upgrade found.
No newer package versions are available from the configured sources.
10:33:16 - ##########   WINGET UPGRADE PROCESS FINISHED FOR APPLICATION ID 'Microsoft.PowerShell'   ##########
10:33:16 - PowerShell 7.3.10.0-x64 updated to 7.4.0.0 !
10:33:21 - Updating 7-Zip 16.04 (x64 edition) from 16.04.00.0 to 23.01...
10:33:24 - ##########   WINGET UPGRADE PROCESS STARTS FOR APPLICATION ID '7zip.7zip'   ##########
10:33:24 - -> Running: Winget upgrade --id 7zip.7zip -e --accept-package-agreements --accept-source-agreements -s winget -h


  ███▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  1024 KB / 8.64 MB
  ██████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  2.00 MB / 8.64 MB
  ██████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  3.00 MB / 8.64 MB
  █████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  4.00 MB / 8.64 MB
  █████████████████▒▒▒▒▒▒▒▒▒▒▒▒▒  5.00 MB / 8.64 MB
  ████████████████████▒▒▒▒▒▒▒▒▒▒  6.00 MB / 8.64 MB
  ████████████████████████▒▒▒▒▒▒  7.00 MB / 8.64 MB
  ███████████████████████████▒▒▒  8.00 MB / 8.64 MB
  ██████████████████████████████  8.64 MB / 8.64 MB
No installed package found matching input criteria.
10:33:28 - ##########   WINGET UPGRADE PROCESS FINISHED FOR APPLICATION ID '7zip.7zip'   ##########
10:33:28 - 7-Zip 16.04 (x64 edition) updated to 23.01 !
10:33:31 - 5 apps updated ! No more update.
10:33:32 - User logged on, get a list of installed Winget apps in System context...
10:33:35 - Starting WAU in User context...
 
################################################################
#     20.12.2023 - CHECK FOR APP UPDATES (User context)
################################################################
10:33:36 - Notification Level: Full. Notification Language: English
10:33:36 - Checking internet connection...
10:33:36 - Connected !
10:33:36 - Winget Version: v1.6.3482
10:33:36 - WAU current version: 1.19.1
10:33:36 - WAU uses Black List config
10:33:36 - Checking application updates on Winget Repository...
-> Available update : Python 3.11.5 (64-bit). Current version : 3.11.5. Available version : 3.11.6.
-> Available update : Microsoft Teams classic. Current version : 1.6.00.26474. Available version : 1.6.00.33567.
10:33:39 - Python 3.11.5 (64-bit) : Skipped upgrade because it is in the excluded app list
10:33:39 - Microsoft Teams classic : Skipped upgrade because it is in the excluded app list
10:33:39 - No new update.
10:33:39 - End of process!

Additional information

The proposed fix would be to ignore the application if the same application with the latest version is already installed.

@ztrhgf ztrhgf added the bug Something isn't working label Dec 20, 2023
@ztrhgf

This comment was marked as resolved.

Copy link
Contributor

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Jan 27, 2024
@ztrhgf
Copy link
Author

ztrhgf commented Jan 29, 2024

ping

@github-actions github-actions bot removed the stale label Jan 30, 2024
@antgiant
Copy link

FYI that the true root cause of this is slowly being addressed by the underlying winget tool. microsoft/winget-cli#2129

@AndrewDemski-ad-gmail-com
Copy link
Contributor

AndrewDemski-ad-gmail-com commented Jan 30, 2024

Hm.. in such a scenario, the burden of replacing older versions falls on the manufacturer of the installation package.
This means we rely on a random element in this seemingly flawless logic.

As long as the standard for creating product identifiers requires only <manufacturer>.<application> pairs, there will be no effective method for selecting PROD/PREPROD/RC/DEV channels (i.e. <manufacturer>.<application>.<channel>).

As long as users continue to mix InstallerTypes and installation scopes (user/machine), by installing multiple versions of apps in user scopes and then in machine scopes, we will continue to see this mess.

As long as manufacturers omit the installation scope in their application manifests, winget will remain lost in the wanderings of detection.

As long as manufacturers rely on a single context to automatically detect MSI files, we will see problems like those mentioned in #557 about Google Chrome messing around with someone's system.

here you may see that in both contexts - user and machine - it uses the same installer(s) and detection method(s).

Honestly, I don't think the burden of fixing this situation should fall on WAU.

@antgiant
Copy link

Interestingly the core underlying winget is addressing all of this just as separate items. Prod/dev/etc is being addressed at microsoft/winget-cli#3940 and the additional info needed to disambiguate side by side installs is in the current proposed spec for it microsoft/winget-cli#3940 (comment)

Copy link
Contributor

github-actions bot commented Mar 1, 2024

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Mar 1, 2024
Copy link
Contributor

This issue was closed because it has been inactive for 14 days since being marked as stale.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 16, 2024
@ztrhgf
Copy link
Author

ztrhgf commented Mar 18, 2024

ping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

3 participants