Closed as not planned
Description
Integration
sentry-android
Build System
Gradle
AGP Version
8.5.0
Proguard
Enabled
Version
7.14.0
Steps to Reproduce
- Use Apollo GraphQL version: 4.0.0 and com.apollographql.apollo:apollo-runtime library
- Use Sentry latest version and use sentry-apollo library
- Add SentryApolloInterceptor to your ApolloClient.Builder() with .addInterceptor(SentryApolloInterceptor())
- Run the app to emulator
Expected Result
App should run, right?
Actual Result
App crashes why?
SentryApolloInterceptor implements ApolloInterceptor.
What is ApolloInterceptor?
interface ApolloInterceptor {
fun <D : Operation.Data> intercept(request: ApolloRequest<D>, chain: ApolloInterceptorChain): Flow<ApolloResponse<D>>
}
We have override fun interceptAsync()
instead of override fun intercept()
in SentryApolloInterceptor class, which leads to following crash:
java.lang.AbstractMethodError: abstract method "kotlinx.coroutines.flow.Flow com.apollographql.apollo.interceptor.ApolloInterceptor.intercept(com.apollographql.apollo.api.ApolloRequest, com.apollographql.apollo.interceptor.ApolloInterceptorChain)"
at com.apollographql.apollo.interceptor.DefaultInterceptorChain.proceed(ApolloInterceptor.kt:23)
at com.apollographql.apollo.ApolloClient.apolloResponses$apollo_runtime_debug(ApolloClient.kt:322)
at com.apollographql.apollo.ApolloClient$executeAsFlowInternal$flow$1$2.invokeSuspend(ApolloClient.kt:260)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:111)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:585)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:802)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:706)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:693)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@3b7b1dc, Dispatchers.Main.immediate]
Metadata
Metadata
Assignees
Type
Projects
Status
Done
Status
No status