-
Notifications
You must be signed in to change notification settings - Fork 643
kotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen kotlin.collections.HashMap #1450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
and as expected without adding a serializer , I get following Error and it confirms that adding KotlinxSerializer with Json causes the freezing issue:
|
WORKAROUND: Everything works if i use like below:
So for now, I am continuing development by using the below extensions:
|
Another workaround is to disable |
@ThreadLocal
val globalJson = Json {
isLenient = true
ignoreUnknownKeys = true
}
install(JsonFeature) {
serializer = KotlinxSerializer(globalJson)
} should do the trick, too |
…eezing problems in custom Json instances Fixes #1450
I confirm this workaround is working! Waiting for the actual fix to be released so we can safely update our internal libs to Thanks for #1484 @sandwwraith ❤️ |
@marcantoinefortier 1.2.1 is already released, so #1484 won't be there :( |
When can we expect the 1.2.2 update with this fix included? This issue is blocking some other library upgrades we should do in our project, so would be really nice if an release can be made in the near future. |
Can confirm that this works for me as well |
@sven4all I'll see if that would be possible |
Describe the bug
To Reproduce
If I execute the same Request from the same HTTP Client, the Request executes Successfully with the following config:
but when I add
and use like following, then following StackTrace is printed with said Exception.
Expected behavior
Response Should be parsed properly without any hashmap freeze.
StackTrace:
Environment
The text was updated successfully, but these errors were encountered: