Almighty-Alpaca / JetBrains-Discord-Integration

Discord rich presence integration for all JetBrains IDEs
https://plugins.jetbrains.com/plugin/10233-discord-integration
Apache License 2.0
585 stars 63 forks source link

IO errors on 1.11.0 #274

Open freya022 opened 1 year ago

freya022 commented 1 year ago

The plugin was working fine yesterday, I have not updated IntelliJ nor the plugin in between. Here are the IJ logs

Error 1:

2022-12-20 16:16:53,664 [ 223316] SEVERE - #c.i.o.a.i.CoroutineExceptionHandlerImpl - Unhandled exception in [StandaloneCoroutine{Cancelling}@41db06b4, Dispatchers.IO]
java.io.IOException: The communication channel is about to be closed
    at java.base/java.io.RandomAccessFile.writeBytes(Native Method)
    at java.base/java.io.RandomAccessFile.write(RandomAccessFile.java:545)
    at dev.cbyrne.kdiscordipc.core.socket.impl.WindowsSocket.write(WindowsSocket.kt:48)
    at dev.cbyrne.kdiscordipc.core.socket.handler.SocketHandler$1.invokeSuspend(SocketHandler.kt:42)
    at dev.cbyrne.kdiscordipc.core.socket.handler.SocketHandler$1.invoke(SocketHandler.kt)
    at dev.cbyrne.kdiscordipc.core.socket.handler.SocketHandler$1.invoke(SocketHandler.kt)
    at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1$2.emit(Emitters.kt:223)
    at kotlinx.coroutines.flow.SharedFlowImpl.collect$suspendImpl(SharedFlow.kt:383)
    at kotlinx.coroutines.flow.SharedFlowImpl$collect$1.invokeSuspend(SharedFlow.kt)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
    at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

Error 2:

2022-12-20 16:25:03,972 [ 713624] SEVERE - #c.i.o.a.i.CoroutineExceptionHandlerImpl - Unhandled exception in [StandaloneCoroutine{Cancelling}@439d78e7, Dispatchers.Default]
java.io.IOException: Stream Closed
    at java.base/java.io.RandomAccessFile.read0(Native Method)
    at java.base/java.io.RandomAccessFile.read(RandomAccessFile.java:365)
    at java.base/java.io.RandomAccessFile.readInt(RandomAccessFile.java:837)
    at dev.cbyrne.kdiscordipc.core.socket.impl.WindowsSocket.read(WindowsSocket.kt:38)
    at dev.cbyrne.kdiscordipc.core.socket.handler.SocketHandler$events$1.invokeSuspend(SocketHandler.kt:35)
    at dev.cbyrne.kdiscordipc.core.socket.handler.SocketHandler$events$1.invoke(SocketHandler.kt)
    at dev.cbyrne.kdiscordipc.core.socket.handler.SocketHandler$events$1.invoke(SocketHandler.kt)
    at kotlinx.coroutines.flow.SafeFlow.collectSafely(Builders.kt:61)
    at kotlinx.coroutines.flow.AbstractFlow.collect(Flow.kt:230)
    at kotlinx.coroutines.flow.internal.ChannelFlowOperatorImpl.flowCollect(ChannelFlow.kt:195)
    at kotlinx.coroutines.flow.internal.ChannelFlowOperator.collectTo$suspendImpl(ChannelFlow.kt:157)
    at kotlinx.coroutines.flow.internal.ChannelFlowOperator.collectTo(ChannelFlow.kt)
    at kotlinx.coroutines.flow.internal.ChannelFlow$collectToFun$1.invokeSuspend(ChannelFlow.kt:60)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
    at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
2022-12-20 16:25:03,972 [ 713624] SEVERE - #c.i.o.a.i.CoroutineExceptionHandlerImpl - IntelliJ IDEA 2022.3  Build #IU-223.7571.182
2022-12-20 16:25:03,972 [ 713624] SEVERE - #c.i.o.a.i.CoroutineExceptionHandlerImpl - JDK: 17.0.5; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
2022-12-20 16:25:03,972 [ 713624] SEVERE - #c.i.o.a.i.CoroutineExceptionHandlerImpl - OS: Windows 11
2022-12-20 16:25:03,973 [ 713625] SEVERE - #c.i.o.a.i.CoroutineExceptionHandlerImpl - Plugin to blame: Discord Integration version: 1.11.0

Error 3 (occurred a few hours in, while the plugin is working):

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:202)
    at com.almightyalpaca.jetbrains.plugins.discord.plugin.rpc.connection.DiscordIpcConnection.onError(DiscordIpcConnection.kt:133)
    at com.almightyalpaca.jetbrains.plugins.discord.plugin.rpc.connection.DiscordIpcConnection.access$onError(DiscordIpcConnection.kt:39)
    at com.almightyalpaca.jetbrains.plugins.discord.plugin.rpc.connection.DiscordIpcConnection$ipcClient$1$1.invokeSuspend$onError(DiscordIpcConnection.kt:47)
    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:47)
    at com.almightyalpaca.jetbrains.plugins.discord.plugin.rpc.connection.DiscordIpcConnection$ipcClient$1$1$2.invoke(DiscordIpcConnection.kt:47)
    at com.almightyalpaca.jetbrains.plugins.discord.plugin.rpc.connection.DiscordIpcConnection$ipcClient$1$1$invokeSuspend$$inlined$onEvent$4$1.invokeSuspend(KDiscordIPC.kt:103)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
    at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
freya022 commented 1 year ago

Closing and reopening Discord as well as IJ seems to solve the issue

CatusKing commented 1 year ago

I have the stream clossed error. Please fix when you get the chance

CatusKing commented 1 year ago

Bump!

CatusKing commented 1 year ago

For me i just needed to turn this on image

dnbln commented 1 year ago

The 2nd error looks like #257, but I believe a fix for that would also fix the first.