Comments (10)
https://github.com/papsign/Ktor-OpenAPI-Generator/wiki/A-few-examples#multipart-request
from ktor-openapi-generator.
Thanks for your reply.
I have already found this but I want to receive a list of images.
Something like this:
@FormDataRequest
data class PatientAddPictures(
@PartEncoding("image/*")
val pictures: List<NamedFileInputStream>
)
But this don’t work.
from ktor-openapi-generator.
You can't have a list of file input streams as a part of type image, right now each part must be named and annotated correctly, you can make them optional though with the nullability. You could make an upload of up to N images each called image1 to imageN in the parameters.
from ktor-openapi-generator.
Now I am using a binary request, but I get this error:
java.lang.IllegalStateException: Acquiring blocking primitives on this dispatcher is not allowed. Consider using async channel or doing withContext(Dispatchers.IO) { call.receive<InputStream>().use { ... } } instead.
I don’t do anything in the route which is using the binary request.
from ktor-openapi-generator.
Please identify where the error originates, i don't have the environment to reproduce at the moment.
from ktor-openapi-generator.
java.lang.IllegalStateException: Acquiring blocking primitives on this dispatcher is not allowed. Consider using async channel or doing withContext(Dispatchers.IO) { call.receive<InputStream>().use { ... } } instead.
at io.ktor.server.engine.DefaultTransformKt.checkSafeParking(DefaultTransform.kt:93)
at io.ktor.server.engine.DefaultTransformKt.receiveGuardedInputStream(DefaultTransform.kt:88)
at io.ktor.server.engine.DefaultTransformKt.access$receiveGuardedInputStream(DefaultTransform.kt:1)
at io.ktor.server.engine.DefaultTransformKt$installDefaultTransformations$2.invokeSuspend(DefaultTransform.kt:50)
at io.ktor.server.engine.DefaultTransformKt$installDefaultTransformations$2.invoke(DefaultTransform.kt)
at io.ktor.server.engine.DefaultTransformKt$installDefaultTransformations$2.invoke(DefaultTransform.kt)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:248)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:116)
at io.ktor.util.pipeline.SuspendFunctionGun.execute(SuspendFunctionGun.kt:136)
at io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:78)
at io.ktor.request.ApplicationReceiveFunctionsKt.receive(ApplicationReceiveFunctions.kt:116)
at com.papsign.ktor.openapigen.content.type.binary.BinaryContentTypeParser.parseBody(BinaryContentTypeParser.kt:118)
at com.papsign.ktor.openapigen.route.OpenAPIRoute$handle$2$2$1$2$1$1.invokeSuspend(OpenAPIRoute.kt:71)
at com.papsign.ktor.openapigen.route.OpenAPIRoute$handle$2$2$1$2$1$1.invoke(OpenAPIRoute.kt)
at com.papsign.ktor.openapigen.route.OpenAPIRoute$handle$2$2$1$2$1$1.invoke(OpenAPIRoute.kt)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:248)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:116)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-6$lambda-5$lambda-4$$inlined$throws$1$1.invokeSuspend(Throws.kt:48)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-6$lambda-5$lambda-4$$inlined$throws$1$1.invoke(Throws.kt)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-6$lambda-5$lambda-4$$inlined$throws$1$1.invoke(Throws.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-6$lambda-5$lambda-4$$inlined$throws$1.invokeSuspend(Throws.kt:47)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-6$lambda-5$lambda-4$$inlined$throws$1.invoke(Throws.kt)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-6$lambda-5$lambda-4$$inlined$throws$1.invoke(Throws.kt)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:248)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:116)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-6$lambda-5$$inlined$throws$1$1.invokeSuspend(Throws.kt:48)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-6$lambda-5$$inlined$throws$1$1.invoke(Throws.kt)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-6$lambda-5$$inlined$throws$1$1.invoke(Throws.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-6$lambda-5$$inlined$throws$1.invokeSuspend(Throws.kt:47)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-6$lambda-5$$inlined$throws$1.invoke(Throws.kt)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-6$lambda-5$$inlined$throws$1.invoke(Throws.kt)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:248)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:116)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-6$$inlined$throws$1$1.invokeSuspend(Throws.kt:48)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-6$$inlined$throws$1$1.invoke(Throws.kt)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-6$$inlined$throws$1$1.invoke(Throws.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-6$$inlined$throws$1.invokeSuspend(Throws.kt:47)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-6$$inlined$throws$1.invoke(Throws.kt)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-6$$inlined$throws$1.invoke(Throws.kt)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:248)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:116)
at de.h_da.fbi.findus.ApplicationKt$module$7$invoke$$inlined$throws$1$1.invokeSuspend(Throws.kt:48)
at de.h_da.fbi.findus.ApplicationKt$module$7$invoke$$inlined$throws$1$1.invoke(Throws.kt)
at de.h_da.fbi.findus.ApplicationKt$module$7$invoke$$inlined$throws$1$1.invoke(Throws.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264)
at de.h_da.fbi.findus.ApplicationKt$module$7$invoke$$inlined$throws$1.invokeSuspend(Throws.kt:47)
at de.h_da.fbi.findus.ApplicationKt$module$7$invoke$$inlined$throws$1.invoke(Throws.kt)
at de.h_da.fbi.findus.ApplicationKt$module$7$invoke$$inlined$throws$1.invoke(Throws.kt)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:248)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:116)
at io.ktor.util.pipeline.SuspendFunctionGun.execute(SuspendFunctionGun.kt:136)
at io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:78)
at io.ktor.routing.Routing.executeResult(Routing.kt:155)
at io.ktor.routing.Routing.interceptor(Routing.kt:39)
at io.ktor.routing.Routing$Feature$install$1.invokeSuspend(Routing.kt:107)
at io.ktor.routing.Routing$Feature$install$1.invoke(Routing.kt)
at io.ktor.routing.Routing$Feature$install$1.invoke(Routing.kt)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:248)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:116)
at io.ktor.features.ContentNegotiation$Feature$install$1.invokeSuspend(ContentNegotiation.kt:145)
at io.ktor.features.ContentNegotiation$Feature$install$1.invoke(ContentNegotiation.kt)
at io.ktor.features.ContentNegotiation$Feature$install$1.invoke(ContentNegotiation.kt)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:248)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:116)
at io.ktor.features.StatusPages$interceptCall$2.invokeSuspend(StatusPages.kt:102)
at io.ktor.features.StatusPages$interceptCall$2.invoke(StatusPages.kt)
at io.ktor.features.StatusPages$interceptCall$2.invoke(StatusPages.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264)
at io.ktor.features.StatusPages.interceptCall(StatusPages.kt:101)
at io.ktor.features.StatusPages.access$interceptCall(StatusPages.kt:18)
at io.ktor.features.StatusPages$Feature$install$2.invokeSuspend(StatusPages.kt:142)
at io.ktor.features.StatusPages$Feature$install$2.invoke(StatusPages.kt)
at io.ktor.features.StatusPages$Feature$install$2.invoke(StatusPages.kt)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:248)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:116)
at io.ktor.util.pipeline.SuspendFunctionGun.execute(SuspendFunctionGun.kt:136)
at io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:78)
at io.ktor.server.engine.DefaultEnginePipelineKt$defaultEnginePipeline$2.invokeSuspend(DefaultEnginePipeline.kt:127)
at io.ktor.server.engine.DefaultEnginePipelineKt$defaultEnginePipeline$2.invoke(DefaultEnginePipeline.kt)
at io.ktor.server.engine.DefaultEnginePipelineKt$defaultEnginePipeline$2.invoke(DefaultEnginePipeline.kt)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:248)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:116)
at io.ktor.util.pipeline.SuspendFunctionGun.execute(SuspendFunctionGun.kt:136)
at io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:78)
at io.ktor.server.netty.NettyApplicationCallHandler$handleRequest$1.invokeSuspend(NettyApplicationCallHandler.kt:123)
at io.ktor.server.netty.NettyApplicationCallHandler$handleRequest$1.invoke(NettyApplicationCallHandler.kt)
at io.ktor.server.netty.NettyApplicationCallHandler$handleRequest$1.invoke(NettyApplicationCallHandler.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startCoroutineUndispatched(Undispatched.kt:55)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.startCoroutineImpl(Builders.common.kt:194)
at kotlinx.coroutines.BuildersKt.startCoroutineImpl(Unknown Source)
at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:134)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:56)
at kotlinx.coroutines.BuildersKt.launch(Unknown Source)
at io.ktor.server.netty.NettyApplicationCallHandler.handleRequest(NettyApplicationCallHandler.kt:43)
at io.ktor.server.netty.NettyApplicationCallHandler.channelRead(NettyApplicationCallHandler.kt:34)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:61)
at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:370)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.ktor.server.netty.EventLoopGroupProxy$Companion.create$lambda-1$lambda-0(NettyApplicationEngine.kt:251)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
from ktor-openapi-generator.
Do you need more information?
from ktor-openapi-generator.
Not necessarily, i just don't have the mans to fix that during the holiday season...
from ktor-openapi-generator.
java.lang.IllegalStateException: Acquiring blocking primitives on this dispatcher is not allowed. Consider using async channel or doing withContext(Dispatchers.IO) { call.receive<InputStream>().use { ... } } instead.
at io.ktor.server.engine.DefaultTransformKt.checkSafeParking(DefaultTransform.kt:93)
at io.ktor.server.engine.DefaultTransformKt.receiveGuardedInputStream(DefaultTransform.kt:88)
at io.ktor.server.engine.DefaultTransformKt.access$receiveGuardedInputStream(DefaultTransform.kt:1)
at io.ktor.server.engine.DefaultTransformKt$installDefaultTransformations$2.invokeSuspend(DefaultTransform.kt:50)
at io.ktor.server.engine.DefaultTransformKt$installDefaultTransformations$2.invoke(DefaultTransform.kt)
at io.ktor.server.engine.DefaultTransformKt$installDefaultTransformations$2.invoke(DefaultTransform.kt)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:248)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:116)
at io.ktor.util.pipeline.SuspendFunctionGun.execute(SuspendFunctionGun.kt:136)
at io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:78)
at io.ktor.request.ApplicationReceiveFunctionsKt.receive(ApplicationReceiveFunctions.kt:116)
at com.papsign.ktor.openapigen.content.type.binary.BinaryContentTypeParser.parseBody(BinaryContentTypeParser.kt:118)
at com.papsign.ktor.openapigen.route.OpenAPIRoute$handle$2$2$1$2$1$1.invokeSuspend(OpenAPIRoute.kt:71)
at com.papsign.ktor.openapigen.route.OpenAPIRoute$handle$2$2$1$2$1$1.invoke(OpenAPIRoute.kt)
at com.papsign.ktor.openapigen.route.OpenAPIRoute$handle$2$2$1$2$1$1.invoke(OpenAPIRoute.kt)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:248)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:116)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-7$lambda-6$lambda-5$$inlined$throws$1$1.invokeSuspend(Throws.kt:48)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-7$lambda-6$lambda-5$$inlined$throws$1$1.invoke(Throws.kt)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-7$lambda-6$lambda-5$$inlined$throws$1$1.invoke(Throws.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-7$lambda-6$lambda-5$$inlined$throws$1.invokeSuspend(Throws.kt:47)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-7$lambda-6$lambda-5$$inlined$throws$1.invoke(Throws.kt)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-7$lambda-6$lambda-5$$inlined$throws$1.invoke(Throws.kt)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:248)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:116)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-7$lambda-6$$inlined$throws$1$1.invokeSuspend(Throws.kt:48)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-7$lambda-6$$inlined$throws$1$1.invoke(Throws.kt)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-7$lambda-6$$inlined$throws$1$1.invoke(Throws.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-7$lambda-6$$inlined$throws$1.invokeSuspend(Throws.kt:47)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-7$lambda-6$$inlined$throws$1.invoke(Throws.kt)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-7$lambda-6$$inlined$throws$1.invoke(Throws.kt)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:248)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:116)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-7$$inlined$throws$1$1.invokeSuspend(Throws.kt:48)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-7$$inlined$throws$1$1.invoke(Throws.kt)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-7$$inlined$throws$1$1.invoke(Throws.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-7$$inlined$throws$1.invokeSuspend(Throws.kt:47)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-7$$inlined$throws$1.invoke(Throws.kt)
at de.h_da.fbi.findus.routes.PatientRouteKt$patientRoute$lambda-7$$inlined$throws$1.invoke(Throws.kt)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:248)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:116)
at de.h_da.fbi.findus.ApplicationKt$module$7$invoke$$inlined$throws$1$1.invokeSuspend(Throws.kt:48)
at de.h_da.fbi.findus.ApplicationKt$module$7$invoke$$inlined$throws$1$1.invoke(Throws.kt)
at de.h_da.fbi.findus.ApplicationKt$module$7$invoke$$inlined$throws$1$1.invoke(Throws.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264)
at de.h_da.fbi.findus.ApplicationKt$module$7$invoke$$inlined$throws$1.invokeSuspend(Throws.kt:47)
at de.h_da.fbi.findus.ApplicationKt$module$7$invoke$$inlined$throws$1.invoke(Throws.kt)
at de.h_da.fbi.findus.ApplicationKt$module$7$invoke$$inlined$throws$1.invoke(Throws.kt)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:248)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:116)
at io.ktor.util.pipeline.SuspendFunctionGun.execute(SuspendFunctionGun.kt:136)
at io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:78)
at io.ktor.routing.Routing.executeResult(Routing.kt:155)
at io.ktor.routing.Routing.interceptor(Routing.kt:39)
at io.ktor.routing.Routing$Feature$install$1.invokeSuspend(Routing.kt:107)
at io.ktor.routing.Routing$Feature$install$1.invoke(Routing.kt)
at io.ktor.routing.Routing$Feature$install$1.invoke(Routing.kt)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:248)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:116)
at io.ktor.features.ContentNegotiation$Feature$install$1.invokeSuspend(ContentNegotiation.kt:145)
at io.ktor.features.ContentNegotiation$Feature$install$1.invoke(ContentNegotiation.kt)
at io.ktor.features.ContentNegotiation$Feature$install$1.invoke(ContentNegotiation.kt)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:248)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:116)
at io.ktor.features.StatusPages$interceptCall$2.invokeSuspend(StatusPages.kt:102)
at io.ktor.features.StatusPages$interceptCall$2.invoke(StatusPages.kt)
at io.ktor.features.StatusPages$interceptCall$2.invoke(StatusPages.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264)
at io.ktor.features.StatusPages.interceptCall(StatusPages.kt:101)
at io.ktor.features.StatusPages.access$interceptCall(StatusPages.kt:18)
at io.ktor.features.StatusPages$Feature$install$2.invokeSuspend(StatusPages.kt:142)
at io.ktor.features.StatusPages$Feature$install$2.invoke(StatusPages.kt)
at io.ktor.features.StatusPages$Feature$install$2.invoke(StatusPages.kt)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:248)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:116)
at io.ktor.util.pipeline.SuspendFunctionGun.execute(SuspendFunctionGun.kt:136)
at io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:78)
at io.ktor.server.engine.DefaultEnginePipelineKt$defaultEnginePipeline$2.invokeSuspend(DefaultEnginePipeline.kt:127)
at io.ktor.server.engine.DefaultEnginePipelineKt$defaultEnginePipeline$2.invoke(DefaultEnginePipeline.kt)
at io.ktor.server.engine.DefaultEnginePipelineKt$defaultEnginePipeline$2.invoke(DefaultEnginePipeline.kt)
at io.ktor.util.pipeline.SuspendFunctionGun.loop(SuspendFunctionGun.kt:248)
at io.ktor.util.pipeline.SuspendFunctionGun.proceed(SuspendFunctionGun.kt:116)
at io.ktor.util.pipeline.SuspendFunctionGun.execute(SuspendFunctionGun.kt:136)
at io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:78)
at io.ktor.server.netty.NettyApplicationCallHandler$handleRequest$1.invokeSuspend(NettyApplicationCallHandler.kt:123)
at io.ktor.server.netty.NettyApplicationCallHandler$handleRequest$1.invoke(NettyApplicationCallHandler.kt)
at io.ktor.server.netty.NettyApplicationCallHandler$handleRequest$1.invoke(NettyApplicationCallHandler.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startCoroutineUndispatched(Undispatched.kt:55)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.startCoroutineImpl(Builders.common.kt:194)
at kotlinx.coroutines.BuildersKt.startCoroutineImpl(Unknown Source)
at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:134)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:56)
at kotlinx.coroutines.BuildersKt.launch(Unknown Source)
at io.ktor.server.netty.NettyApplicationCallHandler.handleRequest(NettyApplicationCallHandler.kt:43)
at io.ktor.server.netty.NettyApplicationCallHandler.channelRead(NettyApplicationCallHandler.kt:34)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:61)
at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:370)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.ktor.server.netty.EventLoopGroupProxy$Companion.create$lambda-1$lambda-0(NettyApplicationEngine.kt:251)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
The error occurs on every file upload expect from fileupload in the tests.
from ktor-openapi-generator.
There have been changes in newer versions of ktor that prevent using streams directly on the ktor thread... There is probably a non blocking alternative that is allowed, but the simplest would be to add an array type that just consumes the stream inside the proper io thread like described by the error
from ktor-openapi-generator.
Related Issues (20)
- Problem with authentication HOT 11
- Reusable enums
- Enum parser is okay with wrong values HOT 3
- Deserialisation of List<UUID> in body fails during runtime HOT 1
- Can't set name of token parameter or cookie name in SecurityScheme
- Add response header to a route
- Default values on @QueryParam HOT 4
- Overriding a primitive converter (UUID) HOT 5
- Serializing collections of different element types is not yet supported HOT 4
- API route with Any must be a data class. HOT 4
- @Description annotation doesn't work HOT 3
- Is there a simple way to split the endpoints of an application in two different openapi-files? HOT 1
- @HeaderParam is adding header to request body instead of request header
- Support for Ktor 2.0.0 HOT 13
- Enum classes are generated for each usage instead of a schema that can be reused
- How to properly indicate a application/x-www-form-urlencoded response HOT 1
- @Hidden annotation for fields in request / response body HOT 2
- Suggestion for conditional validation HOT 1
- Description for response HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ktor-openapi-generator.