Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] random errors #15

Open
tectrixdev opened this issue Jan 19, 2025 · 3 comments
Open

[BUG] random errors #15

tectrixdev opened this issue Jan 19, 2025 · 3 comments

Comments

@tectrixdev
Copy link

tectrixdev commented Jan 19, 2025

Describe the bug
A clear and concise description of what the bug is.

error messages in console on a kind of regular interval

To Reproduce
Steps to reproduce the behavior:

run the server on the same version and with the same things:

  [Sun 15:58:31 INFO ] [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
  [Sun 15:58:31 INFO ] [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
  [Sun 15:58:31 INFO ] [Skript] Server Version: 1.21.3-2358-16ce24a (MC: 1.21.3)
  [Sun 15:58:31 INFO ] [Skript] Skript Version: 2.9.5 (skriptlang-github)
  [Sun 15:58:31 INFO ] [Skript] Installed Skript Addons: 
  [Sun 15:58:31 INFO ] [Skript]  - skript-placeholders v1.7.0 (https://github.com/APickledWalrus/skript-placeholders)
  [Sun 15:58:31 INFO ] [Skript]  - Skuishy v2.8.1 (https://aabss.cc)
  [Sun 15:58:31 INFO ] [Skript]  - Lusk v1.2.1
  [Sun 15:58:31 INFO ] [Skript]  - skUtilities v0.9.2 (https://tim740.github.io/)
  [Sun 15:58:31 INFO ] [Skript]  - skRayFall v1.9.28 (https://sk.rayfall.net/)
  [Sun 15:58:31 INFO ] [Skript]  - SkQuery v4.1.10
  [Sun 15:58:31 INFO ] [Skript]  - SkBee v3.6.6 (https://github.com/SkriptHub/SkBee)
  [Sun 15:58:31 INFO ] [Skript]  - SkLogs v1.3 (https://github.com/EquipableMC/SkLogs)
  [Sun 15:58:31 INFO ] [Skript] Installed dependencies: None

Expected behavior
A clear and concise description of what you expected to happen.

no error

Screenshots
If applicable, add screenshots to help explain your problem.

on startup:

  [Sun 15:39:18 INFO ] [Skuishy] java.lang.IllegalStateException: Not a JSON Array: null
  [Sun 15:39:18 INFO ] [Skuishy] Stacktrace Message: Not a JSON Array: null
  [Sun 15:39:18 INFO ] [Skuishy] Cause: null
  [Sun 15:39:18 INFO ] [Skuishy] | com.google.gson.JsonElement.getAsJsonArray(JsonElement.java:117)
  [Sun 15:39:18 INFO ] [Skuishy] | Skuishy-2.8.1.jar//lol.aabss.skuishy.other.GetVersion.latestVersion(GetVersion.java:29)
  [Sun 15:39:18 INFO ] [Skuishy] | Skuishy-2.8.1.jar//lol.aabss.skuishy.Skuishy.lambda$onEnable$1(Skuishy.java:85)
  [Sun 15:39:18 INFO ] [Skuishy] | org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:78)
  [Sun 15:39:18 INFO ] [Skuishy] | org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
  [Sun 15:39:18 INFO ] [Skuishy] | com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
  [Sun 15:39:18 INFO ] [Skuishy] | java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
  [Sun 15:39:18 INFO ] [Skuishy] | java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
  [Sun 15:39:18 INFO ] [Skuishy] | java.base/java.lang.Thread.run(Thread.java:1583)
java.lang.NullPointerException: Cannot invoke "String.trim()" because "version" is null
    at Skript-2.9.5.jar//ch.njol.skript.util.Version.<init>(Version.java:58)
    at Skuishy-2.8.1.jar//lol.aabss.skuishy.Skuishy.lambda$onEnable$1(Skuishy.java:87)
    at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:78)
    at org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
    at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    at java.base/java.lang.Thread.run(Thread.java:1583)
  [Sun 15:39:20 INFO ] [Skript] All scripts loaded without errors.
  [Sun 15:39:20 INFO ] [Skript] Loaded 14 scripts with a total of 58 structures in 1.99 seconds
  [Sun 15:39:20 INFO ] [Skript] Finished loading.
  [Sun 15:39:20 INFO  BetterPrefix] was enabled successfully!
  [Sun 15:39:20 INFO  PlaceholderAPI] Successfully registered internal expansion: discordsrv [1.29.0]
! [Sun 15:39:20 WARN  PlaceholderAPI] Cannot load expansion playerstats due to a missing plugin: PlayerStats
  [Sun 15:39:20 INFO  PlaceholderAPI] Successfully registered external expansion: pinger [1.0.1]
  [Sun 15:39:20 INFO  PlaceholderAPI] Successfully registered external expansion: skript [1.0.0]
  [Sun 15:39:20 INFO  PlaceholderAPI] Successfully registered external expansion: player [2.0.8]
  [Sun 15:39:20 INFO  PlaceholderAPI] Successfully registered external expansion: Advancements [1.7]
  [Sun 15:39:20 INFO  PlaceholderAPI] Successfully registered external expansion: otherplayer [2.1.0]
  [Sun 15:39:20 INFO ] 5 placeholder hook(s) registered!
  [Sun 15:39:20 INFO  Minecraft] [Multiverse-Inventories] First run!

randomly:

java.lang.NullPointerException: Cannot invoke "String.trim()" because "version" is null
    at Skript-2.9.5.jar//ch.njol.skript.util.Version.<init>(Version.java:58)
    at Skuishy-2.8.1.jar//lol.aabss.skuishy.Skuishy.lambda$onEnable$1(Skuishy.java:87)
    at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:78)
    at org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
    at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    at java.base/java.lang.Thread.run(Thread.java:1583)
  [Sun 07:06:48 INFO  Server/ServerLoginPacketListenerImpl] ServerSeekerV2 (/154.213.192.15:44974) lost connection: Disconnected
  [Sun 07:33:42 INFO ] [Skuishy] An unexpected error occurred! See the stacktrace below:
  [Sun 07:33:42 INFO ] [Skuishy] java.lang.IllegalStateException: Not a JSON Array: null
  [Sun 07:33:42 INFO ] [Skuishy] Stacktrace Message: Not a JSON Array: null
  [Sun 07:33:42 INFO ] [Skuishy] Cause: null
  [Sun 07:33:42 INFO ] [Skuishy] | com.google.gson.JsonElement.getAsJsonArray(JsonElement.java:117)
  [Sun 07:33:42 INFO ] [Skuishy] | Skuishy-2.8.1.jar//lol.aabss.skuishy.other.GetVersion.latestVersion(GetVersion.java:29)
  [Sun 07:33:42 INFO ] [Skuishy] | Skuishy-2.8.1.jar//lol.aabss.skuishy.Skuishy.lambda$onEnable$1(Skuishy.java:85)
  [Sun 07:33:42 INFO ] [Skuishy] | org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:78)
  [Sun 07:33:42 INFO ] [Skuishy] | org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
  [Sun 07:33:42 INFO ] [Skuishy] | com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)

  [Sun 07:33:42 INFO ] [Skuishy] | java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
  [Sun 07:33:42 INFO ] [Skuishy] | java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
  [Sun 07:33:42 INFO ] [Skuishy] | java.base/java.lang.Thread.run(Thread.java:1583)
! [Sun 07:33:42 WARN  Skuishy] Plugin Skuishy v2.8.1 generated an exception while executing task 19
java.lang.NullPointerException: Cannot invoke "String.trim()" because "version" is null
    at Skript-2.9.5.jar//ch.njol.skript.util.Version.<init>(Version.java:58)
    at Skuishy-2.8.1.jar//lol.aabss.skuishy.Skuishy.lambda$onEnable$1(Skuishy.java:87)
    at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:78)
    at org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
    at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    at java.base/java.lang.Thread.run(Thread.java:1583)
  [Sun 09:33:42 INFO ] [Skuishy] An unexpected error occurred! See the stacktrace below:
  [Sun 09:33:42 INFO ] [Skuishy] java.lang.IllegalStateException: Not a JSON Array: null
  [Sun 09:33:42 INFO ] [Skuishy] Stacktrace Message: Not a JSON Array: null
  [Sun 09:33:42 INFO ] [Skuishy] Cause: null
  [Sun 09:33:42 INFO ] [Skuishy] | com.google.gson.JsonElement.getAsJsonArray(JsonElement.java:117)
  [Sun 09:33:42 INFO ] [Skuishy] | Skuishy-2.8.1.jar//lol.aabss.skuishy.other.GetVersion.latestVersion(GetVersion.java:29)
  [Sun 09:33:42 INFO ] [Skuishy] | Skuishy-2.8.1.jar//lol.aabss.skuishy.Skuishy.lambda$onEnable$1(Skuishy.java:85)
  [Sun 09:33:42 INFO ] [Skuishy] | org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:78)

and some more...

Versions
Show the versions of Java, Paper/Spigot, Skript and Skuishy.

  [Sun 16:05:27 INFO ] Current Purpur Version: 1.21.3-2358-16ce24a (MC: 1.21.3)*
* You are running the latest version

   [Sun 15:58:31 INFO ] [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
  [Sun 15:58:31 INFO ] [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
  [Sun 15:58:31 INFO ] [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
  [Sun 15:58:31 INFO ] [Skript] Server Version: 1.21.3-2358-16ce24a (MC: 1.21.3)
  [Sun 15:58:31 INFO ] [Skript] Skript Version: 2.9.5 (skriptlang-github)
  [Sun 15:58:31 INFO ] [Skript] Installed Skript Addons: 
  [Sun 15:58:31 INFO ] [Skript]  - skript-placeholders v1.7.0 (https://github.com/APickledWalrus/skript-placeholders)
  [Sun 15:58:31 INFO ] [Skript]  - Skuishy v2.8.1 (https://aabss.cc)
  [Sun 15:58:31 INFO ] [Skript]  - Lusk v1.2.1
  [Sun 15:58:31 INFO ] [Skript]  - skUtilities v0.9.2 (https://tim740.github.io/)
  [Sun 15:58:31 INFO ] [Skript]  - skRayFall v1.9.28 (https://sk.rayfall.net/)
  [Sun 15:58:31 INFO ] [Skript]  - SkQuery v4.1.10
  [Sun 15:58:31 INFO ] [Skript]  - SkBee v3.6.6 (https://github.com/SkriptHub/SkBee)
  [Sun 15:58:31 INFO ] [Skript]  - SkLogs v1.3 (https://github.com/EquipableMC/SkLogs)
  [Sun 15:58:31 INFO ] [Skript] Installed dependencies: None

Additional context
Add any other context about the problem here.

everything still works fine as far as I know

@MrRagtime
Copy link

I found the issue!

The Modrinth page for this plugin has been deleted, and in GetVersion.java at Line 25, it's requesting the Modrinth page, and because it no longer exist, it returns as "null".

.uri(URI.create("https://api.modrinth.com/v2/project/skuishy/version"))

Just set "update-checker:", and "auto-update:" to "false" to get rid of the random errors.
Keep in mind, you will still get the error every time you start the server!

Image

If you're using FunkySk for NoteBlockAPI, set "note-elements:" to "false" as well.

@MrRagtime
Copy link

also setting "update-checker:", and "auto-update:" to "false" does not get rid of the random errors.
Sorry!

@tectrixdev
Copy link
Author

Can this be fixed? this is very important for my server, it really does spam the logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants