Apollo-android: Apollo Android client crashes when sending a request with input that has a list type of parameters

Created on 8 Jun 2020  路  2Comments  路  Source: apollographql/apollo-android

Summary
Android app crashes with following stacktrace. And it seems that anytime we define an input that as property that is of list type, this type of crash will happen

java.lang.AbstractMethodError: abstract method "void com.apollographql.apollo.api.internal.InputFieldWriter.writeList(java.lang.String, kotlin.jvm.functions.Function1)"
        at com.salesforce.trailheadgo.bff.type.ListInput$marshaller$$inlined$invoke$1.marshal(InputFieldMarshaller.kt:20)
        at com.apollographql.apollo.cache.normalized.internal.RealCacheKeyBuilder.resolveVariableArgument(RealCacheKeyBuilder.kt:56)
        at com.apollographql.apollo.cache.normalized.internal.RealCacheKeyBuilder.resolveArguments(RealCacheKeyBuilder.kt:37)
        at com.apollographql.apollo.cache.normalized.internal.RealCacheKeyBuilder.build(RealCacheKeyBuilder.kt:18)
        at com.apollographql.apollo.cache.normalized.internal.ResponseNormalizer.willResolve(ResponseNormalizer.java:45)
        at com.apollographql.apollo.internal.response.RealResponseReader.willResolve(RealResponseReader.kt:221)
        at com.apollographql.apollo.internal.response.RealResponseReader.readObject(RealResponseReader.kt:111)
        at com.apollographql.apollo.api.internal.ResponseReader$DefaultImpls.readObject(ResponseReader.kt:24)
        at com.apollographql.apollo.internal.response.RealResponseReader.readObject(RealResponseReader.kt:15)
        at com.salesforce.trailheadgo.bff.FindModulesQuery$Data$Companion.invoke(FindModulesQuery.kt:197)
        at com.salesforce.trailheadgo.bff.FindModulesQuery$responseFieldMapper$$inlined$invoke$1.map(ResponseFieldMapper.kt:22)
        at com.apollographql.apollo.response.OperationResponseParser$1.read(OperationResponseParser.java:97)
        at com.apollographql.apollo.api.internal.json.ResponseJsonStreamReader.nextObject(ResponseJsonStreamReader.kt:79)
        at com.apollographql.apollo.response.OperationResponseParser.parse(OperationResponseParser.java:92)
        at com.apollographql.apollo.internal.interceptor.ApolloParseInterceptor.parse(ApolloParseInterceptor.java:87)
        at com.apollographql.apollo.internal.interceptor.ApolloParseInterceptor$1.onResponse(ApolloParseInterceptor.java:53)
        at com.apollographql.apollo.internal.interceptor.ApolloServerInterceptor$2.onResponse(ApolloServerInterceptor.java:146)
        at okhttp3.RealCall$AsyncCall.run(RealCall.kt:140)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:919)

Description
We defined an Apollo Query like following
Screen Shot 2020-06-08 at 2 04 53 PM

ListInput is defined as

{filters: [FilterInput]}

FilterInput is defined as

{name: String!}

Version
2.1.0

Runtime Bug

Most helpful comment

This looks similar to https://github.com/apollographql/apollo-android/issues/2333, certainly related to the Kotlin conversion.

All 2 comments

This looks similar to https://github.com/apollographql/apollo-android/issues/2333, certainly related to the Kotlin conversion.

I'll close this one as a duplicate of #2333. This will be fixed in next release, follow #2333 for more details.

Was this page helpful?
0 / 5 - 0 ratings