microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
23.27k stars 1.45k forks source link

Windows PC Health Check showing upgrade but not applicable #2053

Open Raffaello opened 2 years ago

Raffaello commented 2 years ago

Brief description of your issue

winget upgrade shows:

Windows PC Health Check Microsoft.WindowsPCHealthCheck 3.2.2110.14001 3.3.2110.22002 winget

The upgrade is on a different build version.

It displays an upgrade available but it won't upgrade it.

C:\> winget upgrade Microsoft.WindowsPCHealthCHeck
No applicable update found.
C:\>

Steps to reproduce

having PC Health Check installed version 3.2.2110.14001 upgrading to 3.3.2110.22002

won't upgrade it.

Notice that is just a minor version build.

Expected behavior

Upgrade to the reported version. Or it should not be shown as upgrade available.

Actual behavior

it won't install it, trying running winget will return with this message: No applicable update found.

Environment

Windows Package Manager (Preview) v1.3.692-preview
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.19044.1586
Package: Microsoft.DesktopAppInstaller v1.18.692.0

Logs: %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir

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
Trenly commented 2 years ago

Can you post the output of winget list Microsoft.WindowsPCHealthCheck? Also, if you can provide the log files from winget upgrade Microsoft.WindowsPCHealthCheck --verbose-logs it would be appreciated

denelon commented 2 years ago

I believe I've seen this before. I think it may be trying to do a side-by-side install. It might be related to #752.

Trenly commented 2 years ago

I believe I've seen this before. I think it may be trying to do a side-by-side install. It might be related to #752.

I installed an old version with winget, then ran winget upgrade and it didn’t install side by side. I know that I’ve had issues with this package installing side by side in the past, but I don’t recall if it was with a specific version. Perhaps the manifest needs to specify uninstallPrevious

OfficialEsco commented 2 years ago

This is actually more related to https://github.com/microsoft/winget-cli/issues/1967 unless you're thinking of the InstallerType override

I believe this is a different kind of installation by Windows or a OEM (So its similar to our WebView2 issue)

Raffaello commented 2 years ago

Can you post the output of winget list Microsoft.WindowsPCHealthCheck? Also, if you can provide the log files from winget upgrade Microsoft.WindowsPCHealthCheck --verbose-logs it would be appreciated

PS C:\> winget list Microsoft.WindowsPCHealthCheck
Name                    Id                             Version        Source
-----------------------------------------------------------------------------
Windows PC Health Check Microsoft.WindowsPCHealthCheck 3.3.2110.22002 winget
PS C:\> winget upgrade Microsoft.WindowsPCHealthCheck --verbose-logs
No applicable update found.
OfficialEsco commented 2 years ago

Check the logs at %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir

Raffaello commented 2 years ago

Check the logs at %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir

I am stripping out some information from the logs ([SQL]) .

2022-03-31 08:56:14.909 [CORE] WinGet, version [1.3.692-preview], activity [{8505E5F7-8C54-4CB3-94B5-55DB970089B3}]
2022-03-31 08:56:14.909 [CORE] OS: Windows.Desktop v10.0.19044.1586
2022-03-31 08:56:14.909 [CORE] Command line Args: "C:[...]\Local\Microsoft\WindowsApps\winget.exe" upgrade Microsoft.WindowsPCHealthCheck --verbose-logs
2022-03-31 08:56:14.909 [CORE] Package: Microsoft.DesktopAppInstaller v1.18.692.0
2022-03-31 08:56:14.909 [CORE] IsCOMCall:0; Caller: winget-cli
2022-03-31 08:56:14.922 [CLI ] WinGet invoked with arguments: 'upgrade' 'Microsoft.WindowsPCHealthCheck' '--verbose-logs'
2022-03-31 08:56:14.922 [CLI ] Found subcommand: upgrade
2022-03-31 08:56:14.922 [CLI ] Leaf command to execute: root:upgrade
2022-03-31 08:56:14.924 [CORE] Setting action: Get, Type: Secure, Name: admin_settings
2022-03-31 08:56:14.925 [CORE] Admin settings was not found
2022-03-31 08:56:14.925 [CLI ] Executing command: upgrade
2022-03-31 08:56:14.925 [CORE] Setting action: Get, Type: Secure, Name: user_sources
2022-03-31 08:56:14.925 [CORE] Setting action: Get, Type: Standard, Name: sources_metadata
2022-03-31 08:56:14.925 [YAML] Detected UTF-8
2022-03-31 08:56:14.925 [REPO] GetCurrentSourceRefs: Source named 'microsoft.builtin.desktop.frameworks' from origin Default is hidden and is dropped.
2022-03-31 08:56:14.925 [REPO] Default source requested, multiple sources available, adding all to source references.
2022-03-31 08:56:14.925 [REPO] Adding to source references msstore
2022-03-31 08:56:14.925 [REPO] Adding to source references winget
2022-03-31 08:56:14.925 [CORE] Setting action: Get, Type: Secure, Name: user_sources
2022-03-31 08:56:14.925 [CORE] Setting action: Get, Type: Standard, Name: sources_metadata
2022-03-31 08:56:14.925 [YAML] Detected UTF-8
2022-03-31 08:56:14.926 [REPO] Multiple sources available, creating aggregated source.
2022-03-31 08:56:14.926 [REPO] Adding to aggregated source: msstore
2022-03-31 08:56:14.926 [REPO] Custom header not found.
2022-03-31 08:56:14.926 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information
2022-03-31 08:56:14.926 [REPO] Http GET request details:
GET / HTTP/1.1

Content-Type: application/json

User-Agent: winget-cli WindowsPackageManager/1.3.692-preview DesktopAppInstaller/Microsoft.DesktopAppInstaller v1.18.692.0

2022-03-31 08:56:15.084 [REPO] Response status: 200
2022-03-31 08:56:15.084 [REPO] Response details:
HTTP/1.1 200 OK

Cache-Control: max-age=0, no-cache, no-store

Connection: keep-alive

Content-Length: 853

Content-Type: application/json; charset=utf-8

Date: Thu, 31 Mar 2022 07:56:13 GMT

Expires: Thu, 31 Mar 2022 07:56:13 GMT

MS-CV: 4y7iMavy90m63YP3.0

Pragma: no-cache

Server: Microsoft-HTTPAPI/2.0

X-OSG-Served-By: WESTEUROPE_LEGACY00000T_1.0.0.0

{"$type":"Microsoft.Marketplace.Storefront.StoreEdgeFD.BusinessLogic.Response.PackageMetadata.PackageMetadataResponse, StoreEdgeFD","Data":{"$type":"Microsoft.Marketplace.Storefront.StoreEdgeFD.BusinessLogic.Response.PackageMetadata.PackageMetadataData, StoreEdgeFD","SourceIdentifier":"StoreEdgeFD","SourceAgreements":{"$type":"Microsoft.Marketplace.Storefront.StoreEdgeFD.BusinessLogic.Response.PackageMetadata.SourceAgreements, StoreEdgeFD","AgreementsIdentifier":"StoreEdgeFD","Agreements":[{"$type":"Microsoft.Marketplace.Storefront.StoreEdgeFD.BusinessLogic.Response.PackageManifest.AgreementDetail, StoreEdgeFD","AgreementLabel":"Terms of Transaction","AgreementUrl":"https://aka.ms/microsoft-store-terms-of-transaction"}]},"ServerSupportedVersions":["1.0.0","1.1.0"],"RequiredQueryParameters":["market"],"RequiredPackageMatchFields":["market"]}}
2022-03-31 08:56:15.084 [REPO] Custom header not found.
2022-03-31 08:56:15.084 [REPO] Sending http GET request to: https://storeedgefd.dsx.mp.microsoft.com/v9.0/information
2022-03-31 08:56:15.085 [REPO] Http GET request details:
GET / HTTP/1.1

Content-Type: application/json

User-Agent: winget-cli WindowsPackageManager/1.3.692-preview DesktopAppInstaller/Microsoft.DesktopAppInstaller v1.18.692.0

2022-03-31 08:56:15.131 [REPO] Response status: 200
2022-03-31 08:56:15.131 [REPO] Response details:
HTTP/1.1 200 OK

Cache-Control: max-age=0, no-cache, no-store

Connection: keep-alive

Content-Length: 853

Content-Type: application/json; charset=utf-8

Date: Thu, 31 Mar 2022 07:56:13 GMT

Expires: Thu, 31 Mar 2022 07:56:13 GMT

MS-CV: rDlBPVTf90WRaePO.0

Pragma: no-cache

Server: Microsoft-HTTPAPI/2.0

X-OSG-Served-By: WESTEUROPE_LEGACY000006_1.0.0.0

{"$type":"Microsoft.Marketplace.Storefront.StoreEdgeFD.BusinessLogic.Response.PackageMetadata.PackageMetadataResponse, StoreEdgeFD","Data":{"$type":"Microsoft.Marketplace.Storefront.StoreEdgeFD.BusinessLogic.Response.PackageMetadata.PackageMetadataData, StoreEdgeFD","SourceIdentifier":"StoreEdgeFD","SourceAgreements":{"$type":"Microsoft.Marketplace.Storefront.StoreEdgeFD.BusinessLogic.Response.PackageMetadata.SourceAgreements, StoreEdgeFD","AgreementsIdentifier":"StoreEdgeFD","Agreements":[{"$type":"Microsoft.Marketplace.Storefront.StoreEdgeFD.BusinessLogic.Response.PackageManifest.AgreementDetail, StoreEdgeFD","AgreementLabel":"Terms of Transaction","AgreementUrl":"https://aka.ms/microsoft-store-terms-of-transaction"}]},"ServerSupportedVersions":["1.0.0","1.1.0"],"RequiredQueryParameters":["market"],"RequiredPackageMatchFields":["market"]}}
2022-03-31 08:56:15.131 [REPO] Adding to aggregated source: winget
2022-03-31 08:56:15.146 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2022-03-31 08:56:15.146 [CORE] Found matching extension.
2022-03-31 08:56:15.166 [REPO] Opening SQLite Index for ImmutableRead at 'C:\Program Files\WindowsApps\Microsoft.Winget.Source_2022.331.843.391_neutral__8wekyb3d8bbwe\Public\index.db'
2022-03-31 08:56:15.166 [SQL ] Opening SQLite connection: 'file:/C:/Program Files/WindowsApps/Microsoft.Winget.Source_2022.331.843.391_neutral__8wekyb3d8bbwe/Public/index.db?immutable=1' [1, 40]
2022-03-31 08:56:15.166 [SQL ] Enabling ICU
2022-03-31 08:56:15.167 [SQL ] Preparing statement #1: select [value] from [metadata] where [name] = ?
2022-03-31 08:56:15.167 [SQL ] Binding statement #1: 1 => majorVersion
2022-03-31 08:56:15.167 [SQL ] Stepping statement #1
2022-03-31 08:56:15.167 [SQL ] Statement #1 has data
2022-03-31 08:56:15.167 [SQL ] Preparing statement #2: select [value] from [metadata] where [name] = ?
2022-03-31 08:56:15.167 [SQL ] Binding statement #2: 1 => minorVersion
2022-03-31 08:56:15.167 [SQL ] Stepping statement #2
2022-03-31 08:56:15.167 [SQL ] Statement #2 has data
2022-03-31 08:56:15.167 [SQL ] Preparing statement #3: select [value] from [metadata] where [name] = ?
2022-03-31 08:56:15.167 [SQL ] Binding statement #3: 1 => lastwritetime
2022-03-31 08:56:15.167 [SQL ] Stepping statement #3
2022-03-31 08:56:15.167 [SQL ] Statement #3 has data
2022-03-31 08:56:15.167 [REPO] Opened SQLite Index with version [1.3], last write [2022-03-31 08:43:49.000]
2022-03-31 08:56:15.283 [CLI ] Checking Source agreements for source: msstore
2022-03-31 08:56:15.283 [CORE] Setting action: Get, Type: Secure, Name: user_sources
2022-03-31 08:56:15.283 [CORE] Setting action: Get, Type: Standard, Name: sources_metadata
2022-03-31 08:56:15.283 [YAML] Detected UTF-8
2022-03-31 08:56:15.284 [CLI ] Source agreements satisfied. Source: msstore
2022-03-31 08:56:15.284 [CLI ] Checking Source agreements for source: winget
2022-03-31 08:56:15.284 [CORE] Setting action: Get, Type: Secure, Name: user_sources
2022-03-31 08:56:15.284 [CORE] Setting action: Get, Type: Standard, Name: sources_metadata
2022-03-31 08:56:15.284 [YAML] Detected UTF-8
2022-03-31 08:56:15.284 [CLI ] Source agreements satisfied. Source: winget
2022-03-31 08:56:15.284 [CORE] Setting action: Get, Type: Secure, Name: user_sources
2022-03-31 08:56:15.284 [CORE] Setting action: Get, Type: Standard, Name: sources_metadata
2022-03-31 08:56:15.284 [YAML] Detected UTF-8
2022-03-31 08:56:15.284 [REPO] Creating PredefinedInstalledSource with filter [None]
2022-03-31 08:56:15.284 [REPO] Creating new SQLite Index [4294967295.4294967295] at ':memory:'
2022-03-31 08:56:15.285 [SQL ] Opening SQLite connection: ':memory:' [6, 0]
2022-03-31 08:56:15.285 [SQL ] Enabling ICU
[...]
Preparing statement #9154: SELECT [versions].[version], [channels].[channel] FROM [manifest] JOIN [versions] ON [manifest].[version] = [versions].[rowid] JOIN [channels] ON [manifest].[channel] = [channels].[rowid] WHERE [id] = ?
2022-03-31 08:56:16.256 [SQL ] Binding statement #9154: 1 => 1292
2022-03-31 08:56:16.256 [SQL ] Stepping statement #9154
2022-03-31 08:56:16.256 [SQL ] Statement #9154 has data
2022-03-31 08:56:16.256 [SQL ] Stepping statement #9154
2022-03-31 08:56:16.256 [SQL ] Statement #9154 has data
2022-03-31 08:56:16.256 [SQL ] Stepping statement #9154
2022-03-31 08:56:16.256 [SQL ] Statement #9154 has data
2022-03-31 08:56:16.256 [SQL ] Stepping statement #9154
2022-03-31 08:56:16.256 [SQL ] Statement #9154 has completed
2022-03-31 08:56:16.261 [CLI ] Terminating context: 0x8a15002b at D:\a\_work\1\s\external\pkg\src\AppInstallerCLICore\Workflows\UpdateFlow.cpp:7c
OfficialEsco commented 2 years ago

Since that log looks Chinese to me and @Trenly didn't reply, could you post your log without --verbose-logs? Tip for posting logs:

<details>
<summary>Click for Log</summary>
<br>

Past log here

</details>
Trenly commented 2 years ago

Not sure how this missed my notifs the first time. I think what is missing is that some of the SQL queries which were cut could be informational.