awslabs / awslabs/aws-mobile-appsync-sdk-android
Cannot serialize Kotlin type com.apollographql.apollo.compiler.ir.CodeGenerationIR. Reflective serialization of Kotlin classes without using kotlin-reflect has undefined and unexpected behavior.
- Dominant language
- Java
- Stars
- 106
- Forks
- 56
- PR merge metrics
- No merged PRs in 30d
Description
Unable to build our app after upgrading to moshi version >= 1.9.0. Version 1.8.0 is the last version that seems to be compatible with the app. The app uses gen from moshi-kotlin-codegen.
Full error msg:
Cannot serialize Kotlin type com.apollographql.apollo.compiler.ir.CodeGenerationIR. Reflective serialization of Kotlin classes without using kotlin-reflect has undefined and unexpected behavior. Please use KotlinJsonAdapter from the moshi-kotlin artifact or use code gen from the moshi-kotlin-codegen artifact.
Contributor guide
Research direction
Start by reproducing the app build with Moshi 1.9.0 or later and the moshi-kotlin-codegen setup described in the report. Inspect how com.apollographql.apollo.compiler.ir.CodeGenerationIR is serialized and compare it with the working Moshi 1.8.0 configuration; done means the app builds successfully on the newer version without the reported serialization error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, graphql, kotlin
- Domain
- mobile, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100