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

Different package upgrade issues #1670

Closed
MikronT opened this issue Nov 3, 2021 · 7 comments
Closed

Different package upgrade issues #1670

MikronT opened this issue Nov 3, 2021 · 7 comments
Labels
Area-External Issue outside of winget-cli source Issue-Bug It either shouldn't be doing this or needs an investigation.
Milestone

Comments

@MikronT
Copy link

MikronT commented Nov 3, 2021

Brief description of your issue

3 major issues I faced:

  • WinGet can't find files for the upgradable packages
  • WinGet detects upgrades for the packages already upgraded
  • Can't finish upgrading some of the packages properly

Steps to reproduce

  1. Install any of the packages listed below:

    • Visual Studio Community 2019 16.11.4
    • Resource Hacker (version doesn't matter)
    • AOMEI Partition Assistant (version doesn't matter)
    • Viber 16.3.0.5
    • Java 8 8.0.3010.9
    • Oracle VM VirtualBox 6.1.26
    • PowerToys (Preview) 0.47.0
  2. Let these packages upgrade themselves:

    • PowerToys (Preview) (can be also upgraded manually)
    • Oracle VM VirtualBox (can be also upgraded manually)
    • Viber (upgrades itself automatically on start)
  3. Try to upgrade them all to the latest version using

    With all the packages listed above, the upgrade command syntax doesn't matter

    winget upgrade {packageName}
    winget upgrade {packageId}
    winget upgrade --id {packageId}

Expected behavior

  • Upgrade packages that can be upgraded
  • Finish all the upgrades successfully
  • Don't show upgrades for the latest versions of packages

Actual behavior

WinGet detects packages to upgrade:

D:\Computer\Desktop>winget upgrade
Name                         Id                                    Version    Available   Source
------------------------------------------------------------------------------------------------
Visual Studio Community 2019 Microsoft.VisualStudio.2019.Community 16.11.4    16.11.5     winget
Resource Hacker              AngusJohnson.ResourceHacker           Unknown    5.1.8       winget
AOMEI Partition Assistant    AOMEI.PartitionAssistant              Unknown    9.5.0       winget
Viber                        Viber.Viber                           16.3.0.5   16.4.0.7    winget
Java 8                       Oracle.JavaRuntimeEnvironment         8.0.3010.9 8.0.3110.11 winget
Oracle VM VirtualBox         Oracle.VirtualBox                     6.1.26     6.1.28      winget
PowerToys (Preview)          Microsoft.PowerToys                   0.47.0     0.49.1      winget
7 upgrades available.

And then produces different types of errors trying to perform upgrades:

  1. Visual Studio Community 2019

    Can find the upgrade but can't finish the installation.

    D:\Computer\Desktop>winget upgrade Microsoft.VisualStudio.2019.Community
    Found Visual Studio Community 2019 [Microsoft.VisualStudio.2019.Community] Version 16.11.5
    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.visualstudio.microsoft.com/download/pr/5a50b8ac-2c22-47f1-ba60-70d4257a78fa/d662d2f23b4b523f30e24cbd7e5e651c7c6a712f21f48e032f942dc678f08beb/vs_Community.exe
      ██████████████████████████████  1.40 MB / 1.40 MB
    Successfully verified installer hash
    Starting package install...
    Installer failed with exit code: 1
    

    A small dialog appears for some seconds, then disappears, and produces error level 1.

    image

    Log:

    2021-11-03 21:58:08.433 [CORE] Settings loaded from settings.json
    2021-11-03 21:58:08.433 [CORE] WinGet, version [1.1.12701], activity [{E94BC313-1D82-4025-AA44-4B6A021C5389}]
    2021-11-03 21:58:08.433 [CORE] OS: Windows.Desktop v10.0.19043.1320
    2021-11-03 21:58:08.433 [CORE] Command line Args: winget  upgrade Microsoft.VisualStudio.2019.Community
    2021-11-03 21:58:08.433 [CORE] Package: Microsoft.DesktopAppInstaller v1.16.12701.0
    2021-11-03 21:58:08.433 [CORE] IsCOMCall:0; Caller: winget-cli
    2021-11-03 21:58:08.451 [CLI ] WinGet invoked with arguments: 'upgrade' 'Microsoft.VisualStudio.2019.Community'
    2021-11-03 21:58:08.451 [CLI ] Found subcommand: upgrade
    2021-11-03 21:58:08.451 [CLI ] Leaf command to execute: root:upgrade
    2021-11-03 21:58:08.454 [CLI ] Executing command: upgrade
    2021-11-03 21:58:08.454 [REPO] GetCurrentSourceRefs: Source named 'microsoft.builtin.desktop.frameworks' from origin Default is a tombstone and is dropped.
    2021-11-03 21:58:08.454 [REPO] Default source requested, multiple sources available, creating aggregated source.
    2021-11-03 21:58:08.454 [REPO] Adding to aggregated source: msstore
    2021-11-03 21:58:08.454 [REPO] Source past auto update time [5 mins]; it has been at least 14 mins
    2021-11-03 21:58:08.455 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information
    2021-11-03 21:58:08.927 [REPO] Response status: 200
    2021-11-03 21:58:08.927 [REPO] Adding to aggregated source: winget
    2021-11-03 21:58:08.927 [REPO] Source past auto update time [5 mins]; it has been at least 14 mins
    2021-11-03 21:58:09.449 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
    2021-11-03 21:58:09.449 [CORE] Found matching extension.
    2021-11-03 21:58:09.455 [REPO] Remote source data was not newer than existing, no update needed
    2021-11-03 21:58:09.466 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
    2021-11-03 21:58:09.466 [CORE] Found matching extension.
    2021-11-03 21:58:09.541 [REPO] Opening SQLite Index for ImmutableRead at 'C:\Program Files\WindowsApps\Microsoft.Winget.Source_2021.1103.2035.97_neutral__8wekyb3d8bbwe\Public\index.db'
    2021-11-03 21:58:09.541 [SQL ] Opening SQLite connection: 'file:/C:/Program Files/WindowsApps/Microsoft.Winget.Source_2021.1103.2035.97_neutral__8wekyb3d8bbwe/Public/index.db?immutable=1' [1, 40]
    2021-11-03 21:58:09.542 [REPO] Opened SQLite Index with version [1.3], last write [2021-11-03 21:35:28.000]
    2021-11-03 21:58:09.837 [REPO] Creating PredefinedInstalledSource with filter [None]
    2021-11-03 21:58:09.837 [REPO] Creating new SQLite Index [4294967295.4294967295] at ':memory:'
    2021-11-03 21:58:09.837 [SQL ] Opening SQLite connection: ':memory:' [6, 0]
    2021-11-03 21:58:09.883 [REPO] Examining ARP entries for Machine | X64
    2021-11-03 21:58:09.930 [REPO] Examining ARP entries for Machine | X86
    2021-11-03 21:58:09.998 [REPO] Examining ARP entries for User | X64
    2021-11-03 21:58:10.473 [CLI ] Found one app. App id: Microsoft.VisualStudio.2019.Community App name: Visual Studio Community 2019
    2021-11-03 21:58:10.476 [REPO] Downloading manifest
    2021-11-03 21:58:10.476 [CORE] WinINet downloading from url: https://winget.azureedge.net/cache/manifests/m/Microsoft/VisualStudio/2019/Community/16.11.5/eac8-Microsoft.VisualStudio.2019.Community.yaml
    2021-11-03 21:58:11.099 [CORE] Download hash: 0aaae3d901d2841dac2b3c5145f0fe855a4950d819615fce2acf2e83543b8034
    2021-11-03 21:58:11.099 [CORE] Download completed.
    2021-11-03 21:58:11.100 [CLI ] Starting installer selection.
    2021-11-03 21:58:11.100 [CLI ] Completed installer selection.
    2021-11-03 21:58:11.111 [CLI ] Generated temp download path: C:\Users\DARKLI~1\AppData\Local\Temp\WinGet\Microsoft.VisualStudio.2019.Community.16.11.5
    2021-11-03 21:58:11.111 [CORE] Downloading to path: C:\Users\DARKLI~1\AppData\Local\Temp\WinGet\Microsoft.VisualStudio.2019.Community.16.11.5
    2021-11-03 21:58:11.111 [CORE] DeliveryOptimization downloading from url: https://download.visualstudio.microsoft.com/download/pr/5a50b8ac-2c22-47f1-ba60-70d4257a78fa/d662d2f23b4b523f30e24cbd7e5e651c7c6a712f21f48e032f942dc678f08beb/vs_Community.exe
    2021-11-03 21:58:12.123 [CORE] Download completed.
    2021-11-03 21:58:12.262 [CORE] Started applying motw to C:\Users\DARKLI~1\AppData\Local\Temp\WinGet\Microsoft.VisualStudio.2019.Community.16.11.5 with zone: 3
    2021-11-03 21:58:12.265 [CORE] Finished applying motw
    2021-11-03 21:58:12.265 [CLI ] Installer hash verified
    2021-11-03 21:58:12.266 [CORE] Started applying motw to C:\Users\DARKLI~1\AppData\Local\Temp\WinGet\Microsoft.VisualStudio.2019.Community.16.11.5 with zone: 2
    2021-11-03 21:58:12.267 [CORE] Finished applying motw
    2021-11-03 21:58:12.267 [REPO] Creating PredefinedInstalledSource with filter [ARP]
    2021-11-03 21:58:12.267 [REPO] Creating new SQLite Index [4294967295.4294967295] at ':memory:'
    2021-11-03 21:58:12.267 [SQL ] Opening SQLite connection: ':memory:' [6, 0]
    2021-11-03 21:58:12.313 [REPO] Examining ARP entries for Machine | X64
    2021-11-03 21:58:12.354 [REPO] Examining ARP entries for Machine | X86
    2021-11-03 21:58:12.419 [REPO] Examining ARP entries for User | X64
    2021-11-03 21:58:12.690 [CLI ] Installer args: --passive --wait
    2021-11-03 21:58:12.691 [CLI ] Successfully renamed downloaded installer. Path: C:\Users\DARKLI~1\AppData\Local\Temp\WinGet\Microsoft.VisualStudio.2019.Community.16.11.5.exe
    2021-11-03 21:58:12.691 [CLI ] Starting: 'C:\Users\DARKLI~1\AppData\Local\Temp\WinGet\Microsoft.VisualStudio.2019.Community.16.11.5.exe' with arguments '--passive --wait'
    2021-11-03 21:58:26.563 [CLI ] ShellExecute installer failed: 1
    2021-11-03 21:58:26.563 [CLI ] Terminating context: 0x8a150006 at D:\a\_work\1\s\external\pkg\src\AppInstallerCLICore\Workflows\InstallFlow.cpp:23b
    
  2. Resource Hacker & AOMEI Partition Assistant

    WinGet upgrades them successfully but the version remains Unknown so these packages can be upgraded again and again - a serious issue for automation.

    D:\Computer\Desktop>winget upgrade AngusJohnson.ResourceHacker
    Found Resource Hacker [AngusJohnson.ResourceHacker] Version 5.1.8
    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 http://www.angusj.com/resourcehacker/reshacker_setup.exe
      ██████████████████████████████  3.98 MB / 3.98 MB
    Successfully verified installer hash
    Starting package install...
    Successfully installed
    
    D:\Computer\Desktop>winget upgrade
    Name                         Id                                    Version    Available   Source
    ------------------------------------------------------------------------------------------------
    ...
    Resource Hacker              AngusJohnson.ResourceHacker           Unknown    5.1.8       winget
    AOMEI Partition Assistant    AOMEI.PartitionAssistant              Unknown    9.5.0       winget
    ...
    
  3. Viber & Oracle VM VirtualBox & PowerToys (Preview)

    Packages are already upgraded to the latest versions. However, WinGet finds their updates but can't actually upgrade them. Some of these packages show up as multiple versions installed but specifying their ids resolves the issue with determining the right one.

    VirtualBox

    D:\Computer\Desktop>winget upgrade Viber.Viber
    No applicable update found.
    
    D:\Computer\Desktop>winget upgrade Viber
    No applicable update found.
    

    Log:

    2021-11-03 21:47:32.559 [CORE] Settings loaded from settings.json
    2021-11-03 21:47:32.559 [CORE] WinGet, version [1.1.12701], activity [{6C62D8D8-02BB-49D4-A01F-A1D433437167}]
    2021-11-03 21:47:32.560 [CORE] OS: Windows.Desktop v10.0.19043.1320
    2021-11-03 21:47:32.560 [CORE] Command line Args: winget  upgrade Viber.Viber
    2021-11-03 21:47:32.560 [CORE] Package: Microsoft.DesktopAppInstaller v1.16.12701.0
    2021-11-03 21:47:32.560 [CORE] IsCOMCall:0; Caller: winget-cli
    2021-11-03 21:47:32.577 [CLI ] WinGet invoked with arguments: 'upgrade' 'Viber.Viber'
    2021-11-03 21:47:32.577 [CLI ] Found subcommand: upgrade
    2021-11-03 21:47:32.577 [CLI ] Leaf command to execute: root:upgrade
    2021-11-03 21:47:32.580 [CLI ] Executing command: upgrade
    2021-11-03 21:47:32.581 [REPO] GetCurrentSourceRefs: Source named 'microsoft.builtin.desktop.frameworks' from origin Default is a tombstone and is dropped.
    2021-11-03 21:47:32.581 [REPO] Default source requested, multiple sources available, creating aggregated source.
    2021-11-03 21:47:32.581 [REPO] Adding to aggregated source: msstore
    2021-11-03 21:47:32.581 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information
    2021-11-03 21:47:32.913 [REPO] Response status: 200
    2021-11-03 21:47:32.913 [REPO] Adding to aggregated source: winget
    2021-11-03 21:47:32.931 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
    2021-11-03 21:47:32.931 [CORE] Found matching extension.
    2021-11-03 21:47:32.962 [REPO] Opening SQLite Index for ImmutableRead at 'C:\Program Files\WindowsApps\Microsoft.Winget.Source_2021.1103.2035.97_neutral__8wekyb3d8bbwe\Public\index.db'
    2021-11-03 21:47:32.962 [SQL ] Opening SQLite connection: 'file:/C:/Program Files/WindowsApps/Microsoft.Winget.Source_2021.1103.2035.97_neutral__8wekyb3d8bbwe/Public/index.db?immutable=1' [1, 40]
    2021-11-03 21:47:32.964 [REPO] Opened SQLite Index with version [1.3], last write [2021-11-03 21:35:28.000]
    2021-11-03 21:47:33.213 [REPO] Creating PredefinedInstalledSource with filter [None]
    2021-11-03 21:47:33.213 [REPO] Creating new SQLite Index [4294967295.4294967295] at ':memory:'
    2021-11-03 21:47:33.213 [SQL ] Opening SQLite connection: ':memory:' [6, 0]
    2021-11-03 21:47:33.257 [REPO] Examining ARP entries for Machine | X64
    2021-11-03 21:47:33.299 [REPO] Examining ARP entries for Machine | X86
    2021-11-03 21:47:33.364 [REPO] Examining ARP entries for User | X64
    2021-11-03 21:47:33.847 [CLI ] Found one app. App id: Viber.Viber App name: Viber
    2021-11-03 21:47:33.849 [REPO] Downloading manifest
    2021-11-03 21:47:33.849 [CORE] WinINet downloading from url: https://winget.azureedge.net/cache/manifests/v/Viber/Viber/16.4.0.7/d8b7-Viber.Viber.yaml
    2021-11-03 21:47:34.482 [CORE] Download hash: 7776dbf2b29ed39335b2e3d26f61d803ef5b0958302638a407958a2a3c79d2e5
    2021-11-03 21:47:34.482 [CORE] Download completed.
    2021-11-03 21:47:34.483 [CLI ] Starting installer selection.
    2021-11-03 21:47:34.483 [CLI ] Installer [X86,Msi,User,en-US] not applicable: Installer scope does not matched currently installed scope: User != Machine
    2021-11-03 21:47:34.483 [CLI ] Installer [X86,Exe,User,en-US] not applicable: Installer scope does not matched currently installed scope: User != Machine
    2021-11-03 21:47:34.491 [CLI ] Terminating context: 0x8a15002b at D:\a\_work\1\s\external\pkg\src\AppInstallerCLICore\Workflows\UpdateFlow.cpp:46
    

    VirtualBox

    D:\Computer\Desktop>winget upgrade Oracle.VirtualBox
    Multiple installed packages found matching input criteria. Please refine the input.
    Name                        Id
    ------------------------------------------------------------------
    Oracle VM VirtualBox        Oracle.VirtualBox
    Oracle VM VirtualBox 6.1.28 {73A88925-78D8-43C3-9F9F-24D4E5DFCD75}
    
    D:\Computer\Desktop>winget upgrade --id {73A88925-78D8-43C3-9F9F-24D4E5DFCD75}
    No applicable update found.
    
    D:\Computer\Desktop>winget upgrade --id "{73A88925-78D8-43C3-9F9F-24D4E5DFCD75}"
    No applicable update found.
    
    D:\Computer\Desktop>winget upgrade VirtualBox
    Multiple installed packages found matching input criteria. Please refine the input.
    Name                        Id
    ------------------------------------------------------------------
    Oracle VM VirtualBox        Oracle.VirtualBox
    Oracle VM VirtualBox 6.1.28 {73A88925-78D8-43C3-9F9F-24D4E5DFCD75}
    

    PowerToys

    D:\Computer\Desktop>winget upgrade Microsoft.PowerToys
    Multiple installed packages found matching input criteria. Please refine the input.
    Name                Id
    ----------------------------------------------------------
    PowerToys (Preview) Microsoft.PowerToys
    PowerToys (Preview) {E42CA5D6-208C-438D-8751-375F708C104D}
    
    D:\Computer\Desktop>winget upgrade --id {E42CA5D6-208C-438D-8751-375F708C104D}
    No applicable update found.
    
  4. Oracle.JavaRuntimeEnvironment

    JRE can be upgraded, JRE's update checker detects a new version available but WinGet can't start an upgrade process.

    D:\Computer\Desktop>winget upgrade Oracle.JavaRuntimeEnvironment
    No applicable update found.
    

Environment

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

Windows: Windows.Desktop v10.0.19043.1320
Package: Microsoft.DesktopAppInstaller v1.16.12701.0


Windows Terminal Preview -> Command Prompt (cmd)
Running as Admin has no impact
@ghost ghost added the Needs-Triage Issue need to be triaged label Nov 3, 2021
@denelon
Copy link
Contributor

denelon commented Nov 4, 2021

@MikronT, Thank you for the detailed report. I believe most of these are duplicates. It's best to report a single problem with a single issue. That way we can focus on a single specific problem and resolve it. We tend to prioritize by sorting issues by the number of 👍. Duplicate issues artificially lower the priority by splitting the votes.

  1. Visual Studio Community 2019 may be a new report, but the problem appears to be with the installer. I believe we've seen this error before, but the logs needed would be from the install of Visual Studio.
  2. Resource Hacker & AOMEI Partition Assistant don't report the version in Windows Apps & Features, which is why the version is reported as Unknown. In this case, the publisher would need to report a version so the Windows Package Manager could determine if an upgrade is available.
  3. Viber appears to be a mobile application and not Virtual Box. The failure to match might be addressed with changes to the manifest you could submit a "Help Wanted" request for the package at https://github.com/microsoft/winget-pkgs
  4. VirtualBox is another issue in the installer, and is tracked at https://github.com/microsoft/winget-pkgs
  5. We do know that PowerToys is an MSI installer shipped inside of an EXE installer. We have improvements in the 1.1 manifest schema that are in progress to support upgrades when installer types don't match.

I will keep this bug open to see if the community can help with Visual Studio Community 2019, and I'll mark this issue as area external since the majority of the issues are related to installers.

@denelon denelon added Area-External Issue outside of winget-cli source Issue-Bug It either shouldn't be doing this or needs an investigation. and removed Needs-Triage Issue need to be triaged labels Nov 4, 2021
@Masamune3210
Copy link

Maybe as a solution to packages not reporting their versions a entry to the manifest could be added to contain the version number? That way when the manifest is created the version could be pulled from the manifest if it's missing. Just throwing ideas out

@denelon
Copy link
Contributor

denelon commented Nov 4, 2021

We depend on Apps & Features to tell us what is installed on the machine. We don't have another trustworthy mechanism. A user might have done anything between the last event we recorded and when they try to perform an upgrade. We also can't assume the user had the previous latest version installed.

@jedieaston
Copy link
Contributor

jedieaston commented Nov 5, 2021

Turns out Visual Studio requires a special command line argument to upgrade.

PRs are open to resolve this for Community (microsoft/winget-pkgs#34094) and Enterprise, I'll try to push them for Professional too today. This should resolve that part of your issue :)

@jedieaston
Copy link
Contributor

Looks like all of the PRs have merged. You should be able to upgrade Visual Studio.

@MikronT
Copy link
Author

MikronT commented Nov 6, 2021

Thank you all for your replies!

It looks like the bug with upgrading Visual Studio is fixed now. As you stated above, the other problems are outside your area of influence, so this issue has no more purpose to be opened.

@MikronT MikronT closed this as completed Nov 6, 2021
@denelon denelon added this to the v1.3-Client milestone Jun 21, 2022
@arashkarimpourg
Copy link

I have the same problem with "AngusJohnson.ResourceHacker"'s wrong version numbers in winget. Is there a workaround for now so I won't see its related errors? Asking since the latest version of this app was back in 2019 and I don't think the developer is even interested in fixing anything related to the app meaning if someone else doesn't fix the issue, most likely it will remain an issue until forever.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-External Issue outside of winget-cli source Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

No branches or pull requests

5 participants