Almighty-Alpaca/JetBrains-Discord-Integration

Exception After PC Resumes from Sleep Mode

nicokempe opened this issue · 0 comments

Description

Every time my PC resumes from sleep mode, such as after a short break, I encounter an exception from the Discord Activity Plugin in my JetBrains IDEs. Following this error, my status in Discord no longer updates.

The problem seems to have to do with the Inter-Process Communication connection of the plugin, which is disrupted when the PC goes to sleep and then wakes up again. The error message IPC error: ErrorEventData(code=1000, message=Request has been terminated Possible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.) indicates that the connection to the Discord service is interrupted and cannot be automatically re-established. Maybe Automatic Reconnection could fix this issue?

Error Details

java.lang.Throwable: IPC error: ErrorEventData(code=1000, message=Request has been terminated
Possible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.)
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:376)
	at com.almightyalpaca.jetbrains.plugins.discord.plugin.rpc.connection.DiscordIpcConnection.onError(DiscordIpcConnection.kt:146)
	at com.almightyalpaca.jetbrains.plugins.discord.plugin.rpc.connection.DiscordIpcConnection.access$onError(DiscordIpcConnection.kt:41)
	at com.almightyalpaca.jetbrains.plugins.discord.plugin.rpc.connection.DiscordIpcConnection$ipcClient$1$1.invokeSuspend$onError(DiscordIpcConnection.kt:49)
	at com.almightyalpaca.jetbrains.plugins.discord.plugin.rpc.connection.DiscordIpcConnection$ipcClient$1$1.access$invokeSuspend$onError(DiscordIpcConnection.kt)
	at com.almightyalpaca.jetbrains.plugins.discord.plugin.rpc.connection.DiscordIpcConnection$ipcClient$1$1$2.invoke(DiscordIpcConnection.kt:49)
	at com.almightyalpaca.jetbrains.plugins.discord.plugin.rpc.connection.DiscordIpcConnection$ipcClient$1$1$2.invoke(DiscordIpcConnection.kt:49)
	at com.almightyalpaca.jetbrains.plugins.discord.plugin.rpc.connection.DiscordIpcConnection$ipcClient$1$1$invokeSuspend$$inlined$onEvent$4$1.invokeSuspend(KDiscordIPC.kt:107)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)