-
Notifications
You must be signed in to change notification settings - Fork 645
kotlinx.serialization/MissingFieldException with KMP #2024
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
Do you have any other dependencies that may refer to an older version of kotlinx-serialization? See discussion here: #2018 |
@sandwwraith the dependency tree shows it uses kotlinx-serialization v1.4.0
|
Ktor 2.1.0 uses 1.3.3 and you use Kotlin Native (iOS) which could cause the error because of some binary incompatibilities.
|
Same error here with Ktor Fixed with downgrading kotlinx-serialization to |
We are investigating the root cause |
I am facing the same issue, using Ktor 2.1.0 I have:
Running serialization with 1.4.0 throws exception, downgrading to 1.3.3 works as expected. |
The root cause is simple -- I've filed #2053 to prevent such issues in the future |
For me, strictly setting the version has helped as a workaround.
|
Describe the bug
I got a
kotlinx.serialization/MissingFieldException
while building Kotlin-multi platform/iOS library with the library version1.4.0
. It works perfectly with1.3.3
Gradle command:
./gradlew assembleKmpSdkDebugXCFramework
Exception:
To Reproduce
I have a lots of clases with @serializable.
Expected behavior
No crash
Environment
The text was updated successfully, but these errors were encountered: