Hi folks, I migrated to kotlin 1.5.0 and ktor 1.6....
# ktor
m
Hi folks, I migrated to kotlin 1.5.0 and ktor 1.6.0. I’m using the
native-mt
version of coroutines 1.5.0. I have a very simple test that fails on iOS with a
kotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen kotlin.collections.HashMap@1657db08
and I have no idea where it can come from given the simplicity of this test. If anyone has any lead, it would be very helpful
youtrack 1
Here is the full stacktrace if it helps
FYI The same test pass if my data class contains all the keys the json contains
t
Do you update
serialization
?
Do you use latest configuration? Kotlin
1.5.10
Coroutines
1.5.0
Serialization
1.2.1
Ktor
1.6.0
m
Yes. I just double checked. And it produces the same error
r
I had the same issue this morning. It is already tracked, (see https://github.com/Kotlin/kotlinx.serialization/issues/1450) and fixed (see https://github.com/Kotlin/kotlinx.serialization/pull/1484), but it isn’t released yet. For me the given workaround to set
useAlternativeNames = false
worked.
👍 1
h
I set
useAlternativeNames = false
, it’s work
do exact @Robin Hos said
p
The workaround works fine, should we expect a new Ktor version that won’t require the workaround?