You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JVM Version, Operating System and Relevant Context
1.8, reproductible on a pure JVM project, and on a Android application consuming this JVM project.
Feedback
Stacktrace:
Exception in thread "Thread-3 @ktor-android-context#4" java.lang.IllegalStateException: Operation is already in progress
at kotlinx.coroutines.io.ByteBufferChannel.suspensionForSize(ByteBufferChannel.kt:2984)
at kotlinx.coroutines.io.ByteBufferChannel.access$suspensionForSize(ByteBufferChannel.kt:21)
at kotlinx.coroutines.io.ByteBufferChannel.readSuspendImpl(ByteBufferChannel.kt:2309)
at kotlinx.coroutines.io.ByteBufferChannel.readSuspend(ByteBufferChannel.kt:2249)
at kotlinx.coroutines.io.ByteBufferChannel.discardSuspend(ByteBufferChannel.kt:1723)
at kotlinx.coroutines.io.ByteBufferChannel.discard(ByteBufferChannel.kt:1707)
at kotlinx.coroutines.io.ByteReadChannelKt.discard(ByteReadChannel.kt:203)
at io.ktor.client.response.HttpResponse$close$1.invokeSuspend(HttpResponse.kt:71)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:238)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
From what I understand, it seems like if the timeout cancellation happens during the json deserialisation phase of the request, we get the Operation is already in progress exception. Because of that, it is not easy to reproduce: You might have to tweak the timeout value of 500, or run the test multiple times, for the exception to appear.
Is there a workaround in the meantime ?
The text was updated successfully, but these errors were encountered:
Ktor Version
1.2.2
Ktor Engine Used(client or server and name)
Client Android
JVM Version, Operating System and Relevant Context
1.8, reproductible on a pure JVM project, and on a Android application consuming this JVM project.
Feedback
Stacktrace:
How to reproduce:
From what I understand, it seems like if the timeout cancellation happens during the json deserialisation phase of the request, we get the
Operation is already in progress
exception. Because of that, it is not easy to reproduce: You might have to tweak the timeout value of500
, or run the test multiple times, for the exception to appear.Is there a workaround in the meantime ?
The text was updated successfully, but these errors were encountered: