aaronparker / evergreen

Create evergreen Windows image build pipelines with the latest version numbers and download URLs for common applications
http://stealthpuppy.com/evergreen/
MIT License
375 stars 64 forks source link

[Bug]: Tableau Desktop, Prep & Reader no longer working #658

Closed AScott-WWF closed 4 months ago

AScott-WWF commented 5 months ago

What happened?

It appears the Tableau site may have changed so the Get-EvergreenApp functions currently fail to retrieve the latest Tableau Desktop, Prep Builder and Reader are all failing with WARNING: Resolve-SystemNetWebRequest: , with: https://www.tableau.com/downloads/...

As the pages referenced as the Download URi (in each Manifest) does a 302 redirect to the actual URL of the download file, it may be that the download request is now expecting a header to be set or a cookie to exist for it to successfully return the download. I have tried with various headers (including User-Agent, Sec-Ch-Ua, Sec-Ch-Ua-Mobile, Sec-Ch-Ua-Platform, Sec-Fetch-Dest, Sec-Fetch-Mode, Sec-Fetch-Site & Sec-Fetch-User) but I can not get the page to return anything other than Access Denied. Example (for Latest Tableau Desktop download):

$url = "https://www.tableau.com/downloads/desktop/pc64"
Invoke-WebRequest $url -UserAgent 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36' -Headers @{"Sec-Ch-Ua"='"Chromium";v="124", "Google Chrome";v="124", "Not-A.Brand";v="99"','"Sec-Fetch-Mode"="navigate"','"Sec-Ch-Ua-Platform"="`"Windows`""','"Sec-Fetch-Dest"="document"','"Sec-Fetch-Site"="none"','"Sec-Fetch-User"="?1"'}

Results:

Invoke-WebRequest:
Access Denied

Access Denied

You don't have permission to access "http://www.tableau.com/downloads/desktop/pc64" on this server.
Reference #18.9f3e1202.1713428789.5e2cf9a
https://errors.edgesuite.net/18.9f3e1202.1713428789.5e2cf9a

Translation to ASCII:

You don't have permission to access "http://www.tableau.com/downloads/desktop/pc64" on this server.
Reference #18.9f3e1202.1713428789.5e2cf9a
https://errors.edgesuite.net/18.9f3e1202.1713428789.5e2cf9a

Unsure if this can be fixed for all 3? N.B. I have included the current verbose output from all three products below

Version

2404.901

What PowerShell edition/s are you running Evergreen on?

PowerShell Core, Windows PowerShell

Which operating system/s are you running Evergreen on?

Windows 10+

Have you reviewed the documentation?

Verbose output

Get-EvergreenApp -Name "TableauDesktop" -Verbose
VERBOSE: Function path: C:\Program Files\WindowsPowerShell\Modules\Evergreen\2404.901\Apps\Get-TableauDesktop.ps1
VERBOSE: Function exists: C:\Program Files\WindowsPowerShell\Modules\Evergreen\2404.901\Apps\Get-TableauDesktop.ps1.
VERBOSE: Dot sourcing: C:\Program Files\WindowsPowerShell\Modules\Evergreen\2404.901\Apps\Get-TableauDesktop.ps1.
VERBOSE: Get-FunctionResource: read application resource strings from [C:\Program Files\WindowsPowerShell\Modules\Evergreen\2404.901\Manifests\TableauDesktop.json]
VERBOSE: Calling: Get-TableauDesktop.
VERBOSE: Resolve-SystemNetWebRequest: Attempting to resolve: https://www.tableau.com/downloads/desktop/pc64.
WARNING: Resolve-SystemNetWebRequest: , with: https://www.tableau.com/downloads/desktop/pc64.
WARNING: Resolve-SystemNetWebRequest: For troubleshooting steps see: https://stealthpuppy.com/evergreen/troubleshoot/.
WARNING: Run 'Get-EvergreenApp -Name "TableauDesktop" -Verbose' to review additional details for troubleshooting.
Exception: C:\Program Files\WindowsPowerShell\Modules\Evergreen\2404.901\Apps\Get-TableauDesktop.ps1:21
Line |
  21 |  …    $Response = Resolve-SystemNetWebRequest -Uri $res.Get.Download.Uri
     |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | You cannot call a method on a null-valued expression.

Get-EvergreenApp -Name "TableauPrep" -Verbose
VERBOSE: Function path: C:\Program Files\WindowsPowerShell\Modules\Evergreen\2404.901\Apps\Get-TableauPrep.ps1
VERBOSE: Function exists: C:\Program Files\WindowsPowerShell\Modules\Evergreen\2404.901\Apps\Get-TableauPrep.ps1.
VERBOSE: Dot sourcing: C:\Program Files\WindowsPowerShell\Modules\Evergreen\2404.901\Apps\Get-TableauPrep.ps1.
VERBOSE: Get-FunctionResource: read application resource strings from [C:\Program Files\WindowsPowerShell\Modules\Evergreen\2404.901\Manifests\TableauPrep.json]
VERBOSE: Calling: Get-TableauPrep.
VERBOSE: Resolve-SystemNetWebRequest: Attempting to resolve: https://www.tableau.com/downloads/prep/pc64.
WARNING: Resolve-SystemNetWebRequest: , with: https://www.tableau.com/downloads/prep/pc64.
WARNING: Resolve-SystemNetWebRequest: For troubleshooting steps see: https://stealthpuppy.com/evergreen/troubleshoot/.
WARNING: Run 'Get-EvergreenApp -Name "TableauPrep" -Verbose' to review additional details for troubleshooting.
Exception: C:\Program Files\WindowsPowerShell\Modules\Evergreen\2404.901\Apps\Get-TableauPrep.ps1:21
Line |
  21 |  …    $Response = Resolve-SystemNetWebRequest -Uri $res.Get.Download.Uri
     |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | You cannot call a method on a null-valued expression.

Get-EvergreenApp -Name "TableauReader" -Verbose
VERBOSE: Function path: C:\Program Files\WindowsPowerShell\Modules\Evergreen\2404.901\Apps\Get-TableauReader.ps1
VERBOSE: Function exists: C:\Program Files\WindowsPowerShell\Modules\Evergreen\2404.901\Apps\Get-TableauReader.ps1.
VERBOSE: Dot sourcing: C:\Program Files\WindowsPowerShell\Modules\Evergreen\2404.901\Apps\Get-TableauReader.ps1.
VERBOSE: Get-FunctionResource: read application resource strings from [C:\Program Files\WindowsPowerShell\Modules\Evergreen\2404.901\Manifests\TableauReader.json]
VERBOSE: Calling: Get-TableauReader.
VERBOSE: Resolve-SystemNetWebRequest: Attempting to resolve: https://www.tableau.com/downloads/reader/pc64.
WARNING: Resolve-SystemNetWebRequest: , with: https://www.tableau.com/downloads/reader/pc64.
WARNING: Resolve-SystemNetWebRequest: For troubleshooting steps see: https://stealthpuppy.com/evergreen/troubleshoot/.
WARNING: Run 'Get-EvergreenApp -Name "TableauReader" -Verbose' to review additional details for troubleshooting.
Exception: C:\Program Files\WindowsPowerShell\Modules\Evergreen\2404.901\Apps\Get-TableauReader.ps1:21
Line |
  21 |  …    $Response = Resolve-SystemNetWebRequest -Uri $res.Get.Download.Uri
     |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | You cannot call a method on a null-valued expression.
aaronparker commented 5 months ago

The server is probably expecting a different user agent. @AScott-WWF do you have access to these applications to see what they're doing via Fiddler?

aaronparker commented 5 months ago

Nvm, fixed with headers in the request.