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
586 stars 64 forks source link

Caught error when decoding packet (op: 2, length: 37) #370

Open SlimyFrog123 opened 10 months ago

SlimyFrog123 commented 10 months ago

I am getting this error: Caught error when decoding packet (op: 2, length: 37)

java.lang.IllegalStateException: Unknown packet command: null | Event: null at dev.cbyrne.kdiscordipc.core.packet.serialization.InboundPacketSerializer.selectDeserializer(InboundPacketSerializer.kt:27) at kotlinx.serialization.json.JsonContentPolymorphicSerializer.deserialize(JsonContentPolymorphicSerializer.kt:92) at kotlinx.serialization.json.internal.PolymorphicKt.decodeSerializableValuePolymorphic(Polymorphic.kt:59) at kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:36) at kotlinx.serialization.json.Json.decodeFromString(Json.kt:100) at dev.cbyrne.kdiscordipc.core.packet.pipeline.ByteToMessageDecoder.decode(ByteToMessageDecoder.kt:23) at dev.cbyrne.kdiscordipc.core.socket.handler.SocketHandler$events$1.invokeSuspend(SocketHandler.kt:36) 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$Worker.run(LimitedDispatcher.kt:115) at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:100) 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)

I do have two Discord accounts that I am signed into... Could that be the problem? If so, shouldn't it just update the status for whichever is the current?

caoimhebyrne commented 8 months ago

This issue doesn't occur with more than one account, only when Discord launches at the same time that the integration tries to connect, causing it to forcefully disconnect the plugin.

caoimhebyrne commented 8 months ago

The exception will be fixed in a newer release of KDiscordIPC, it's up to @Almighty-Alpaca to update it.