SuperNeon4ik / NoxesiumUtils

Communicate with The Noxesium Mod with ease.
https://modrinth.com/plugin/noxesiumutils
GNU General Public License v3.0
13 stars 3 forks source link

ModrinthUpdateChecker fails when not a single version is "release" #22

Closed SuperNeon4ik closed 1 month ago

SuperNeon4ik commented 1 month ago

Describe the bug Currently for 1.21 there is only a beta release and when checking versions it filters versions and tries to .get(0) in a list of 0.

[22:11:50 WARN]: [NoxesiumUtils] Failed to fetch version from Modrinth.
[22:11:50 WARN]: java.util.concurrent.CompletionException: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
[22:11:50 WARN]:    at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
[22:11:50 WARN]:    at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
[22:11:50 WARN]:    at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:722)
[22:11:50 WARN]:    at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
[22:11:50 WARN]:    at java.base/java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2179)
[22:11:50 WARN]:    at NoxesiumUtils-2.0.0.jar//kong.unirest.apache.ApacheAsyncClient$1.completed(ApacheAsyncClient.java:86)
[22:11:50 WARN]:    at NoxesiumUtils-2.0.0.jar//kong.unirest.apache.ApacheAsyncClient$1.completed(ApacheAsyncClient.java:79)
[22:11:50 WARN]:    at org.apache.http.concurrent.BasicFuture.completed(BasicFuture.java:122)
[22:11:50 WARN]:    at NoxesiumUtils-2.0.0.jar//org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl.responseCompleted(DefaultClientExchangeHandlerImpl.java:182)
[22:11:50 WARN]:    at NoxesiumUtils-2.0.0.jar//org.apache.http.nio.protocol.HttpAsyncRequestExecutor.processResponse(HttpAsyncRequestExecutor.java:448)
[22:11:50 WARN]:    at NoxesiumUtils-2.0.0.jar//org.apache.http.nio.protocol.HttpAsyncRequestExecutor.inputReady(HttpAsyncRequestExecutor.java:338)
[22:11:50 WARN]:    at NoxesiumUtils-2.0.0.jar//org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:265)
[22:11:50 WARN]:    at NoxesiumUtils-2.0.0.jar//org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:87)
[22:11:50 WARN]:    at NoxesiumUtils-2.0.0.jar//org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:40)
[22:11:50 WARN]:    at NoxesiumUtils-2.0.0.jar//org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:121)
[22:11:50 WARN]:    at NoxesiumUtils-2.0.0.jar//org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:162)
[22:11:50 WARN]:    at NoxesiumUtils-2.0.0.jar//org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:337)
[22:11:50 WARN]:    at NoxesiumUtils-2.0.0.jar//org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:315)
[22:11:50 WARN]:    at NoxesiumUtils-2.0.0.jar//org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:276)
[22:11:50 WARN]:    at NoxesiumUtils-2.0.0.jar//org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104)
[22:11:50 WARN]:    at NoxesiumUtils-2.0.0.jar//org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:591)
[22:11:50 WARN]:    at java.base/java.lang.Thread.run(Thread.java:1583)
[22:11:50 WARN]: Caused by: java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
[22:11:50 WARN]:    at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:100)
[22:11:50 WARN]:    at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106)
[22:11:50 WARN]:    at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302)
[22:11:50 WARN]:    at java.base/java.util.Objects.checkIndex(Objects.java:385)
[22:11:50 WARN]:    at java.base/java.util.ArrayList.get(ArrayList.java:427)
[22:11:50 WARN]:    at NoxesiumUtils-2.0.0.jar//me.superneon4ik.noxesiumutils.modules.ModrinthUpdateChecker.lambda$checkForUpdates$1(ModrinthUpdateChecker.java:77)
[22:11:50 WARN]:    at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718)
[22:11:50 WARN]:    ... 19 more