Open aetonsi opened 1 year ago
@aetonsi thanks for the detailed feedback. Lots to unpack here. I'll see about referencing the existing issues to help split this into the separate classes of issues to make sure we're tracking everything.
The other reason one might see "Unknown" is in the available column. This is treated as a "sentinel value" so WinGet doesn't try to upgrade to an unknown version. Currently, the Microsoft Store "msstore" REST source doesn't expose the version information, so all packages report unknown. We are working on getting this metadata updated. It's a very long lead time work item due to the way the data is captured, stored, and presented.
By coincidence, I was chatting with @Trenly this morning and he shared his tracking list which makes the rest of the breakdown a bit easier:
The PowerShell issue is matching/side-by-side:
Upgrade all not upgrading all is labeled with "Area-Output":
Upgrade by Id works for me, but this depends on which version of the installer was used for the currently installed version.
Update with wrong count of unknown is correctly identified as:
Register available version is:
I don't believe I saw any untracked issues in your report. Please check to make sure I've not missed anything.
We use the sort by👍in Issues to prioritize in addition to:
Be sure to add your 👍 to any Issues to help raise priority. I'm going to mark the issue as "Needs-Author-Feedback" before closing it, so you have a chance to confirm nothing was missed.
Hello @aetonsi,
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
I don't believe I saw any untracked issues in your report. Please check to make sure I've not missed anything.
Hi, sorry for the late reply. What about the line about packages with "version numbers that cannot be determined" being printed twice? I mean the last 2 lines here:
> winget update --all
Name Id Version Available Source
-------------------------------------------------------------------------------------------
Visual Studio Community 2022 Microsoft.VisualStudio.2022.Community 17.6.2 17.6.3 winget
PowerShell 7.3.2.0-x64 Microsoft.PowerShell 7.3.2.0 7.3.4.0 winget
2 upgrades available.
4 package(s) have version numbers that cannot be determined. Use --include-unknown to see all results.
14 package(s) have version numbers that cannot be determined. Use --include-unknown to see all results.
Also, i don't understand the following:
Upgrade by Id works for me, but this depends on which version of the installer was used for the currently installed version.
Do you mean the version of the Microsoft Visual Studio Installer? It's 3.6.2115.31769
on my pc (doesn't show up in winget, but it does in appwiz.cpl
):
PS # winget update --id microsoft.visualstudio.2022.community
No applicable upgrade found.
PS # winget list microsoft.visualstudio.2022.community
Name Id Version Available Source
-------------------------------------------------------------------------------------------
Visual Studio Community 2022 Microsoft.VisualStudio.2022.Community 17.6.2 17.6.4 winget
PS # winget list microsoft.visualstudio
Name Id Version Available Source
--------------------------------------------------------------------------------------------------
Visual Studio Community 2022 Microsoft.VisualStudio.2022.Community 17.6.2 17.6.4 winget
Microsoft Visual Studio Code Microsoft.VisualStudioCode 1.79.2 winget
Visual Studio Build Tools 2022 (2) Microsoft.VisualStudio.2022.BuildTools 17.6.4 winget
Upgrade by Id works for me, but this depends on which version of the installer was used for the currently installed version.
Do you mean the version of the Microsoft Visual Studio Installer? It's
3.6.2115.31769
on my pc (doesn't show up in winget, but it does inappwiz.cpl
):
Some applications have multiple different installer types - exe, msi, zip, portable, etc. If the currently installed version was installed using the msi installer, winget will try to use the msi Installer during the upgrade. However, if the creator of the manifest hasn't included the msi in the latest manifest, it's possible the upgrade will fail. This is why the upgrade by ID works for me - because it does, in most cases - but depends on which version of the installer was used previously and if the same type of installer is available to winget.
How can i check the actual version of the installer, so i can tell you which one is it?
Is there a way i can "fix" this, so that the update works, without having to do a full reinstallation? Because Visual Studio 2022 actually has an update available, for me, but i can't get to it due to this problem. PS: I think i originally installed VS22 via chocolatey.
I'm not sure if this solution is appropriate for this thread, but I've encountered a similar issue. When executing winget update --all
or winget upgrade --all
, the system lists all packages with available updates but doesn't proceed with any action. In my case, the output is as follows:
> winget upgrade --all
Name ID Version Available Source
----------------------------------------------------------------------------------------------------------------------------------
[List of packages with available updates]
15 updates available.
Some packages require specifying a destination for the update:
Name ID Version Available Source
-------------------------------------------------------------------------------------
[List of packages requiring an explicit destination]
To address this issue, I created a PowerShell script (.ps1) that automates the update process for all packages without needing to specify them manually. The script collects the IDs of the packages and updates them one by one. The code is as follows:
write-host "Updating winget upgrade list..."
$OUTPUT=winget.exe upgrade
Write-Host "Filtering list..."
$regexPattern = '([a-zA-Z-]+(?:\.[a-zA-Z0-9]+)+)'
$match = [regex]::Matches($OUTPUT, $regexPattern)
$packageNames = $match | ForEach-Object { $_.Value.Trim() }
Write-Host $packageNames
$LIST = $packageNames.Split(" ")
Write-Host "Excluding packages..."
Write-Host $LIST
Write-Host "*********"
for ($i = 0; $i -lt $LIST.count; $i++) {
write-host "$i/$($LIST.count). Upgrading $($LIST[$i])..."
winget.exe upgrade --id "$($LIST[$i])"
}
This script starts by displaying the list of packages to be updated, filters and excludes packages as needed, and finally, updates each one using its corresponding ID.
Is this still happening in WinGet 1.8?
Is this still happening in WinGet 1.8?
yes. i'm on v1.8.1791
.
the problem seems to be a little different but still present:
winget update --all
── 23:19:45 - winget ───────────────────────────────────────────────────────────
Name Id Version Available Source
---------------------------------------------------------
Discord Discord.Discord 1.0.9152 1.0.9153 winget
Proton Drive Proton.ProtonDrive 1.6.0 1.6.2 winget
2 upgrades available.
3 package(s) have version numbers that cannot be determined. Use --include-unknown to see all results.
(1/1) Found Discord [Discord.Discord] Version 1.0.9153
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Successfully verified installer hash
Starting package install...
Successfully installed
7 package(s) have version numbers that cannot be determined. Use --include-unknown to see all results.
@aetonsi Could you run the command winget upgrade --id Proton.ProtonDrive --verbose-logs --open-logs
? This'll help give us more info on the skipped upgrade. After the command finishes, it'll open up the WinGet logs directory. Could you share the latest generated log file? (if you sort by last updated, the log file should be the first one in the list)
sorry i already updated protondrive within the protondrive UI itself..
looking into the logs folder if you want i found this older log of a winget update proton.protondrive
(without --verbose-logs
unluckily):
2024-07-11 17:54:16.920 [CORE] WinGet, version [1.8.1791], activity [{B64F21C1-D66D-415A-A51F-E1FD865C7017}]
2024-07-11 17:54:16.921 [CORE] OS: Windows.Desktop v10.0.22635.3066
2024-07-11 17:54:16.921 [CORE] Command line Args: "C:\Users\u6\AppData\Local\Microsoft\WindowsApps\winget.exe" update proton.protondrive
2024-07-11 17:54:16.921 [CORE] Package: Microsoft.DesktopAppInstaller v1.23.1791.0
2024-07-11 17:54:16.921 [CORE] IsCOMCall:0; Caller: winget-cli
2024-07-11 17:54:16.930 [CLI ] WinGet invoked with arguments: 'update' 'proton.protondrive'
2024-07-11 17:54:16.930 [CLI ] Found subcommand: update
2024-07-11 17:54:16.930 [CLI ] Leaf command to execute: root:upgrade
2024-07-11 17:54:16.936 [CLI ] Executing command: upgrade
2024-07-11 17:54:16.946 [REPO] Default source requested, multiple sources available, adding all to source references.
2024-07-11 17:54:16.946 [REPO] Adding to source references msstore
2024-07-11 17:54:16.946 [CORE] Default proxy is not set
2024-07-11 17:54:16.946 [REPO] REST HTTP Client helper does not use proxy
2024-07-11 17:54:16.946 [REPO] Adding to source references winget
2024-07-11 17:54:16.946 [CLI ] Created authentication arguments. Mode: silentPreferred, Account:
2024-07-11 17:54:16.957 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2024-07-11 17:54:16.957 [CORE] Found matching extension.
2024-07-11 17:54:16.961 [REPO] Multiple sources available, creating aggregated source.
2024-07-11 17:54:16.961 [REPO] Adding to aggregated source: msstore
2024-07-11 17:54:16.961 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information
2024-07-11 17:54:18.724 [REPO] Response status: 200
2024-07-11 17:54:18.725 [REPO] Authentication node not found. Assuming authentication type none.
2024-07-11 17:54:18.725 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information
2024-07-11 17:54:18.853 [REPO] Response status: 200
2024-07-11 17:54:18.853 [REPO] Authentication node not found. Assuming authentication type none.
2024-07-11 17:54:18.853 [REPO] Adding to aggregated source: winget
2024-07-11 17:54:18.860 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2024-07-11 17:54:18.860 [CORE] Found matching extension.
2024-07-11 17:54:19.003 [REPO] Opening database for ImmutableRead at 'C:\Program Files\WindowsApps\Microsoft.Winget.Source_2024.711.1339.30_neutral__8wekyb3d8bbwe\Public\index.db'
2024-07-11 17:54:19.005 [REPO] Opened SQLite Index with version [1.7], last write [2024-07-11 14:37:54.000]
2024-07-11 17:54:19.143 [REPO] Creating new SQLite Index with version [Latest] at ':memory:'
2024-07-11 17:54:19.148 [REPO] Reading MSI UpgradeCodes
2024-07-11 17:54:19.420 [REPO] Reading MSI UpgradeCodes
2024-07-11 17:54:20.060 [REPO] Opening database for ReadWrite at 'C:\Users\u6\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\StoreEdgeFD\installed.db'
2024-07-11 17:54:20.062 [REPO] Opened SQLite Index with version [1.5], last write [2024-01-12 17:16:27.000]
2024-07-11 17:54:20.108 [REPO] Sending http POST request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/manifestSearch
2024-07-11 17:54:20.457 [REPO] Response status: 200
2024-07-11 17:54:20.464 [REPO] Opening database for ReadWrite at 'C:\Users\u6\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Microsoft.Winget.Source_8wekyb3d8bbwe\installed.db'
2024-07-11 17:54:20.466 [REPO] Opened SQLite Index with version [1.3], last write [2024-07-11 17:37:10.000]
2024-07-11 17:54:20.711 [REPO] Found multiple results for Id [Proton.ProtonDrive] in tracking catalog for: winget
2024-07-11 17:54:20.734 [CLI ] Found one app. App id: Proton.ProtonDrive App name: Proton Drive
2024-07-11 17:54:20.740 [REPO] Attempting to open pinning database: C:\Users\u6\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\pinning.db
2024-07-11 17:54:20.740 [REPO] ... opening existing pinning database
2024-07-11 17:54:20.740 [REPO] Opening database for Read at 'C:\Users\u6\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\pinning.db'
2024-07-11 17:54:20.742 [REPO] Opened Pinning Index with version [1.0], last write [2024-06-28 12:08:54.000]
2024-07-11 17:54:20.876 [CLI ] Terminating context: 0x8a15002b at C:\__w\1\s\external\pkg\src\AppInstallerCLICore\Workflows\UpdateFlow.cpp:be
sorry i already updated protondrive within the protondrive UI itself..
That's okay. The log that you shared doesn't seem to offer all that much context other than failing with 0x8a15002b
, which is the return code for No applicable update found
. Generally when winget
skips an upgrade, it's because the available upgrade isn't compatible with your existing installation of the package. This can happen if your current installation differs in scope, installer type, or other parameters from the available update.
If you encounter such issues again, feel free to open a new issue over at winget-pkgs
Brief description of your issue
Hi, i found a few problems with the
update
command, but i'm not even sure if these are all of them, so please see the log at the end that might be clearer than my explanations/suppositions.When running
update
commands, to list available updates or to update packages, a number of problems occur:update --all --include-unknown
tries to update 3 out of 6 listed packages. More details:update --all
norupdate --id ...
, the update commands simply skips them and reports "no applicable update found"; in reality, visual studio's already installed version is 17.6.2 (so an update should be available) and powershell version is 7.3.4 (so the lastest version is already installed)--include-unknown
update --all --include-unknown
, meaning each one of them gets installed successfully, but still end up with "unknown" version after installation (idk maybe this is the expected behaviour?), so they are perpetually listed as having an update availableupdate --all
command reports twice the line "X packages have version numbers that cannot be determined. Use --include-unknown to see all results", the second time with a totally random numberI don't even know if these problems are related to each other, of if i should open a separate issue for some/all of them. Please notice me if i should do that. Also please rename the issue if a better title could be found.
Steps to reproduce
i don't know, aside running the commands below, while having the following software installed:
Expected behavior
update
should report the correct versions (powershell is wrong, 7.3.4 is already installed)update --all [--include-unknown]
should update every package, not skipping over any one of them (powershell, visual studio, windirstat)update --id ...
should work, but i think this is probably issue #3093update --all
should not report a wrong number of packages with unknown version numbers, and especially should not report it twice; maybe this is #2458 ?update --all --include-unknown
should register the "available version" as the "installed version" for packages that have unknown version number and get updated successfully; having them all repeatedly updated each time i run that command, is annoying (also because some updates take a very long time, for example the google cloud sdk takes over 5 minutes on my machine). Of the 6 updates that are listed as available on my pc, everything is already up to date except visual studio community, which is even skipped for some reasonActual behavior
Environment