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

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

Closed
soloturn opened this issue Dec 2, 2023 · 3 comments
Labels
Status: Needs Investigation Requires to be debugged or checked for feasibility, etc. Topic: Stabilization Requests, Issues and Changes related to improving stablity and reducing flakyness Type: Bug Issues reporting and PRs fixing problems

Comments

@soloturn
Copy link
Contributor

soloturn commented Dec 2, 2023

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

@soloturn soloturn added Type: Bug Issues reporting and PRs fixing problems Status: Needs Investigation Requires to be debugged or checked for feasibility, etc. Topic: Stabilization Requests, Issues and Changes related to improving stablity and reducing flakyness labels Dec 2, 2023
@BenjaminAmos
Copy link
Contributor

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.

constraints {
// Upgrades for old transitive dependencies of DiscordIPC that Checkmarx doesn't like
implementation("com.kohlschutter.junixsocket:junixsocket-common:2.4.0")
implementation("com.kohlschutter.junixsocket:junixsocket-native-common:2.4.0")
implementation("org.json:json:20220320")
}

@BenjaminAmos
Copy link
Contributor

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

@soloturn
Copy link
Contributor Author

that works nowadays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Investigation Requires to be debugged or checked for feasibility, etc. Topic: Stabilization Requests, Issues and Changes related to improving stablity and reducing flakyness Type: Bug Issues reporting and PRs fixing problems
Projects
Status: Done
Status: No status
Development

No branches or pull requests

2 participants