CLOVIS
04/11/2020, 2:29 PMJamy
04/14/2020, 12:16 PMgotoOla
04/14/2020, 12:27 PMSam Garfinkel
04/15/2020, 3:52 PMio.ktor.client.features.json.JsonSerializer.read(..)
return the nullable Any?
and why can’t the write
function accept Any?
? Is this just how they were designed, or is there an actual implementation constraint?Marek
04/16/2020, 6:38 PMchristophsturm
04/17/2020, 7:49 AMMaurice Wingbermuhle
04/17/2020, 8:42 AMI\KtorHttpClient: REQUEST OBFUSCATED_URL failed with exception: kotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen kotlinx.coroutines.InvokeOnCompletion@847c8
I\KtorHttpClient: REQUEST OBFUSCATED_URL failed with exception: kotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen io.ktor.util.pipeline.SuspendFunctionGun@596c8
kotlinx.coroutines.CoroutinesInternalError: Fatal exception in coroutines machinery for DispatchedContinuation[DispatchQueue@1517388, Continuation @ $runAsync$lambda-1COROUTINE$200]. Please read KDoc to 'handleFatalException' method and report this incident to maintainers
at 0 myLib 0x00000001060ceb13 kfun:kotlin.Error.<init>(kotlin.String?;kotlin.Throwable?)kotlin.Error + 115 (/Users/teamcity1/teamcity_work/4d622a065c544371/runtime/src/main/kotlin/kotlin/Exceptions.kt:14:63)
at 1 myLib 0x0000000106629ad3 kfun:kotlinx.coroutines.CoroutinesInternalError.<init>(kotlin.String;kotlin.Throwable)kotlinx.coroutines.CoroutinesInternalError + 115 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/Exceptions.common.kt:28:77)
at 2 myLib 0x00000001067676ca kfun:kotlinx.coroutines.DispatchedTask.handleFatalException$kotlinx-coroutines-core(kotlin.Throwable?;kotlin.Throwable?) + 938 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/internal/DispatchedTask.kt:93:22)
at 3 myLib 0x00000001067672b4 kfun:kotlinx.coroutines.DispatchedTask.run() + 3156 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/internal/DispatchedTask.kt:64:13)
at 4 myLib 0x0000000105d93f35 kfun:ob.fus.client.utils.DispatchQueue.dispatch$lambda-0#internal + 85 (/Path-at-my-machine/myLib/src/iosMain/kotlin/ob/fus/client/utils/Dispatchers.kt:24:19)
at 5 myLib 0x0000000105d9401b kfun:io.hsdp.client.utils.DispatchQueue.$dispatch$lambda-0$FUNCTION_REFERENCE$492.invoke#internal + 59 (/Path-at-my-machine/myLib/src/iosMain/kotlin/ob/fus/client/utils/Dispatchers.kt:23:39)
at 6 myLib 0x0000000105d9407b kfun:io.hsdp.client.utils.DispatchQueue.$dispatch$lambda-0$FUNCTION_REFERENCE$492.$<bridge-UNN>invoke()#internal + 59 (/Path-at-my-machine/myLib/src/iosMain/kotlin/ob/fus/client/utils/Dispatchers.kt:23:39)
at 7 myLib 0x0000000105d94164 _687364702d636c69656e74_knbridge14 + 180 (/Path-at-my-machine/myLib/src/iosMain/kotlin/ob/fus/client/utils/Dispatchers.kt:23:39)
at 8 libdispatch.dylib 0x00000001042dfdd4 _dispatch_call_block_and_release + 12
at 9 libdispatch.dylib 0x00000001042e0d48 _dispatch_client_callout + 8
at 10 libdispatch.dylib 0x00000001042eede6 _dispatch_main_queue_callback_4CF + 1500
at 11 CoreFoundation 0x00007fff23bd4049 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
at 12 CoreFoundation 0x00007fff23bceca9 __CFRunLoopRun + 2329
at 13 CoreFoundation 0x00007fff23bce066 CFRunLoopRunSpecific + 438
at 14 GraphicsServices 0x00007fff384c0bb0 GSEventRunModal + 65
at 15 UIKitCore 0x00007fff48092d4d UIApplicationMain + 1621
at 16 HSDP Client 0x0000000103327f5b main + 75 (Path-at-my-machine/myContainingApp/AppDelegate.swift:7:7)
at 17 libdyld.dylib 0x00007fff5227ec25 start + 1
Caused by: kotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen io.hsdp.client.utils.$runAsync$lambda-1COROUTINE$200@36f9c78
at 0 myLib 0x00000001060dbec7 kfun:kotlin.Throwable.<init>(kotlin.String?)kotlin.Throwable + 87 (/Users/teamcity1/teamcity_work/4d622a065c544371/runtime/src/main/kotlin/kotlin/Throwable.kt:22:37)
at 1 myLib 0x00000001060cec95 kfun:kotlin.Exception.<init>(kotlin.String?)kotlin.Exception + 85 (/Users/teamcity1/teamcity_work/4d622a065c544371/runtime/src/main/kotlin/kotlin/Exceptions.kt:23:44)
at 2 myLib 0x00000001060ceeb5 kfun:kotlin.RuntimeException.<init>(kotlin.String?)kotlin.RuntimeException + 85 (/Users/teamcity1/teamcity_work/4d622a065c544371/runtime/src/main/kotlin/kotlin/Exceptions.kt:34:44)
at 3 myLib 0x0000000106123a45 kfun:kotlin.native.concurrent.InvalidMutabilityException.<init>(kotlin.String)kotlin.native.concurrent.InvalidMutabilityException + 85 (/Users/teamcity1/teamcity_work/4d622a065c544371/runtime/src/main/kotlin/kotlin/native/concurrent/Freezing.kt:22:60)
at 4 myLib 0x0000000106126bc8 ThrowInvalidMutabilityException + 680 (/Users/teamcity1/teamcity_work/4d622a065c544371/runtime/src/main/kotlin/kotlin/native/concurrent/Internal.kt:90:11)
at 5 myLib 0x0000000106518ea8 MutationCheck + 104
at 6 myLib 0x00000001061093f0 kfun:kotlin.coroutines.native.internal.ContinuationImpl.<set-intercepted>#internal + 96 (/Users/teamcity1/teamcity_work/4d622a065c544371/runtime/src/main/kotlin/kotlin/coroutines/ContinuationImpl.kt:98:13)
at 7 myLib 0x00000001061099fc kfun:kotlin.coroutines.native.internal.ContinuationImpl.releaseIntercepted() + 428 (/Users/teamcity1/teamcity_work/4d622a065c544371/runtime/src/main/kotlin/kotlin/coroutines/ContinuationImpl.kt:110:9)
at 8 myLib 0x0000000106108415 kfun:kotlin.coroutines.native.internal.BaseContinuationImpl.resumeWith(kotlin.Result<kotlin.Any?>) + 1253 (/Users/teamcity1/teamcity_work/4d622a065c544371/runtime/src/main/kotlin/kotlin/coroutines/ContinuationImpl.kt:36:17)
at 9 myLib 0x0000000106767073 kfun:kotlinx.coroutines.DispatchedTask.run() + 2579 (/Users/teamcity1/teamcity_work/4d622a065c544371/backend.native/build/stdlib/kotlin/coroutines/Continuation.kt:44:5)
at 10 myLib 0x0000000105d93f35 kfun:io.hsdp.client.utils.DispatchQueue.dispatch$lambda-0#internal + 85 (/Path-at-my-machine/myLib/src/iosMain/kotlin/ob/fus/client/utils/Dispatchers.kt:24:19)
at 11 myLib 0x0000000105d9401b kfun:io.hsdp.client.utils.DispatchQueue.$dispatch$lambda-0$FUNCTION_REFERENCE$492.invoke#internal + 59 (/Path-at-my-machine/myLib/src/iosMain/kotlin/ob/fus/client/utils/Dispatchers.kt:23:39)
at 12 myLib 0x0000000105d9407b kfun:io.hsdp.client.utils.DispatchQueue.$dispatch$lambda-0$FUNCTION_REFERENCE$492.$<bridge-UNN>invoke()#internal + 59 (/Path-at-my-machine/myLib/src/iosMain/kotlin/ob/fus/client/utils/Dispatchers.kt:23:39)
at 13 myLib 0x0000000105d94164 _687364702d636c69656e74_knbridge14 + 180 (/Path-at-my-machine/myLib/src/iosMain/kotlin/ob/fus/client/utils/Dispatchers.kt:23:39)
at 14 libdispatch.dylib 0x00000001042dfdd4 _dispatch_call_block_and_release + 12
at 15 libdispatch.dylib 0x00000001042e0d48 _dispatch_client_callout + 8
at 16 libdispatch.dylib 0x00000001042eede6 _dispatch_main_queue_callback_4CF + 1500
at 17 CoreFoundation 0x00007fff23bd4049 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
at 18 CoreFoundation 0x00007fff23bceca9 __CFRunLoopRun + 2329
at 19 CoreFoundation 0x00007fff23bce066 CFRunLoopRunSpecific + 438
at 20 GraphicsServices 0x00007fff384c0bb0 GSEventRunModal + 65
at 21 UIKitCore 0x00007fff48092d4d UIApplicationMain + 1621
at 22 My Lib 0x0000000103327f5b main + 75 (Path-at-my-machine/myContainingApp/AppDelegate.swift:7:7)
at 23 libdyld.dylib 0x00007fff5227ec25 start + 1
christophsturm
04/17/2020, 9:33 AMimplementation("com.github.ktorio:ktor:master-SNAPSHOT")
i get unresolved symbols for example for jetty serveredenman
04/18/2020, 1:57 AMEOFException
from okhttp when using ktor websockets? receiving messages works great but I get this EOF anytime I try to send a message on the socket: https://github.com/ktorio/ktor/issues/1803Stan Kocken
04/18/2020, 8:46 AMwaltermcq
04/19/2020, 1:34 AMvishesh
04/19/2020, 7:09 PMchristophsturm
04/20/2020, 4:35 PM<http://client.post|client.post><String>("....") {
body = TextContent(stringBody, ContentType.Application.FormUrlEncoded)
}
does it set a content type header? if I test the code with the MockEngine it has no content type header set.Sam Garfinkel
04/21/2020, 7:56 PMaddamsson
04/22/2020, 11:54 AMAntanas A.
04/23/2020, 7:26 AMaddamsson
04/24/2020, 11:19 AMBearer
authentication with #ktor ? I see that there is basic, jtw, etc, but there is no option for simply checking the bearer token.Rachid
04/24/2020, 12:18 PMprintln
statements which I want to convert to INFO, DEBUG, etc
When searching the internet I didn't find any good examples of how this could work in ktor. Only a minimal example of how to add logback for enabling logging in the frameworks used by ktor itself (like Netty).
So know my question. Do you have any suggestions? And pointers/links to examples would be very helpful.Orhan Tozan
04/24/2020, 12:20 PMponzii
04/24/2020, 2:21 PMDariusz Kuc
04/24/2020, 3:48 PMHttpClient
and I am unsure whats causing it, given some result object when I run the following
lateinit var result: GraphQLResult<ExampleQuery.ExampleQueryResult>
runBlocking {
val graphQLRequest = mapOf(
"query" to EXAMPLE_QUERY,
"operationName" to "ExampleQuery",
"variables" to variables
)
result = <http://ktorClient.post|ktorClient.post>("<http://localhost:8080/graphql>") {
accept(ContentType.Application.Json)
contentType(ContentType.Application.Json)
body = graphQLRequest
}
// works fine
println("ktor: ${result.data}")
val myClient = MyClient(ktorClient, "<http://localhost:8080/graphql>")
result = myClient.executeOperation(EXAMPLE_QUERY, "ExampleQuery", variables)
// blows up saying cannot cast linked hash map to my result object
println("myClient: ${result.data}")
}
class MyClient(val client: HttpClient, val url: String) {
suspend fun <T> executeOperation(query: String, operationName: String? = null, variables: Any? = null): GraphQLResult<T> {
val graphQLRequest = mapOf(
"query" to query,
"operationName" to operationName,
"variables" to variables
)
return <http://client.post|client.post>(url) {
accept(ContentType.Application.Json)
contentType(ContentType.Application.Json)
body = graphQLRequest
}
}
}
any ideas why it would behave differently?Anders Sveen
04/24/2020, 6:02 PMJitesh
04/26/2020, 2:38 PMkotlinx/coroutines/io/ByteReadChannel
Any Idea what mistake am I doing?.
HTTP/1.1 500 Internal Server Error
Date: Sun, 26 Apr 2020 14:30:36 GMT
Content-Length: 37
Connection: keep-alive
Content-Type: text/plain; charset=UTF-8
Server: ktor-server-core/1.3.2 ktor-server-core/1.3.2
coder82
04/27/2020, 1:52 PMrrva
04/28/2020, 5:47 AMAnders Sveen
04/28/2020, 8:20 AMreturn@intercept finish()
but it still continues processing.... Any idea?addamsson
04/28/2020, 9:50 AMRedirectResponseException: Unhandled redirect: <http://127.0.0.1:9000/login>. Status: 302 Found
This is nice because there is supposed to be a redirect but I can't figure out how to fix this. I'd like to check that the user was redirected to /
after login.crummy
04/28/2020, 11:28 PMImran
04/29/2020, 11:42 AM/static/xyz.json
but I want access it like /static/xyz
. can anyone know how to do it?dylan
04/29/2020, 3:06 PMHttpClient
with kotlinx.serializtion where every api endpoint has a custom vendor specific content-type? if I use the accept()
function with multiple content-types they are also added to the accept header on the request which I don't want because we already specifiy that where I make the actual request.
So api call A
needs to send Accept: application/vnd.a
and in return will get the Content-Type: application/vnd.a
back in the response header and B
sends application/vnd.b
and is going to get application/vnd.b
back.
but I get NoTransformationFoundException: ByteBufferChannel => Serializable data class.dylan
04/29/2020, 3:06 PMHttpClient
with kotlinx.serializtion where every api endpoint has a custom vendor specific content-type? if I use the accept()
function with multiple content-types they are also added to the accept header on the request which I don't want because we already specifiy that where I make the actual request.
So api call A
needs to send Accept: application/vnd.a
and in return will get the Content-Type: application/vnd.a
back in the response header and B
sends application/vnd.b
and is going to get application/vnd.b
back.
but I get NoTransformationFoundException: ByteBufferChannel => Serializable data class.Ayman Izzeldin
04/29/2020, 6:40 PMval apiAClient = myHttpClient.config {
Json { acceptContentTypes = acceptContentTypes + ContentType.parse("application/vnd.a") }
}
dylan
04/29/2020, 9:13 PM