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

upgrade should be more verbose on failure #1583

Open
ffes opened this issue Oct 13, 2021 · 2 comments
Open

upgrade should be more verbose on failure #1583

ffes opened this issue Oct 13, 2021 · 2 comments
Labels
Issue-Feature This is a feature request for the Windows Package Manager client.

Comments

@ffes
Copy link

ffes commented Oct 13, 2021

Description of the new feature/enhancement

When I run winget upgrade 3 packages are shown. So I run winget upgrade --all, but 2 package are never mentioned in the output and the 3th fails silently.

C:\>winget upgrade
Naam                Id                  Versie      Beschikbaar  Bron
-----------------------------------------------------------------------
Microsoft Edge      Microsoft.Edge      94.0.992.38 94.0.992.47  winget
Microsoft Teams     Microsoft.Teams     1.4.0.7174  1.4.00.26376 winget
PowerToys (Preview) Microsoft.PowerToys 0.47.0      0.47.1       winget
3 beschikbare upgrades.

Note that there are 3 packages available for upgrade.

C:\>winget upgrade --all
Gevonden Microsoft Teams [Microsoft.Teams] Versie 1.4.00.26376
Gevonden  [Microsoft.Teams] Versie 1.4.00.26376
Deze applicatie is aan u in licentie gegeven door de eigenaar.
Microsoft is niet verantwoordelijk voor en verleent geen licenties aan pakketten van derden.
Downloading https://statics.teams.cdn.office.net/production-windows-x64/1.4.00.26376/Teams_windows_x64.msi
  ██████████████████████████████   121 MB /  121 MB
De installatie-hash is geverifieerd
De installatie van het pakket wordt gestart...
Installatie is geslaagd

Note that Edge and Powertoys are not mentioned here and that Teams is mentioned as installed successfully. But when I run winget upgrade again it outputs exactly the same as above. So apparently Teams didn't get upgraded as well.

When I dig into the log there are explanations for all the failures, but there are never shown to the user. I've provided the errors from the log file below.

Note that this issue is not about these specific errors below (they are explainable and fixable), but about the fact that the they not show to user when winget upgrade --all is ran.


FYI the error for Edge (never installed it through winget, came with Win10):

2021-10-13 08:31:24.265 [REPO] Downloading manifest
2021-10-13 08:31:24.265 [CORE] WinINet downloading from url: https://winget.azureedge.net/cache/manifests/m/Microsoft/Edge/94.0.992.47/2558-Microsoft.Edge.yaml
2021-10-13 08:31:24.806 [CORE] Download hash: eb885528ec499009265004bc0cc3b1def6986658bc39d4980483987a7a2011f8
2021-10-13 08:31:24.806 [CORE] Download completed.
2021-10-13 08:31:24.807 [CLI ] Starting installer selection.
2021-10-13 08:31:24.807 [CLI ] Installer [X64,Msi,Machine,] not applicable: Installed package type is not compatible with Msi
2021-10-13 08:31:24.807 [CLI ] Installer [X86,Msi,Machine,] not applicable: Installed package type is not compatible with Msi
2021-10-13 08:31:24.807 [CLI ] Installer [Arm64,Msi,Machine,] not applicable: Installed package type is not compatible with Msi

FYI the error for Teams (installed by Office 365, most likely caused by microsoft/winget-pkgs#18415):

2021-10-13 08:31:24.818 [REPO] Downloading manifest
2021-10-13 08:31:24.818 [CORE] WinINet downloading from url: https://winget.azureedge.net/cache/manifests/m/Microsoft/Teams/1.4.00.26376/cfbd-Microsoft.Teams.yaml
2021-10-13 08:31:25.304 [CORE] Download hash: a65cc55766f6a6d4a84615a726ea10314b0dd8ebe10f88933c806bb2d7a19078
2021-10-13 08:31:25.305 [CORE] Download completed.
2021-10-13 08:31:25.306 [CLI ] Starting installer selection.
2021-10-13 08:31:25.307 [CLI ] Installer [X64,Exe,User,] not applicable: Installer scope does not matched currently installed scope: User != Machine
2021-10-13 08:31:25.307 [CLI ] Installer [Arm64,Exe,User,] not applicable: Installer scope does not matched currently installed scope: User != Machine
2021-10-13 08:31:25.307 [CLI ] Installer [X86,Exe,User,] not applicable: Installer scope does not matched currently installed scope: User != Machine
2021-10-13 08:31:25.307 [CLI ] Installer [Arm64,Msi,Machine,] not applicable: Machine is not compatible with Arm64
2021-10-13 08:31:25.307 [CLI ] Completed installer selection.

And later on in that some log:

2021-10-13 08:31:25.828 [CORE] WinINet downloading from url: https://winget.azureedge.net/cache/manifests/m/Microsoft/Teams/1.4.00.26376/cfbd-Microsoft.Teams.yaml
2021-10-13 08:31:25.959 [CORE] Download hash: a65cc55766f6a6d4a84615a726ea10314b0dd8ebe10f88933c806bb2d7a19078
2021-10-13 08:31:25.959 [CORE] Download completed.
2021-10-13 08:31:25.967 [CLI ] Generated temp download path: C:\Tmp\WinGet\Microsoft.Teams.1.4.00.26376
2021-10-13 08:31:25.969 [CORE] Downloading to path: C:\Tmp\WinGet\Microsoft.Teams.1.4.00.26376
2021-10-13 08:31:25.970 [CORE] DeliveryOptimization downloading from url: https://statics.teams.cdn.office.net/production-windows-x64/1.4.00.26376/Teams_windows_x64.msi
2021-10-13 08:31:30.654 [CORE] Download completed.
2021-10-13 08:31:30.808 [CORE] Started applying motw to C:\Tmp\WinGet\Microsoft.Teams.1.4.00.26376 with zone: 3
2021-10-13 08:31:30.809 [CORE] Finished applying motw
2021-10-13 08:31:30.810 [CLI ] Installer hash verified
2021-10-13 08:31:30.811 [CORE] Started applying motw to C:\Tmp\WinGet\Microsoft.Teams.1.4.00.26376 with zone: 2
2021-10-13 08:31:30.811 [CORE] Finished applying motw
2021-10-13 08:31:30.811 [REPO] Creating PredefinedInstalledSource with filter [ARP]
2021-10-13 08:31:30.811 [REPO] Creating new SQLite Index [4294967295.4294967295] at ':memory:'
2021-10-13 08:31:30.811 [SQL ] Opening SQLite connection: ':memory:' [6, 0]
2021-10-13 08:31:30.837 [REPO] Examining ARP entries for Machine | X64
2021-10-13 08:31:30.851 [REPO] Examining ARP entries for Machine | X86
2021-10-13 08:31:30.866 [REPO] Examining ARP entries for User | X64
2021-10-13 08:31:30.945 [CLI ] Installer args: /passive /log "C:\Users\Frank\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir\WinGet-Microsoft.Teams.1.4.00.26376-2021-10-13-08-31-30.945.log"
2021-10-13 08:31:30.946 [CLI ] Successfully renamed downloaded installer. Path: C:\Tmp\WinGet\Microsoft.Teams.1.4.00.26376.msi
2021-10-13 08:31:30.947 [CLI ] Starting: 'C:\Tmp\WinGet\Microsoft.Teams.1.4.00.26376.msi' with arguments '/passive /log "C:\Users\Frank\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir\WinGet-Microsoft.Teams.1.4.00.26376-2021-10-13-08-31-30.945.log"'
2021-10-13 08:31:32.643 [REPO] Creating PredefinedInstalledSource with filter [ARP]
2021-10-13 08:31:32.643 [REPO] Creating new SQLite Index [4294967295.4294967295] at ':memory:'
2021-10-13 08:31:32.643 [SQL ] Opening SQLite connection: ':memory:' [6, 0]
2021-10-13 08:31:32.676 [REPO] Examining ARP entries for Machine | X64
2021-10-13 08:31:32.690 [REPO] Examining ARP entries for Machine | X86
2021-10-13 08:31:32.703 [REPO] Examining ARP entries for User | X64
2021-10-13 08:31:32.759 [CLI ] During package install, 0 changes to ARP were observed, 3 matches were found for the package, and 0 packages were in both
2021-10-13 08:31:32.759 [CLI ] No single entry was determined to be associated with the package
2021-10-13 08:31:32.760 [CLI ] Removing installer: C:\Tmp\WinGet\Microsoft.Teams.1.4.00.26376.msi
2021-10-13 08:31:32.761 [CLI ] Leaf command succeeded: root:upgrade

FYI the error for PowerToys (installed manually before I discovered winget):

2021-10-13 08:31:25.317 [REPO] Downloading manifest
2021-10-13 08:31:25.317 [CORE] WinINet downloading from url: https://winget.azureedge.net/cache/manifests/m/Microsoft/PowerToys/0.47.1/5a50-Microsoft.PowerToys.yaml
2021-10-13 08:31:25.815 [CORE] Download hash: 5cda9329abeb59d30e8009e127509516405187ab1ae764ed8605e48de37965b3
2021-10-13 08:31:25.815 [CORE] Download completed.
2021-10-13 08:31:25.817 [CLI ] Starting installer selection.
2021-10-13 08:31:25.817 [CLI ] Installer [X64,Exe,Machine,en-US] not applicable: Installed package type is not compatible with Exe
@ffes ffes added the Issue-Feature This is a feature request for the Windows Package Manager client. label Oct 13, 2021
@ghost ghost added the Needs-Triage Issue need to be triaged label Oct 13, 2021
@denelon denelon removed the Needs-Triage Issue need to be triaged label Oct 13, 2021
@denelon
Copy link
Contributor

denelon commented Oct 13, 2021

We've run into a few interesting scenarios. I think we're close to the point of having enough information in the Windows Package Manager to provide better information after upgrade. The 1.1 schema enhancements have been added for validation, but we're still working on client implementation.

PowerToys will be fixed with better information in Apps and Features in the manifest once we support .exe installers containing an MSI.

Teams has multiple installers on systems: Machine Wide Installer and the Application. We've got fixes coming specifically for that.

We will have to look into Edge to see if the fix for Teams also addresses that one.

We have also seen packages that do not "upgrade" per se', but they install the new version, so since the old one is still present it appears as still needing upgrade. We're looking at specific messaging for those scenarios.

@tobiasdiez
Copy link

I've run in a similar issue with SumatraPDF

2022-02-15 12:21:00.339 [CLI ] Manifest fields: Name [SumatraPDF], Version [3.3.3]
2022-02-15 12:21:00.340 [CLI ] Starting installer selection.
2022-02-15 12:21:00.340 [CLI ] Installer [X64,exe,User,en-US] not applicable: Installer scope does not matched currently installed scope: User != Machine

Would be nice if winget could pick up the installer scope of the previous installation, and the performs the upgrade with the same scope. But at least it should report the reason why its not upgrading the package to the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature This is a feature request for the Windows Package Manager client.
Projects
None yet
Development

No branches or pull requests

3 participants