-
Notifications
You must be signed in to change notification settings - Fork 620
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
SerializationException: Serializer for class *** is not found in IR backend for Kotlin JS #2202
Comments
I've just checked and this code works fine (on 1.8.0/1.5.0-RC, but it should work on 1.7.21 as well, since we have a lot of tests for that). Are you sure that you have serialization plugin applied to your module? Runtime dependency is not enough. |
Yes, I am more than sure. Also everything works on Legacy backend so there is no way anything is wrong with setup. |
Do you think it is possible for you to create a separate project with reproducer? It seems that the problem is with the project setup, not the plugin. Maybe |
Sure, but if its most likely not bug on your side, then I will try to reduce my build to minimum first. Maybe i left some weird config somewhere, which causes issues for IR backend. If I won't find anything, then I will create separate project for this |
I did create Multiplatform and JS version of simple project and in both cases it worked in Kotlin 1.7.21. Which means I have no clue what causes issue on my project. I will paste whole error, maybe can you provide some hints where to look? This project is very big, uses multiple multiplatform libraries and multiple multiplatform modules so its really hard to just remove something and check if it works.
|
Unfortunately it's not possible to say anything from the stacktrace alone. I suggest to follow these steps:
|
Okey I found the issue, and its quite weird.
I did check it on my project and on newly created multiplatform project. Adding those lines make serialization plugin to break. Would you like me to provide separate project with this bug? |
Maybe it is something to do with this react version be compiled with kotlin 1.8.0 and projects uses 1.7.x? |
It may be. Try lower react wrapper version. |
I cannot lower react wrapper version, because older version has other bugs :( I updated project to Kotlin 1.8. It works, but probably we will have to drop Kotlin JS for a while, because its not that simple to update everything to 1.8. Anyway, problem was solved |
Describe the bug
Any serialization done on Kotlin JS IR backend with kotlinx.serialization library fails with error:
SerializationException: Serializer for class *** is not found
Serialization works fine on Legacy backend, but we cannot use it because other thing works only on IR backend.
To Reproduce
Expected behavior
Serialize object to string same on Legacy and IR backends
Environment
The text was updated successfully, but these errors were encountered: