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
374 stars 64 forks source link

[Bug]: OracleJava17, OracleJava20, OracleJava21, and OracleJava22 no longer working #743

Open bmitchell76 opened 1 week ago

bmitchell76 commented 1 week ago

What happened?

OracleJava17, OracleJava20, OracleJava21, and OracleJava22 no longer working

Version

2409.1352

What PowerShell edition/s are you running Evergreen on?

Windows PowerShell

Which operating system/s are you running Evergreen on?

Windows Server 2016+

Have you reviewed the documentation?

Verbose output

Get-EvergreenApp OracleJava17 -Verbose
VERBOSE: Function path: C:\Program Files\WindowsPowerShell\Modules\Evergreen\2409.1352\Apps\Get-OracleJava17.ps1
VERBOSE: Function exists: C:\Program Files\WindowsPowerShell\Modules\Evergreen\2409.1352\Apps\Get-OracleJava17.ps1.
VERBOSE: Dot sourcing: C:\Program Files\WindowsPowerShell\Modules\Evergreen\2409.1352\Apps\Get-OracleJava17.ps1.
VERBOSE: Get-FunctionResource: read application resource strings from [C:\Program
Files\WindowsPowerShell\Modules\Evergreen\2409.1352\Manifests\OracleJava17.json]
VERBOSE: Calling: Get-OracleJava17.
VERBOSE: Invoke-EvergreenRestMethod: Adding Headers.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: MaximumRedirection: 2.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: Headers: System.Collections.Hashtable.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: DisableKeepAlive: True.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: ContentType: application/json; charset=utf-8.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: Method: Default.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: Uri: https://www.java.com/releases/releases.json.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: UseBasicParsing: True.
VERBOSE: Invoke-EvergreenRestMethod: Invoke-RestMethod parameter: UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X
10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 Edg/116.0.1938.81.
VERBOSE: GET https://www.java.com/releases/releases.json with 0-byte payload
WARNING: Invoke-EvergreenRestMethod: The remote server returned an error: (403) Forbidden., with:
https://www.java.com/releases/releases.json.
WARNING: Invoke-EvergreenRestMethod: For troubleshooting steps see: https://stealthpuppy.com/evergreen/troubleshoot/.
WARNING: Run 'Get-EvergreenApp -Name "OracleJava17" -Verbose' to review additional details for troubleshooting.
Invoke-RestMethod :
Access Denied
Access Denied

You don't have permission to access "http://www.java.com/releases/releases.json" on
this server.
Reference #18.dd8a7868.1726745630.382014c0
https://errors.edgesuite.net/18.dd8a7868.1726745630.382014c0
At C:\Program Files\WindowsPowerShell\Modules\Evergreen\2409.1352\Private\Invoke-EvergreenRestMethod.ps1:123 char:21
+         $Response = Invoke-RestMethod @params
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc
   eption
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
aaronparker commented 1 week ago

There's certain circumstances where these functions are working or failing. Right now, they're working for me on macOS and Windows (PowerShell 7 and 5.1); however, they've been failing under GitHub Actions.

You can fallback to Get-EvergreenAppFromApi if these aren't working in your environment.