MovingBlocks / Terasology

Terasology - open source voxel world
http://terasology.org
Apache License 2.0
3.64k stars 1.33k forks source link

org.newsclub.net.unix.AFUNIXSocketException: Cannot find method "setCreated" in java.net.Socket, java-21 #5186

Closed soloturn closed 1 month ago

soloturn commented 7 months ago

when running with java-21 the following error occurs:

22:36:22.547 [DISCORD-RPC-THREAD] ERROR o.t.s.discordrpc.DiscordRPCThread - Could not create or connect Discord client: 
java.lang.RuntimeException: org.newsclub.net.unix.AFUNIXSocketException: Cannot find method "setCreated" in java.net.Socket. Unsupported JVM?
        at com.jagrosh.discordipc.entities.pipe.Pipe.createPipe(Pipe.java:167)
        at com.jagrosh.discordipc.entities.pipe.Pipe.openPipe(Pipe.java:67)
        at com.jagrosh.discordipc.IPCClient.connect(IPCClient.java:116)
        at org.terasology.subsystem.discordrpc.DiscordRPCThread.run(DiscordRPCThread.java:170)
        at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: org.newsclub.net.unix.AFUNIXSocketException: Cannot find method "setCreated" in java.net.Socket. Unsupported JVM?
        at org.newsclub.net.unix.NativeUnixSocket.setCreated(Native Method)
        at org.newsclub.net.unix.AFUNIXSocket.<init>(AFUNIXSocket.java:36)
        at org.newsclub.net.unix.AFUNIXSocket.newInstance(AFUNIXSocket.java:54)
        at com.jagrosh.discordipc.entities.pipe.UnixPipe.<init>(UnixPipe.java:45)
        at com.jagrosh.discordipc.entities.pipe.Pipe.createPipe(Pipe.java:163)
        ... 4 common frames omitted
BenjaminAmos commented 6 months ago

It looks like we're already force-upgrading the org.newsclub.net.unix dependency, so it might be worth seeing if changing that to the latest version (2.8.3) helps.

https://github.com/MovingBlocks/Terasology/blob/1f3e359d0bfd5f16c14c9b52f081019eae84d017/subsystems/DiscordRPC/build.gradle.kts#L22-L27

BenjaminAmos commented 6 months ago

There should also be a setting to turn-off Discord IPC somewhere too. It's certainly optional.

soloturn commented 1 month ago

that works nowadays.