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

[Bug] IntelliJ Discord Integration V2 fails to connect most of the times #10

Open
maicol07 opened this issue Dec 21, 2024 · 3 comments
Open
Labels
bug Something isn't working

Comments

@maicol07
Copy link

Discord Integration V2 fails to connect most of the times to rsRPC because it detects rsRPC running as admin (but it isn't elevated). Is this an issue with rsRPC or the integration? (arRPC works fine)
It seems that closing rsRPC and reopening it let the IDE connect. However, restarting the IDE throws the same error

When it tries to connect rsRPC logs these lines:

[2024-12-21 22:12:29] [IPC] Incoming stream...
[2024-12-21 22:12:29] [IPC] Error reading packet type: failed to fill whole buffer, socket likely closed
[2024-12-21 22:12:29] [IPC] Sending empty activity
@SpikeHD SpikeHD changed the title IntelliJ Discord Integration V2 fails to connect most of the times [Bug] IntelliJ Discord Integration V2 fails to connect most of the times Dec 21, 2024
@SpikeHD SpikeHD added the bug Something isn't working label Dec 21, 2024
@SpikeHD
Copy link
Owner

SpikeHD commented Dec 21, 2024

I would imagine this is an issue with rsRPC if arRPC works. How do you know it thinks that rsRPC is running as admin? Is there any specific error messages you can provide from the IntelliJ side?

@maicol07
Copy link
Author

maicol07 commented Dec 21, 2024

I get the following error message:
 

image

In PHPStorm logs I've found the following entry:

2024-12-21 23:43:16,395 [ 307011]   WARN - Discord - Error connecting to ipc
dev.cbyrne.kdiscordipc.core.error.ConnectionError$Failed: Failed to connect to socket.
    at dev.cbyrne.kdiscordipc.core.error.ConnectionError$Failed.<clinit>(ConnectionError.kt)
    at dev.cbyrne.kdiscordipc.core.socket.handler.SocketHandler.connect(SocketHandler.kt:92)
    at dev.cbyrne.kdiscordipc.KDiscordIPC.connect(KDiscordIPC.kt:87)
    at dev.cbyrne.kdiscordipc.KDiscordIPC.connect$default(KDiscordIPC.kt:80)
    at dev.azn9.plugins.discord.rpc.connection.DiscordIpcConnection$connect$2$1.invokeSuspend(DiscordIpcConnection.kt:65)
    at dev.azn9.plugins.discord.rpc.connection.DiscordIpcConnection$connect$2$1.invoke(DiscordIpcConnection.kt)
    at dev.azn9.plugins.discord.rpc.connection.DiscordIpcConnection$connect$2$1.invoke(DiscordIpcConnection.kt)
    at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturnIgnoreTimeout(Undispatched.kt:74)
    at kotlinx.coroutines.TimeoutKt.setupTimeout(Timeout.kt:148)
    at kotlinx.coroutines.TimeoutKt.withTimeoutOrNull(Timeout.kt:104)
    at dev.azn9.plugins.discord.rpc.connection.DiscordIpcConnection$connect$2.invokeSuspend(DiscordIpcConnection.kt:64)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:608)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:873)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:763)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:750)

With arrpc I only get this line:

2024-12-21 23:47:52,963 [  13128]   INFO - Discord - IPC connected

@SpikeHD
Copy link
Owner

SpikeHD commented Dec 21, 2024

Ah I think I've found it (top is rsRPC, bottom is arRPC:
image

Don't know why the permissions are different, nor why JetBrains would struggle to access a socket created under the same user who opened the program (unless it does some weird file perm stuff), but I guess I need to provide it specific permissions 😪

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants