microsoft / microsoft/winget-cli
winget losing track of progress
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26.4k
- Forks
- 1.8k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 15
Description
Brief description of your issue
When installing VSCode using:
winget install -e --id Microsoft.VisualStudioCode
winget stopped showing download progress after 20MB of 94.8MB, but appears to have successfully installed the package:
Downloading https://vscode.download.prss.microsoft.com/dbazure/download/stable/e170252f762678dec6ca2cc69aba1570769a5d39/VSCodeUserSetup-x64-1.88.1.exe
██████▎ 20.0 MB / 94.8 MB
Cancelled <-- ME CANCELLING AFTER 45 MINUTES AND THEN IMMEDIATELY RUNNING BELOW LINE AGAIN
PS C:\Users\MartinStenhoff\Downloads\VisualStudio> winget install -e --id Microsoft.VisualStudioCode
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.
Steps to reproduce
This one is probably hard to reproduce (there may have been another winget install running at the same time):
winget install -e --id Microsoft.VisualStudioCode
Expected behavior
The progress bar going to 100%
Actual behavior
The progress bar stops before 20%
Looking at the logs I can see this, but not sure if it's related:
2024-04-22 07:54:46.428 [CLI ] WinGet invoked with arguments: 'install' '-e' '--id' 'Microsoft.VisualStudioCode'
...
2024-04-22 07:54:46.604 [REPO] Opening database for ImmutableRead at 'C:\Program Files\WindowsApps\Microsoft.Winget.Source_2024.421.2057.191_neutral__8wekyb3d8bbwe\Public\index.db'
2024-04-22 07:54:46.605 [REPO] Opened SQLite Index with version [1.7], last write [2024-04-21 21:56:46.000]
2024-04-22 07:54:46.816 [REPO] Creating new SQLite Index with version [Latest] at ':memory:'
2024-04-22 07:54:46.821 [REPO] Reading MSI UpgradeCodes
2024-04-22 07:54:46.853 [REPO] Reading MSI UpgradeCodes
2024-04-22 07:54:46.884 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFCF25B069C: (caller: 00007FFCF25B73A9) Exception(1) tid(4e98) 800700B7 Cannot create a file when that file already exists.
2024-04-22 07:54:46.911 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFCF25B069C: (caller: 00007FFCF25B73A9) Exception(2) tid(4e98) 800700B7 Cannot create a file when that file already exists.
2024-04-22 07:54:46.913 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFCF25B069C: (caller: 00007FFCF25B73A9) Exception(3) tid(4e98) 800700B7 Cannot create a file when that file already exists.
2024-04-22 07:54:46.915 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFCF25B069C: (caller: 00007FFCF25B73A9) Exception(4) tid(4e98) 800700B7 Cannot create a file when that file already exists.
2024-04-22 07:54:46.927 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFCF25B069C: (caller: 00007FFCF25B73A9) Exception(5) tid(4e98) 800700B7 Cannot create a file when that file already exists.
2024-04-22 07:54:46.932 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFCF25B069C: (caller: 00007FFCF25B73A9) Exception(6) tid(4e98) 800700B7 Cannot create a file when that file already exists.
2024-04-22 07:54:46.939 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFCF25B069C: (caller: 00007FFCF25B73A9) Exception(7) tid(4e98) 800700B7 Cannot create a file when that file already exists.
2024-04-22 07:54:46.960 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFCF25B069C: (caller: 00007FFCF25B73A9) Exception(8) tid(4e98) 800700B7 Cannot create a file when that file already exists.
2024-04-22 07:54:46.976 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFCF25B069C: (caller: 00007FFCF25B73A9) Exception(9) tid(4e98) 800700B7 Cannot create a file when that file already exists.
2024-04-22 07:54:46.987 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFCF25B069C: (caller: 00007FFCF25B73A9) Exception(10) tid(4e98) 800700B7 Cannot create a file when that file already exists.
2024-04-22 07:54:47.087 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFCF25B069C: (caller: 00007FFCF25B73A9) Exception(11) tid(4e98) 800700B7 Cannot create a file when that file already exists.
2024-04-22 07:54:47.162 [FAIL] C:\__w\1\s\external\pkg\src\AppInstallerRepositoryCore\Microsoft\Schema\1_0\Interface_1_0.cpp(197)\WindowsPackageManager.dll!00007FFCF25B069C: (caller: 00007FFCF25B73A9) Exception(12) tid(4e98) 800700B7 Cannot create a file when that file already exists.
2024-04-22 07:54:47.446 [REPO] Opening database for ReadWrite at 'C:\Users\MartinStenhoff\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\StoreEdgeFD\installed.db'
2024-04-22 07:54:47.447 [REPO] Opened SQLite Index with version [1.7], last write [2024-04-21 23:53:54.000]
Environment
Windows Package Manager v1.7.10861
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.22631.3447
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.22.10861.0
Winget Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing winget install -e --id Microsoft.VisualStudioCode under the reported Windows Package Manager environment, while checking the generated logs in %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir. Compare behavior with and without another installation running; done means the download progress reliably reaches completion or the failure is explained.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100