Hi guys. I'm going crazy with some code. I have 2 mpp, one I manually created like 2 months ago and one created with "new>project>kotlin mpp (ios/android)". The first one is working fine, while the second one is throwing an error on ios (
kotlin.native.concurrent.InvalidMutabilityException: mutation attempt of frozen <object>@839b6268
). The whole code is the same. Anyone ever had similar issue?
so stately is just defining empty expect for other platforms (eg android) in order to use freeze and other stuff on common code... Basically what I've just done, but I can't get how I should call .freeze() on the code I provided before. You said to freeze httpclient's lambda callback, but these are builders and not a lambda called on call completed. That's a coroutine so there's no callback. Sorry if this sound stupid 😅
3 years ago
ic. Can you try to log every line to get the actual crash reason?
So it seems like KT-30454 is by design and nothing is "really" broken... That means we will need to always instantiate a new client every time. From your knowledge is it possible to instantiate the client inside something like a view model and use it multiple times or this will still crash?