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

[Bug]: VMware applications fail due to changes to product API #678

Open
2 tasks done
aaronparker opened this issue May 7, 2024 · 4 comments
Open
2 tasks done

[Bug]: VMware applications fail due to changes to product API #678

aaronparker opened this issue May 7, 2024 · 4 comments
Labels
information Already fixed or not something requiring an update vendor issue An issue with the source data from the vendor

Comments

@aaronparker
Copy link
Owner

aaronparker commented May 7, 2024

What happened?

Recent changes to the VMware products and the move Omnissa have broken the available updates from the products API at: https://customerconnect.vmware.com/channel/public/api/v1.0/products/getProductsAtoZ

These will likely remain broken until the new Omnissa downloads site is live and working, and assuming it will also provide a similar API.

This affects:

  • VMwareHorizonClient
  • VMwareOSOptimizationTool
  • VMwareSDWANClient
  • VMwareWorkstationPlayer
  • VMwareWorkstationPro

Version

2405.994

What PowerShell edition/s are you running Evergreen on?

PowerShell Core, Windows PowerShell

Which operating system/s are you running Evergreen on?

Windows 10+, macOS

Have you reviewed the documentation?

Verbose output

VERBOSE: Function path: /Users/aaron/projects/evergreen/Evergreen/Apps/Get-VMwareWorkstationPro.ps1
VERBOSE: Function exists: /Users/aaron/projects/evergreen/Evergreen/Apps/Get-VMwareWorkstationPro.ps1.
VERBOSE: Dot sourcing: /Users/aaron/projects/evergreen/Evergreen/Apps/Get-VMwareWorkstationPro.ps1.
VERBOSE: Get-FunctionResource: read application resource strings from [/Users/aaron/projects/evergreen/Evergreen/Manifests/VMwareWorkstationPro.json]
VERBOSE: Calling: Get-VMwareWorkstationPro.
VERBOSE: Get-VMwareAPIPath: Return https://customerconnect.vmware.com/channel/public/api/v1.0/products
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: ContentType: application/json; charset=utf-8.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: DisableKeepAlive: True.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: Method: Default.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: MaximumRedirection: 2.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.2478.67.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: Uri: https://customerconnect.vmware.com/channel/public/api/v1.0/products/getProductsAtoZ.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: UseBasicParsing: True.
VERBOSE: Requested HTTP/1.1 GET with 0-byte payload
VERBOSE: Received HTTP/1.1 response of content type text/html of unknown size
VERBOSE: Content encoding: utf-8
Get-VMwareProductDownload: /Users/aaron/projects/evergreen/Evergreen/Apps/Get-VMwareWorkstationPro.ps1:17
Line |
  17 |          Get-VMwareProductDownload | `
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~
     | The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its
     | properties do not match any of the parameters that take pipeline input.
@aaronparker aaronparker added bug Something isn't working vendor issue An issue with the source data from the vendor labels May 7, 2024
@aaronparker aaronparker changed the title [Bug]: VMware EUC applications fail due to changes to product API [Bug]: VMware applications fail due to changes to product API May 19, 2024
@aaronparker
Copy link
Owner Author

I'll be removing these applications from Evergreen for the time being. It's likely the API used to find downloads is not going to be available on the Broadcom site and changes at Omnissa are still on-going

aaronparker added a commit that referenced this issue May 19, 2024
@aaronparker aaronparker added information Already fixed or not something requiring an update and removed bug Something isn't working labels Jun 15, 2024
@SpecterShell
Copy link

SpecterShell commented Jun 30, 2024

VMware Horizon Client is available on Omnissa.

https://customerconnect.omnissa.com/downloads/info/slug/desktop_end_user_computing/vmware_horizon_clients/horizon_8

@DanGough
Copy link
Contributor

DanGough commented Jul 1, 2024

I've reversed the auto update API call, but the downloads are in .tar format and they are cut down in that there are no VMware Tools ISOs included.

function Decompress-GZip($Path, $Destination) {
    $inStream = New-Object System.IO.FileStream $Path, ([IO.FileMode]::Open), ([IO.FileAccess]::Read), ([IO.FileShare]::Read)
    $gzipStream = New-Object System.IO.Compression.GZipStream $inStream, ([IO.Compression.CompressionMode]::Decompress)
    $outStream = New-Object System.IO.FileStream $Destination, ([IO.FileMode]::Create), ([IO.FileAccess]::Write), ([IO.FileShare]::None)
    $buffer = New-Object byte[](1024)
    while(($read = $gzipStream.Read($buffer, 0, 1024)) -gt 0) {
        $outStream.Write($buffer, 0, $read)
    }
    $gzipStream.Close()
    $outStream.Close()
    $inStream.Close()
}

$TempPath = Join-Path $env:TEMP (New-Guid).Guid
New-Item -Path $TempPath -ItemType Directory -Force | Out-Null

$Products = @(
    @{
        ProductName = 'VMware Workstation Pro'
        URL = 'https://softwareupdate.vmware.com/cds/vmw-desktop/ws-windows.xml'
        MajorVersion = 17
    }
    @{
        ProductName = 'VMware Workstation Player'
        URL = 'https://softwareupdate.vmware.com/cds/vmw-desktop/player-windows.xml'
        MajorVersion = 17
    }
    @{
        ProductName = 'VMware Remote Console'
        URL = 'https://softwareupdate.vmware.com/cds/vmw-desktop/vmrc-windows.xml'
        #MajorVersion = 12
    }
)

foreach ($Product in $Products) {
    try {
        $XML = Invoke-RestMethod -Uri $Product.URL -DisableKeepAlive
    }
    catch {
        Write-Error "Failed to download $($Product.URL): $_"
        continue
    }

    $MajorVersions = ($XML.metaList.metadata.url | Select-String -Pattern '\d+').Matches.Groups.Value | Sort-Object -Unique
    if ($Product.MajorVersion) {
        $MajorVersions = $MajorVersions | Where-Object {$_ -eq $Product.MajorVersion}
    }

    foreach ($MajorVersion in $MajorVersions) {
        try {
            $Version = (($XML.metaList.metadata.url | Select-String -Pattern "$MajorVersion(?:\.\d+)+").Matches.Groups.Value | ForEach-Object {[version]$_} | Sort-Object -Descending | Select-Object -First 1).ToString()
            $MetadataURL = 'https://softwareupdate.vmware.com/cds/vmw-desktop/' + ($XML.metaList.metadata.url | Where-Object {$_ -match "/$Version/(?!.*packages)"})
            $Download = Invoke-Download -Uri $MetadataURL -Destination $TempPath -PassThru
            $MetadataPath = $Download.FullName -Replace '\.gz$'
            Decompress-GZip -Path $Download.FullName -Destination $MetadataPath
            $MetadataXML = [xml](Get-Content -Path $MetadataPath)
    
            $URL = (Split-Path $MetadataURL -Parent) + $MetadataXML.metadataResponse.bulletin.componentList.component.relativePath.'#text'
    
            [PSCustomObject]@{
                Name = $Product.ProductName
                MajorVersion = $MajorVersion
                Version = $Version
                URI = $URL
            }
        }
        catch {
            Write-Error "Error: $_"
            continue
        }
    }
}

Remove-Item -Path $TempPath -Recurse -Force

(Invoke-Download is from my PsDownload, so install that or change the code to run the above)

@eprowe
Copy link

eprowe commented Dec 20, 2024

The new URI for the VMware Horizon Client is https://softwareupdate.vmware.com/horizon-clients/viewcrt-mac/viewcrt-windows.xml

aaronparker added a commit that referenced this issue Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
information Already fixed or not something requiring an update vendor issue An issue with the source data from the vendor
Projects
None yet
Development

No branches or pull requests

4 participants