hey, I'm getting this weird logging error when a c...
# ktor
v
hey, I'm getting this weird logging error when a client request fails (I think there is an exception being thrown):
Copy code
java.lang.IllegalStateException: No instance for key AttributeKey: CallLogger
	at io.ktor.util.Attributes$DefaultImpls.get(Attributes.kt:77)
	at io.ktor.util.AttributesJvmBase.get(AttributesJvm.kt:17)
	at io.ktor.client.plugins.logging.LoggingKt$Logging$2$4.invokeSuspend(Logging.kt:622)
	at io.ktor.client.plugins.logging.LoggingKt$Logging$2$4.invoke(Unknown Source:15)
	at io.ktor.client.plugins.logging.LoggingKt$Logging$2$4.invoke(Unknown Source:6)
	at io.ktor.client.plugins.logging.ReceiveHook$install$1.invokeSuspend(Logging.kt:759)
	at io.ktor.client.plugins.logging.ReceiveHook$install$1.invoke(Unknown Source:11)
	at io.ktor.client.plugins.logging.ReceiveHook$install$1.invoke(Unknown Source:6)
	at io.ktor.util.pipeline.DebugPipelineContext.proceedLoop(DebugPipelineContext.kt:79)
	at io.ktor.util.pipeline.DebugPipelineContext.proceed(DebugPipelineContext.kt:57)
	at io.ktor.client.plugins.ReceiveError$install$1.invokeSuspend(HttpCallValidator.kt:165)
	at io.ktor.client.plugins.ReceiveError$install$1.invoke(Unknown Source:11)
	at io.ktor.client.plugins.ReceiveError$install$1.invoke(Unknown Source:6)
	at io.ktor.util.pipeline.DebugPipelineContext.proceedLoop(DebugPipelineContext.kt:79)
	at io.ktor.util.pipeline.DebugPipelineContext.proceed(DebugPipelineContext.kt:57)
	at io.ktor.util.pipeline.DebugPipelineContext.execute$ktor_utils(DebugPipelineContext.kt:63)
	at io.ktor.util.pipeline.Pipeline.execute(Pipeline.kt:92)
	at io.ktor.client.call.HttpClientCall.bodyNullable(HttpClientCall.kt:99)
I'm using 3.1.2, and I'm not doing anything more than calling GET on an API that returns JSON. Whats going on? I can't find anything on this online
If I remove the Logging plugin, I do get the actual exception
a
Can you please share a code snippet to reproduce the problem? Can the error be reproduced with the
LoggingFormat.OkHttp
?
v
It does not happen when I use OkHttp logging format. Also I'm using Logger.ANDROID