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

MAybe you wanna look at this #95

Open
TrasonCo opened this issue May 7, 2024 · 5 comments
Open

MAybe you wanna look at this #95

TrasonCo opened this issue May 7, 2024 · 5 comments

Comments

@TrasonCo
Copy link

TrasonCo commented May 7, 2024

[02:39:01 ERROR]: #!#! 
[02:39:01 ERROR]: #!#! [Skript] Severe Error:
[02:39:01 ERROR]: #!#! 
[02:39:01 ERROR]: #!#! You're running outdated version of Skript! Please try updating it NOW; it might fix this.
[02:39:01 ERROR]: #!#! Run /sk update check to get a download link to latest Skript!
[02:39:01 ERROR]: #!#! You will be given instructions how to report this error if it persists after update.
[02:39:01 ERROR]: #!#! 
[02:39:01 ERROR]: #!#! Stack trace:
[02:39:01 ERROR]: #!#! java.lang.NullPointerException: Cannot invoke "cz.coffee.skjson.api.http.RequestResponse.getBodyContent(boolean)" because the return value of "java.util.concurrent.CompletableFuture.join()" is null
[02:39:01 ERROR]: #!#!     at SkJson.jar//cz.coffee.skjson.skript.base.NewJsonExpression.get(NewJsonExpression.java:130)
[02:39:01 ERROR]: #!#!     at SkJson.jar//cz.coffee.skjson.skript.base.NewJsonExpression.get(NewJsonExpression.java:40)
[02:39:01 ERROR]: #!#!     at Skript.jar//ch.njol.skript.lang.util.SimpleExpression.getArray(SimpleExpression.java:94)
[02:39:01 ERROR]: #!#!     at Skript.jar//ch.njol.skript.effects.EffChange.execute(EffChange.java:284)
[02:39:01 ERROR]: #!#!     at Skript.jar//ch.njol.skript.lang.Effect.run(Effect.java:49)
[02:39:01 ERROR]: #!#!     at Skript.jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:61)
[02:39:01 ERROR]: #!#!     at Skript.jar//ch.njol.skript.lang.TriggerItem.walk(TriggerItem.java:88)
        at com.github.twitch4j.client.websocket.WebsocketConnection.reconnect(WebsocketConnection.java:295) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.connect(WebsocketConnection.java:245) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.reconnect(WebsocketConnection.java:295) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.connect(WebsocketConnection.java:245) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.reconnect(WebsocketConnection.java:295) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.connect(WebsocketConnection.java:245) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.reconnect(WebsocketConnection.java:295) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.connect(WebsocketConnection.java:245) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.reconnect(WebsocketConnection.java:295) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.connect(WebsocketConnection.java:245) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.reconnect(WebsocketConnection.java:295) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.connect(WebsocketConnection.java:245) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.reconnect(WebsocketConnection.java:295) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.connect(WebsocketConnection.java:245) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.reconnect(WebsocketConnection.java:295) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.connect(WebsocketConnection.java:245) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.reconnect(WebsocketConnection.java:295) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.connect(WebsocketConnection.java:245) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.reconnect(WebsocketConnection.java:295) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.connect(WebsocketConnection.java:245) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.reconnect(WebsocketConnection.java:295) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.connect(WebsocketConnection.java:245) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.reconnect(WebsocketConnection.java:295) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.connect(WebsocketConnection.java:245) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.reconnect(WebsocketConnection.java:295) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.connect(WebsocketConnection.java:245) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.reconnect(WebsocketConnection.java:295) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.connect(WebsocketConnection.java:245) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.reconnect(WebsocketConnection.java:295) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.connect(WebsocketConnection.java:245) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.reconnect(WebsocketConnection.java:295) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.connect(WebsocketConnection.java:245) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.reconnect(WebsocketConnection.java:295) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.connect(WebsocketConnection.java:245) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.reconnect(WebsocketConnection.java:295) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.connect(WebsocketConnection.java:245) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.reconnect(WebsocketConnection.java:295) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.connect(WebsocketConnection.java:245) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.reconnect(WebsocketConnection.java:295) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.connect(WebsocketConnection.java:245) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.reconnect(WebsocketConnection.java:295) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.connect(WebsocketConnection.java:245) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.reconnect(WebsocketConnection.java:295) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.connect(WebsocketConnection.java:245) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection.reconnect(WebsocketConnection.java:295) ~[Skitch-1.3.3-test.jar:?]
        at com.github.twitch4j.client.websocket.WebsocketConnection$1.lambda$onDisconnected$1(WebsocketConnection.java:150) ~[Skitch-1.3.3-test.jar:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:840) ~[?:?]
Caused by: java.net.SocketTimeoutException: Connect timed out
        at sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:551) ~[?:?]
        at sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:602) ~[?:?]
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) ~[?:?]
        at java.net.Socket.connect(Socket.java:633) ~[?:?]
        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:304) ~[?:?]
        at com.neovisionaries.ws.client.SocketInitiator$SocketRacer.run(SocketInitiator.java:126) ~[Skitch-1.3.3-test.jar:?]
@cooffeeRequired
Copy link
Owner

Hello there, i will look on it today. Thank you for reporting that, can you provide your version of bukkit and also version of Skript and .sk file what you are using (that throw this exception)

@TrasonCo
Copy link
Author

TrasonCo commented May 8, 2024


every 1 minute:
	set {_planets} to json from website "https://helldiverstrainingmanual.com/api/v1/war/campaign"
	set {_n} to size of values of {_planets}


	set {_table0} to new Table.Builder()
	{_table0}.withAlignments(2,2,2)
	{_table0}.addRow("Name", "Players", "Percentage")
	
	loop {_n} times:
		set {_m} to loop-value - 1
		if value "%{_m}%::faction" of {_planets} is "Terminids":
			set {_name} to value "%{_m}%::name" of {_planets}
			set {_players} to value "%{_m}%::players" of {_planets}
			set {_percentage} to value "%{_m}%::percentage" of {_planets}
			{_table0}.addRow("%{_name}%", "%{_players}%", "%{_percentage}%%%")



	set {_table1} to new Table.Builder()
	{_table1}.withAlignments(2,2,2)
	{_table1}.addRow("Planet", "Helldiver", "Status")
	loop {_n} times:
		set {_m} to loop-value - 1
		if value "%{_m}%::faction" of {_planets} is "Automatons":
			set {_name} to value "%{_m}%::name" of {_planets}
			set {_players} to value "%{_m}%::players" of {_planets}
			set {_percentage} to value "%{_m}%::percentage" of {_planets}
			{_table1}.addRow("%{_name}%", "%{_players}%", "%{_percentage}%%%")


	set {_order} to json from website "https://helldiverstrainingmanual.com/api/v1/war/major-orders"
	set {_title} to value "0::setting::overrideTitle" of {_order}
	if {_title} is not set:
		set {_title} to "No Major Order"
	set {_brief} to value "0::setting::overrideBrief" of {_order}
	if {_brief} is not set:
		set {_brief} to " "
	set {_task} to value "0::setting::taskDescription" of {_order}
	if {_task} is not set:
		set {_task} to " "
	set {_reward} to value "0::setting::reward::amount" of {_order}
	if {_reward} is not set:
		set {_reward} to "0"

	
	set {_t} to secondToDay(value "0::expiresIn" of {_order})
	add " " to {_mOrder::*}
	add "<:majororder:1234060924437008437> **%{_title}%** - **%{_t}%**" to {_mOrder::*}
	add "```%{_brief}%```" to {_mOrder::*}
	add "```%{_task}%```" to {_mOrder::*}
	add "**REWARD:** %{_reward}% Medals" to {_mOrder::*}

	make embed and store it in {_embed}: 
		set title of embed to "Overview of war: %now%"

		set description of embed to join {_mOrder::*} with nl

		add field named "<:Terminide:1234057983487643668> Terminide Planeten" with value "```%{_table0}.build()%```" to fields of embed
		add field named "<:Automatons:1234057984636882995> Automatons Planeten" with value "```%{_table1}.build()%```" to fields of embed

		set embed color of the embed to red
		set footer of embed to "Made by Trason <3"
		set timestamp of embed to now


[11:21:20 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases       
[11:21:20 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[11:21:20 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[11:21:20 INFO]: [Skript] Server Version: git-Paper-496 (MC: 1.20.4)
[11:21:20 INFO]: [Skript] Skript Version: 2.8.5 (skriptlang-github)
[11:21:20 INFO]: [Skript] Installed Skript Addons:
[11:21:20 INFO]: [Skript]  - SkImage v1.8
[11:21:20 INFO]: [Skript]  - DiSky v4.17.0
[11:21:20 INFO]: [Skript]  - skript-reflect v2.4 (https://github.com/SkriptLang/skript-reflect)
[11:21:20 INFO]: [Skript]  - skript-db v1.3.9
[11:21:20 INFO]: [Skript]  - SkJson v3.0.7 (https://www.skjson.xyz/)
[11:21:20 INFO]: [Skript]  - Skitch v1.4.2
[11:21:20 INFO]: [Skript] Installed dependencies: None

@cooffeeRequired
Copy link
Owner

image

Patched file will be uploaded here..
SkJson-patch.zip

@TrasonCo
Copy link
Author

TrasonCo commented May 9, 2024

Okay bit what is changed now, cause it's working already just that he lose connection sometimes and brings this error 😊

@cooffeeRequired
Copy link
Owner

The issue happends still?

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

When branches are created from issues, their pull requests are automatically linked.

2 participants