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

Failed installs leave winget versions out of sync with installed versions #3859

Closed
idarthjedi opened this issue Nov 6, 2023 · 3 comments
Closed
Labels
Command-Install Issue related to WinGet Install Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Author-Feedback Issue needs attention from issue or PR author No-Recent-Activity Issue has no recent activity Portable Issue related to portable package
Milestone

Comments

@idarthjedi
Copy link

Brief description of your issue

I've noticed this in the past, but dug in for the first time today. Winget often "hangs", when certain install conditions occur, and the only way to get out of it, is to control+c. When using control+c at certain points of the install, Winget will update the versioning information as if the install was successful - even if the install is not successful. This has both reliability and security implications.

Steps to reproduce

During install, if install hangs, if you control+c on the command line, the installed version will be updated in winget, even if the installed version is not updated:

See example:

(6/12) Found cURL [cURL.cURL] Version 8.4.0.6
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://curl.se/windows/dl-8.4.0_6/curl-8.4.0_6-win64-mingw.zip
██████████████████████████████ 10.0 MB / 10.0 MB
Successfully verified installer hash
Extracting archive...
Successfully extracted archive
Starting package install...

;<waited like 10 minutes>
;<control+c>

C:\Users\jedia>winget list --id cURL.cURL
Name Id Version Source

cURL cURL.cURL 8.4.0.6 winget

C:\Users\jedia>winget install --id cURL.cURL
Found an existing package already installed. Trying to upgrade the installed package...
No available upgrade found.
No newer package versions are available from the configured sources.

; The installed package is:
; "C:\Users\jedia\AppData\Local\Microsoft\WinGet\Packages\cURL.cURL_Microsoft.Winget.Source_8wekyb3d8bbwe\curl-8.0.1_8-win64-mingw"

; The hang appears to be that winget is selecting the wrong architecture
2023-11-06 13:31:28.906 [CORE] WinINet downloading from url: https://cdn.winget.microsoft.com/cache/manifests/c/cURL/cURL/8.4.0.6/dc7d
2023-11-06 13:31:29.050 [CORE] Download hash: e92dd26e033e3f4db0fdaa73c4d3f8ea1d665c4cc84d9799f3ee6b1e2789763a
2023-11-06 13:31:29.050 [CORE] Download completed.
2023-11-06 13:31:29.051 [CLI ] Manifest fields: Name [cURL], Version [8.4.0.6]
2023-11-06 13:31:29.060 [CLI ] Starting installer selection.
2023-11-06 13:31:29.061 [CLI ] Installer [Arm64,portable,Unknown,] not applicable: Machine is not compatible with Arm64
2023-11-06 13:31:29.061 [CLI ] Completed installer selection.
2023-11-06 13:31:29.064 [CLI ] Leaf command succeeded: root:show

Expected behavior

Winget file should be selected from the right architecture - however, more importantly, when installation fails, Winget should not record that it was successful.

Actual behavior

When the installation is failing - winget is recording that the installation was successful.

Environment

C:\Users\jedia>winget --info
Windows Package Manager v1.6.2771
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22621.2428
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.21.2771.0

Winget Directories
-----------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages
Installer Downloads                %USERPROFILE%\Downloads

Links
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage Issue need to be triaged label Nov 6, 2023
@denelon denelon added Issue-Bug It either shouldn't be doing this or needs an investigation. Command-Install Issue related to WinGet Install Portable Issue related to portable package and removed Needs-Triage Issue need to be triaged labels Nov 6, 2023
@aslze
Copy link

aslze commented Mar 6, 2024

I happened to me with a zip-based package (ffmpeg in particular). when I wanted to update 6.0 to 6.1.1. It now lists as version 6.1.1 but the only installed one is actually 6.0. It cannot be upgraded, repaired or uninstalled.

Uninstall hangs forever. There should be a way to repair or clean its data in Winget's DB.

@mdanish-kh
Copy link
Contributor

This looks related to:

Have you tried any of the workarounds listed in that issue to see if it unblocks the install/upgrade for you?

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Author-Feedback Issue needs attention from issue or PR author label Mar 7, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the No-Recent-Activity Issue has no recent activity label Mar 14, 2024
Copy link
Contributor

Hello @idarthjedi,

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment.

Template: msftbot/noRecentActivity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Command-Install Issue related to WinGet Install Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Author-Feedback Issue needs attention from issue or PR author No-Recent-Activity Issue has no recent activity Portable Issue related to portable package
Projects
None yet
Development

No branches or pull requests

4 participants