While trying with KMM Tutorial <https://www.youtub...
# multiplatform
e
While trying with KMM Tutorial

https://www.youtube.com/watch?v=_Q62iJoNOfg

, but with slightly different model… I got the below error when performing deserialization for iOS (okay in Android though). https://stackoverflow.com/questions/67969562/kotlin-native-concurrent-invalidmutabilityexception-mutation-attempt-of-frozen Any idea what cause the problem? Or is the a Kotlin-Native bug?
b
What version of coroutines are you using? Try using
-native-mt
and launch your ktor request on
Dispatchers.Main
r
I had the same issue a while ago after the launch of ktor 1.6.0, this probably the same. 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.
e
Thanks @bsimmons @Robin Hos. I found the workaround for it https://stackoverflow.com/a/67969770/3286489.
👍 1
r
That is exactly the workaround I described above
🙏 1