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
142 stars 47 forks source link

throws org.newsclub.net.unix.AFUNIXSocketException in macOS High Sierra #19

Open SrinSS01 opened 3 years ago

SrinSS01 commented 3 years ago

Exception in thread "main" 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 Main.main(Main.java:22) 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.(AFUNIXSocket.java:36) at org.newsclub.net.unix.AFUNIXSocket.newInstance(AFUNIXSocket.java:54) at com.jagrosh.discordipc.entities.pipe.UnixPipe.(UnixPipe.java:45) at com.jagrosh.discordipc.entities.pipe.Pipe.createPipe(Pipe.java:163) ... 3 more

Sanduhr32 commented 3 years ago

Cannot find method "setCreated" in java.net.Socket. Unsupported JVM?

Check your JVM dude.

WinterAlexander commented 3 years ago

Similar issue with a user on Catalina 10.15.7 but a total Java crash instead. With AdoptOpenJDK 16

1XMCURTHDINFO  Current thread
3XMTHREADINFO      "LWJGL Application" J9VMThread:0x0000000017BEF200, omrthread_t:0x00007FEB271E3250, java/lang/Thread:0x000000008038C518, state:R, prio=5
3XMJAVALTHREAD            (java/lang/Thread getId:0x15, isDaemon:false)
3XMTHREADINFO1            (native thread ID:0xBDCBB, native priority:0x5, native policy:UNKNOWN, vmstate:R, vm thread flags:0x00000020)
3XMTHREADINFO2            (native stack address range from:0x000070000A2D9000, to:0x000070000A319000, size:0x40000)
3XMCPUTIME               CPU usage total: 4.462355000 secs, current category="Application"
3XMHEAPALLOC             Heap bytes allocated since last GC cycle=944472 (0xE6958)
3XMTHREADINFO3           Java callstack:
4XESTACKTRACE                at org/newsclub/net/unix/NativeUnixSocket.setCreated(Native Method)
4XESTACKTRACE                at org/newsclub/net/unix/AFUNIXSocket.<init>(AFUNIXSocket.java:36)
4XESTACKTRACE                at org/newsclub/net/unix/AFUNIXSocket.newInstance(AFUNIXSocket.java:54)
4XESTACKTRACE                at com/jagrosh/discordipc/entities/pipe/UnixPipe.<init>(UnixPipe.java:45)
4XESTACKTRACE                at com/jagrosh/discordipc/entities/pipe/Pipe.createPipe(Pipe.java:164)
4XESTACKTRACE                at com/jagrosh/discordipc/entities/pipe/Pipe.openPipe(Pipe.java:68)
4XESTACKTRACE                at com/jagrosh/discordipc/IPCClient.connect(IPCClient.java:119)
4XESTACKTRACE                at net/jumpai/client/desktop/LwjglJumpai.create(LwjglJumpai.java:82)
4XESTACKTRACE                at com/badlogic/gdx/backends/lwjgl/LwjglApplication.mainLoop(LwjglApplication.java:151)
4XESTACKTRACE                at com/badlogic/gdx/backends/lwjgl/LwjglApplication$1.run(LwjglApplication.java:128)
3XMTHREADINFO3           No native callstack available for this thread

The worst thing about this is I can't even catch the exception and disable discord integration if it fails. This crashes the whole JVM, my current workaround is to disable DiscordIPC entirely on all Mac OS as precaution.

TheKodeToad commented 1 year ago

Oops, this can probably be closed now (i'd suggest testing though)

KyllianGamer commented 8 months ago

Was this fixed?