sdkman / sdkman-cli

The SDKMAN! Command Line Interface
https://sdkman.io
Apache License 2.0
5.97k stars 629 forks source link

Bug: MINGW64 currently causing error when listing java Versions #1218

Closed aibolit closed 1 year ago

aibolit commented 1 year ago

Bug report

the endpoint https://api.sdkman.io/2/candidates/java/MINGW64/versions/list?installed= is currently broken content is

MethodInvocationException: Exception calling "DownloadString" with "1" argument(s): "The remote server returned an error: (500) Internal Server Error."

note that other platforms work This prevents downloading Windows native versions of Java

Replacing MINGW64 with Darwin in the url works

Also this url used to work until recently.

Also downloading versions still works. E.g. this url is still valid https://api.sdkman.io/2/broker/download/java/17.0.7-ms/MINGW64

To reproduce run sdk ls java when the platform is set to MINGW64

System info

marc0der commented 1 year ago

Can you confirm that you are on the latest client versions?

aibolit commented 1 year ago

I am hitting the url direcly - I have a custom client. Used to work until recently.

marc0der commented 1 year ago

Yep, platform inference has changed drastically. Consider upgrading to the latest client and let me know if you still experience the issue.

aibolit commented 1 year ago

Ah got it. The api is the same but the new platform is windowsx64 From https://github.com/sdkman/sdkman-candidates/blob/21b43ab1b6d61ae23765ca02e3cd26b40538cb8d/app/utils/Platform.scala#L15