io.ktor.client.call.ReceivePipelineException with CIO on JVM
See original GitHub issueKtor Version
1.1.2
Ktor Engine Used
CIO
JVM Version, Operating System and Relevant Context
JVM Version
: 1.8
Operating System
: Debian 64bit
Feedback
I have an issue with the ktor-client
. It breakes while simply requesting a random website. Other websites are working fine. My code looks like this:
fun main() {
runBlocking {
val client = HttpClient(CIO)
val response = client.get<String> {
url {
protocol = URLProtocol.HTTPS
host = "playlisten.rbb-online.de"
encodedPath = "/radioberlin/main/index.php"
}
}
println("'$response'")
client.close()
}
}
I get the stack:
Exception in thread "main" io.ktor.client.call.ReceivePipelineException: Fail to run receive pipeline
at io.ktor.client.call.HttpClientCall.receive(HttpClientCall.kt:61)
at io.ktor.client.call.HttpClientCall$receive$1.invokeSuspend(HttpClientCall.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:32)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(PipelineContext.kt:211)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(PipelineContext.kt:186)
at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(PipelineContext.kt:63)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(PipelineContext.kt:137)
at io.ktor.util.pipeline.SuspendFunctionGun.execute(PipelineContext.kt:157)
at io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:23)
at io.ktor.client.call.HttpClientCall.receive(HttpClientCall.kt:55)
at com.molikuner.spotify.MainKt$main$1.invokeSuspend(Main.kt:110)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:32)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(PipelineContext.kt:211)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(PipelineContext.kt:168)
at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(PipelineContext.kt:63)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(PipelineContext.kt:118)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:45)
at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith(PipelineContext.kt:211)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(PipelineContext.kt:168)
at io.ktor.util.pipeline.SuspendFunctionGun.access$loop(PipelineContext.kt:63)
at io.ktor.util.pipeline.SuspendFunctionGun$continuation$1.resumeWith(PipelineContext.kt:118)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:45)
at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:233)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.kt:116)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:76)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:53)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:35)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
at com.molikuner.spotify.MainKt.main(Main.kt:19)
Caused by: kotlinx.io.charsets.MalformedInputException: Input length = 1
at kotlinx.io.charsets.CharsetJVMKt.throwExceptionWrapped(CharsetJVM.kt:287)
at kotlinx.io.charsets.CharsetJVMKt.decode(CharsetJVM.kt:166)
at kotlinx.io.charsets.EncodingKt.decode(Encoding.kt:104)
at kotlinx.io.core.StringsKt.readText(Strings.kt:339)
at kotlinx.io.core.StringsKt.readText$default(Strings.kt:338)
at io.ktor.client.response.HttpResponseKt.readText(HttpResponse.kt:77)
at io.ktor.client.features.HttpPlainText.read$ktor_client_core(HttpPlainText.kt:23)
at io.ktor.client.features.HttpPlainText$Feature$install$2.invokeSuspend(HttpPlainText.kt:48)
at io.ktor.client.features.HttpPlainText$Feature$install$2.invoke(HttpPlainText.kt)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(PipelineContext.kt:278)
... 25 more
Issue Analytics
- State:
- Created 5 years ago
- Comments:15 (6 by maintainers)
Top Results From Across the Web
ReceivePipelineException - ktor
ReceivePipelineException. class ReceivePipelineException( val request: HttpClientCall, val info: TypeInfo, val cause: Throwable) : IllegalStateException.
Read more >Ktor Client CIO engine Jvm ignores Ciphersuites with key ...
The list contains TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 here : · but it is ignored by isSupported method here : · which makes these cipher suites unavailable...
Read more >Ktor - I generated a new project to try a bit but cannot import ...
When I put import io.ktor.client.engine.cio. ... implementation "io.ktor:ktor-client-core-jvm:$ktor_version" implementation ...
Read more >客户端 Engines - Ktor
HTTP Client Engines · Default engine · Configuring engines · JVM. Apache; CIO; Jetty · JVM and Android. OkHttp; Android · iOS ·...
Read more >ktor-client-core-jvm » 1.6.7 - Maven Repository
https://mvnrepository.com/artifact/io.ktor/ktor-client-core-jvm --> <dependency> <groupId>io.ktor</groupId> <artifactId>ktor-client-core-jvm</artifactId> ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @Dallanosm, it should be fixed. Could you recheck it with
1.2.2
?Closed