jagrosh / DiscordIPC

Connect locally to the Discord client using IPC for a subset of RPC features like Rich Presence and Activity Join/Spectate
Apache License 2.0
141 stars 47 forks source link

Can't connect to Discord because it's not possible to create a Pipe that works either #23

Closed blueysh closed 2 years ago

blueysh commented 2 years ago

So this is a pretty strange error. It's my first time working with DiscordIPC, so it's possible I'm just not doing something. However, it seems to be the fault of a class here. Basically, I'm working on a Minecraft mod that will work in conjunction with the server I run, and one of its functions is to show Rich Presence. However, when I try to start the game using the mod, it crashes trying to startup. Here's what the crash report says the error is:

...
Caused by: 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 com.playbuilderverse.builderversetweaks.BuilderverseTweaks.connect(BuilderverseTweaks.java:29)
    at com.playbuilderverse.builderversetweaks.BuilderverseTweaks.onInitialize(BuilderverseTweaks.java:17)
    at net.fabricmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:47)
    ... 12 more
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)
    ... 17 more

Not sure if it's possible that I'm running an unsupported JVM, because I'm running it straight from a build configuration in IntelliJ IDEA which is using Java 17. I can send the full crash report, just ask me for it.

@jagrosh

blueysh commented 2 years ago

Hey so it turns out my project never fully imported right so I just created a new mod project and it worked đŸ˜‚