https://kotlinlang.org logo
#ktor
Title
# ktor
m

Michal Klimczak

02/16/2022, 3:02 PM
Anyone has a working config of ktor 2 client with json plugin and using new kotlin native memory model? For me it crashes with
InvalidMutabilityException: mutation attempt of frozen kotlin.Array@249bab0
 in 
kfun:io.ktor.client.plugins.json.serializer.SerializerInitializer.<init>#internal
the thing that fixes ktor and a few other things for me is
kotlin.native.binary.freezing=disabled
in
gradle.properties
a

Aleksei Tirman [JB]

02/17/2022, 2:19 PM
Please try to use the EAP version
2.0.0-eap-327
or newer
m

Michal Klimczak

02/17/2022, 4:16 PM
I was using
2.0.0-beta-1
. Thanks for the hint, but should this version make it work without the freezing=disable flag? Or you're proposing the version update for a different reason>?
a

Aleksei Tirman [JB]

02/17/2022, 6:01 PM
Yes, It should work without the
freezing
flag.
👍 1
m

Michal Klimczak

02/18/2022, 7:29 AM
thanks, but another lib crashes without it anyway, so can't really check it 😉