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.24k stars 1.45k forks source link

version number 'unknown' for azure VPN client (msstore) 3.1.2 #3427

Open gihanruk opened 1 year ago

gihanruk commented 1 year ago

Brief description of your issue

Winget wont list the version number for azure VPN client and deploying via Intune throws an error.

Steps to reproduce

winget show "azure vpn client" --versions

This will produce below:

Found Azure VPN Client [9NP355QT2SQB]
Version
-------
Unknown

tested with winget versions: 1.4.11071 and updated to version 1.5.1881 and tested produced same result.

if I use the search option:

winget search "azure vpn client"

get below result

Name             Id           Version Source
----------------------------------------------
Azure VPN Client 9NP355QT2SQB Unknown msstore

If I install the app via Microsoft Store and then use winget to List it will produce below

PS C:\Users\GihanDewaraja> winget list "azure vpn client"
Name             Id           Version Source
----------------------------------------------
Azure VPN Client 9NP355QT2SQB 3.1.3.0 msstore

Because of this issue, we cant version pin an app using the version number. and the ID points to Microsoft Store ID instead of the ID displayed for other apps. for instance if I search for Docker CLI I get below result.

Name       Id               Version Source
-------------------------------------------
Docker CLI Docker.DockerCLI 24.0.2  winget

The source here is winget so may be this is a store to winget translation issue?

similarly, when we deploy apps to Intune using 'Windows app (Win 32)' method, we get below error on our deployment log.

Transcript started, output file is C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\Azure VPN Client_Install.log
Winget already installed, moving on
Found Azure VPN Client [9NP355QT2SQB] Version Unknown
This package is provided through Microsoft Store. winget may need to acquire the package from Microsoft Store on behalf
of the current user.
Agreements for Azure VPN Client [9NP355QT2SQB] Version Unknown
Version: Unknown
Publisher: Microsoft Corporation
Publisher Url: https://microsoft.com/
Publisher Support Url: https://microsoft.com/
Description: The Azure VPN Client lets you connect to Azure securely from anywhere in the world. It supports Azure Activ
e Directory, certificate-based and RADIUS authentication.
License: ms-windows-store://pdp/?ProductId=9NP355QT2SQB
Privacy Url: https://privacy.microsoft.com/en-us/privacystatement
Agreements:
Category: Productivity
Pricing: Free
Free Trial: No
Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction
Seizure Warning: https://aka.ms/microsoft-store-seizure-warning
Store License Terms: https://aka.ms/microsoft-store-license

Verifying/Requesting package acquisition...
An unexpected error occurred while executing the command:
0x80070520 : unknown error
**********************
Windows PowerShell transcript end
End time: 20230712102612
**********************

Not sure the second unknown error 0x80070520 we get on our deployment logs also related to this.

I have tested this on several computers producing same output.

Especially the Intune deployment produced the same output for VPN Client. Modified the script to one liner, Only command running via PowerShell was:

Invoke-Expression ".\winget.exe install --name 'Azure VPN Client' --silent --accept-source-agreements --accept-package-agreements"

and it still produced the same output with unknown error 0x80070520

Expected behavior

Expected to have a version number 3.1.3 rather 'Unknown'

Actual behavior

As mentioned above, gets 'Unknown' for version.

And creating a deployment package using IntuneWinAppUtil.exe produce an intunewin file that we deploy using Intune throws the above 0x80070520 : unknown error.

Environment

Windows 11, 22H2

OS Name:                   Microsoft Windows 11 Enterprise
OS Version:                10.0.22621 N/A Build 22621
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Multiprocessor Free
Original Install Date:     18/05/2023, 10:54:19 AM
System Boot Time:          11/07/2023, 11:54:01 AM
System Manufacturer:       HP
System Model:              HP Z2 Mini G9 Workstation Desktop PC
System Type:               x64-based PC
Processor(s):              1 Processor(s) Installed.
                           [01]: Intel64 Family 6 Model 151 Stepping 2 GenuineIntel ~3200 Mhz
BIOS Version:              HP U50 Ver. 02.01.02, 2/03/2023
Windows Directory:         C:\WINDOWS
System Directory:          C:\WINDOWS\system32
Boot Device:               \Device\HarddiskVolume2
System Locale:             en-au;English (Australia)
Time Zone:                 (UTC+10:00) Canberra, Melbourne, Sydney
Total Physical Memory:     32,473 MB
Available Physical Memory: 20,805 MB
Virtual Memory: Max Size:  34,521 MB
Virtual Memory: Available: 20,636 MB
Virtual Memory: In Use:    13,885 MB
Page File Location(s):     C:\pagefile.sys
denelon commented 1 year ago

The lack of a version number is tracked with the issue below. We're working with the Microsoft Store team to expose the version numbers, but they currently display "Unknown" as a sentinel value.

Can you run the install with "--verbose-logs --logs" and share the results from the failed install?

gihanruk commented 1 year ago

Hi Denelon

Please find log below as requested: This was in C:\ProgramData\Microsoft\IntuneManagementExtension\Logs and the log file is Azure VPN Client_Install.log


Windows PowerShell transcript start
Start time: 20230713112447
Username: WORKGROUP\SYSTEM
RunAs User: WORKGROUP\SYSTEM
Configuration Name: 
Machine: GihanTestDesktop (Microsoft Windows NT 10.0.22621.0)
Host Application: powershell.exe -ExecutionPolicy Bypass -File .\Install.ps1
Process ID: 14316
PSVersion: 5.1.22621.1778
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.22621.1778
BuildVersion: 10.0.22621.1778
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1
**********************
Transcript started, output file is C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\Azure VPN Client_Install.log
Winget already installed, moving on
Azure VPN Client Not Running
Did not find any version to upgrade, now installing : Azure VPN Client 3.1.3.0
Found Azure VPN Client [9NP355QT2SQB] Version Unknown
This package is provided through Microsoft Store. winget may need to acquire the package from Microsoft Store on behalf
of the current user.
Agreements for Azure VPN Client [9NP355QT2SQB] Version Unknown
Version: Unknown
Publisher: Microsoft Corporation
Publisher Url: https://microsoft.com/
Publisher Support Url: https://microsoft.com/
Description: The Azure VPN Client lets you connect to Azure securely from anywhere in the world. It supports Azure Activ
e Directory, certificate-based and RADIUS authentication.
License: ms-windows-store://pdp/?ProductId=9NP355QT2SQB
Privacy Url: https://privacy.microsoft.com/en-us/privacystatement
Agreements:
Category: Productivity
Pricing: Free
Free Trial: No
Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction
Seizure Warning: https://aka.ms/microsoft-store-seizure-warning
Store License Terms: https://aka.ms/microsoft-store-license
Verifying/Requesting package acquisition...
An unexpected error occurred while executing the command:
0x80070520 : unknown error
**********************
Windows PowerShell transcript end
End time: 20230713112449
**********************
denelon commented 1 year ago

Do you get the same error when attempting an install on a local machine, or does this only happening when attempting to perform the install via Intune?

gihanruk commented 1 year ago

install via Intune.

locally executing the script works though it still says version is 'unknown'.

when execute via intune we get the same unknown version on top it wont install saying 0x80070520 : unknown error which is giving us a lot of grief.

As we deploy a lot of apps from intune using winget. we dont want to blindly allow all apps to update via Microsoft Store as it might break important apps and create an outage so we need the version pinning to work so we can test them first and then deploy to all staff.

acscSupport commented 1 year ago

Any update on this issue Denelon? @denelon

denelon commented 4 months ago

When the package is installed, WinGet will see the installed version via the control panel. When you run winget search <package> -s msstore some packages will have their version information. In many cases, the "msstore" source doesn't provide the version information so WinGet knows if an update is available.