sdkman / sdkman-cli

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

Bug: Stop! java is not a valid candidate while running sdk list java #1173

Closed manitgupta closed 1 year ago

manitgupta commented 1 year ago

Bug report My sdkman installation used to work perfectly before. After updating to the latest version, I am no longer able to use it.

❯ sdk list java

Stop! java is not a valid candidate.

❯ sdk version

SDKMAN!
script: 5.16.1
native: 0.1.0

For any command that I run - sdk list, sdk use and sdk default return the same output. I have tried to uninstall and install but the problem still persists. I have also tried sdk flush candidates but it did not help.

Other languages such as sdk list scala, sdk list gradle etc also do not work.

To reproduce Install the latest release of SDKMAN. Try to run sdk list java.

System info MacOS Ventura 13.2 Fish Terminal M1 Pro SDKMAN: 5.16.1

marlowww commented 1 year ago

Looks like API is down, same problem as https://github.com/sdkman/sdkman-cli/issues/1169#issuecomment-1429260567

imyxiao commented 1 year ago

same

tplive commented 1 year ago

Looks like API is down, same problem as #1169 (comment)

It's been down for two weeks? 😱

marlowww commented 1 year ago

Looks like API is down, same problem as #1169 (comment)

It's been down for two weeks? 😱

Nope, its probably different URL/endpoint than in old issue

andersenleo commented 1 year ago

Same here, fwiw..

UBessle commented 1 year ago

Same here

luongvo commented 1 year ago

Same here, we just got the issue today.

All done!

You are subscribed to the STABLE channel.

Please open a new terminal, or run the following in the existing one:

    source "/home/runner/.sdkman/bin/sdkman-init.sh"

Then issue the following command:

    sdk help

Enjoy!!!
==== BROADCAST =================================================================
* 2023-02-13: grails 5.2.6 available on SDKMAN!
* 2023-02-13: gradle 8.0 available on SDKMAN!
* 2023-02-12: skeletal 0.15.0 available on SDKMAN! https://github.com/cbmarcum/skeletal/releases/tag/v0.15.0
================================================================================

Stop! kotlin is not a valid candidate.
Error: Process completed with exit code 1.
Kaishley commented 1 year ago

Same here.

stranljip commented 1 year ago

Parallel discussion in Slack: https://sdkman.slack.com/archives/CJTNQA94M/p1676359041313729

juliaBriadis commented 1 year ago

Experiencing same issue with grails. "Stop! grails is not a valid candidate." sdk list command gives back 504 Gateway Time-out.

talonx commented 1 year ago

Same issue with installing java and gradle.

Glecun commented 1 year ago

Same issue, sdk list java returns me 504

marttp commented 1 year ago

Same issues, I thought I have faced this from my end. After updating to 5.16.1, I faced the same problem with sdk list java

<html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx/1.19.10</center>
</body>
</html>

Actually, before I updated to 5.16.1, my previous version is 5.16.0 and still able to use sdk list java

ptschack commented 1 year ago

This problem is currently present on systems which I maintain:

$ sdk version

SDKMAN!
script: 5.16.1
native: 0.1.0
$ sdk list java

Stop! java is not a valid candidate.
$ sdk list

<html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx/1.19.10</center>
</body>
</html>

Cause seems to be that https://api.sdkman.io/2/candidates/list/ is not reachable:

$ curl -i https://api.sdkman.io/2/candidates/list/
HTTP/1.1 200 Connection established       # this is the proxy

HTTP/1.1 504 Gateway Time-out
Date: Tue, 14 Feb 2023 09:58:23 GMT
Server: nginx/1.19.10
Connection: Keep-Alive
Content-Type: text/html
Content-Length: 168

<html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx/1.19.10</center>
</body>
</html>
schallerala commented 1 year ago

In some cases, it might help a few people to enable the offline mode of sdkman to allow using an already installed candidate. Small thing that might come in handy in the time being.

manish2aug commented 1 year ago

If debug logging is enabled in the config, it can be seen on even startup of the terminal that it cannot connect. Offline will only work if you already have the candidate in the cache

manish2aug commented 1 year ago

It seems that the beta channel is also not working https://beta.sdkman.io/2 giving 404

alexei-28 commented 1 year ago

I also has this problem:

Linux Mint 20.3

SDKMAN! script: 5.16.1 native: 0.1.0

In terminal I try simple command:

sdk list java but get error

Stop! java is not a valid candidate.

This also not working:

sdk install java

Stop! java is not a valid candidate.

How can I fix this error?

P.S. this not help

sdk flush candidates

mley commented 1 year ago

This is pretty frustrating. Offline mode also does not work for me.

$ sdk offline enable
Offline mode enabled.
$ sdk ls java

Stop! java is not a valid candidate.

Would it be possible to make basic usage possible without the usage of the API in the next version?

gcwiak commented 1 year ago

Same for me. SDKMAN 5.16.1., sdk list java results in 504.

ingo-1492 commented 1 year ago

same here, SDKMAN 5.16.1., sdk list java results in "Stop! java is not a valid candidate."

vanta commented 1 year ago

Works for me now.

marc0der commented 1 year ago

The candidates service went down but has now been restored.

alexei-28 commented 1 year ago

sdk update.

Now, it's work. Thanks

toby-thanathip commented 1 year ago

@marc0der It's returning a different error response now:

<head><title>503 Service Temporarily Unavailable</title></head>

Reference: https://github.com/nimblehq/android-templates/actions/runs/4172007998/jobs/7243910588

marc0der commented 1 year ago

Hey @Tuubz, this was due to the initial rate-limiting that I imposed on the API. It was a bit aggressive at first, but I've relaxed it to 10 r/s per IP. Let me know on our community slack if you still see this issue.

tplive commented 1 year ago

I guess it's not completely solved, I get the same when trying to use SDKMAN today...