You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a multi-module application, where some modules are leveraging 2* while some are leveraging 3*. In modules which have migrated from 2* to 3*, there is an uptick in ApolloParseExceptions. The underlying causes look to be:
java.net.SocketException: Connection reset
okhttp3.internal.http2.StreamResetException: stream was reset: CANCEL
Feature code integration and error handling is "same" between 2* and 3*.
Steps to reproduce the behavior
Additional context: a single exception handler treatment of errors between 2.* and 3.* exists to ensure exception treatment is consistent.
com.apollographql.apollo.exception.ApolloHttpException and com.apollographql.apollo3.exception.ApolloHttpException
com.apollographql.apollo.exception.ApolloNetworkException and - com.apollographql.apollo3.exception.ApolloNetworkException
com.apollographql.apollo.exception.ApolloParseException and com.apollographql.apollo3.exception.ApolloParseException
etc
For ApolloParseException, SocketTimeoutException (#2783) is explicitly handled in both 2.* and 3.* cases.
However, the reported exceptions do not appear in ApolloParseException in 2.*.
Logs
SocketException - connection reset
com.apollographql.apollo3.exception.ApolloParseException: Failed to parse GraphQL http network response
at com.apollographql.apollo3.network.http.HttpNetworkTransport$execute$1.com.apollographql.apollo3.network.http.HttpNetworkTransport$Companion.wrapThrowableIfNeeded(Unknown Source:376)
com.apollographql.apollo3.network.http.HttpNetworkTransport$Companion.access$wrapThrowableIfNeeded
com.apollographql.apollo3.network.http.HttpNetworkTransport.singleResponse
com.apollographql.apollo3.network.http.HttpNetworkTransport.access$singleResponse
invokeSuspend
at com.apollographql.apollo3.network.http.HttpNetworkTransport$execute$1.com.apollographql.apollo3.network.http.HttpNetworkTransport$execute$1.invoke(Unknown Source:12)
invoke
at kotlinx.coroutines.flow.SafeFlow.collectSafely(Unknown Source:2)
at kotlinx.coroutines.flow.AbstractFlow.collect(Unknown Source:69)
at kotlinx.coroutines.flow.internal.ChannelFlowOperatorImpl.flowCollect(Unknown Source:2)
at kotlinx.coroutines.flow.internal.ChannelFlowOperator.kotlinx.coroutines.flow.internal.ChannelFlowOperator.collect$suspendImpl(Unknown Source:21)
collect
at kotlinx.coroutines.flow.FlowKt.kotlinx.coroutines.flow.FlowKt__ReduceKt.single(Unknown Source:68)
single
at com.apollographql.apollo3.interceptor.AutoPersistedQueryInterceptor$intercept$1.invokeSuspend(Unknown Source:79)
at com.apollographql.apollo3.interceptor.AutoPersistedQueryInterceptor$intercept$1.com.apollographql.apollo3.interceptor.AutoPersistedQueryInterceptor$intercept$1.invoke(Unknown Source:12)
invoke
at kotlinx.coroutines.flow.SafeFlow.collectSafely(Unknown Source:2)
at kotlinx.coroutines.flow.AbstractFlow.collect(Unknown Source:69)
at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1.collect(Unknown Source:9)
at kotlinx.coroutines.flow.FlowKt.kotlinx.coroutines.flow.FlowKt__ErrorsKt.catchImpl(Unknown Source:67)
catchImpl
at kotlinx.coroutines.flow.FlowKt__ErrorsKt$catch$$inlined$unsafeFlow$1.collect(Unknown Source:71)
at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1.collect(Unknown Source:9)
at kotlinx.coroutines.flow.FlowKt__EmittersKt$onCompletion$$inlined$unsafeFlow$1.collect(Unknown Source:93)
at kotlinx.coroutines.flow.internal.ChannelFlowOperatorImpl.flowCollect(Unknown Source:2)
at kotlinx.coroutines.flow.internal.ChannelFlowOperator.kotlinx.coroutines.flow.internal.ChannelFlowOperator.collect$suspendImpl(Unknown Source:21)
collect
at kotlinx.coroutines.flow.FlowKt.kotlinx.coroutines.flow.FlowKt__ReduceKt.single(Unknown Source:68)
single
at com.apollographql.apollo3.ApolloCall.execute(Unknown Source:310)
...
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:191)
at java.net.SocketInputStream.read(SocketInputStream.java:143)
at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.readFromSocket(ConscryptEngineSocket.java:983)
at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.processDataFromSocket(ConscryptEngineSocket.java:947)
at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.readUntilDataAvailable(ConscryptEngineSocket.java:862)
at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.read(ConscryptEngineSocket.java:835)
at okio.InputStreamSource.read(Unknown Source:40)
at okio.AsyncTimeout$source$1.read(Unknown Source:7)
at okio.RealBufferedSource.request(Unknown Source:30)
at okio.RealBufferedSource.require(Unknown Source:0)
at okhttp3.internal.http2.Http2Reader.nextFrame(Unknown Source:5)
at okhttp3.internal.http2.Http2Connection$ReaderRunnable.okhttp3.internal.http2.Http2Connection$ReaderRunnable.invoke(Unknown Source:11)
invoke
at okhttp3.internal.concurrent.TaskQueue$execute$1.runOnce(Unknown Source:2)
at okhttp3.internal.concurrent.TaskRunner.okhttp3.internal.concurrent.TaskRunner.runTask(Unknown Source:18)
access$runTask
at okhttp3.internal.concurrent.TaskRunner$runnable$1.run(Unknown Source:43)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)
SocketException - connection abort
com.apollographql.apollo3.exception.ApolloParseException: Failed to parse GraphQL http network response
at com.apollographql.apollo3.network.http.HttpNetworkTransport$execute$1.com.apollographql.apollo3.network.http.HttpNetworkTransport$Companion.wrapThrowableIfNeeded(Unknown Source:376)
com.apollographql.apollo3.network.http.HttpNetworkTransport$Companion.access$wrapThrowableIfNeeded
com.apollographql.apollo3.network.http.HttpNetworkTransport.singleResponse
com.apollographql.apollo3.network.http.HttpNetworkTransport.access$singleResponse
invokeSuspend
at com.apollographql.apollo3.network.http.HttpNetworkTransport$execute$1.com.apollographql.apollo3.network.http.HttpNetworkTransport$execute$1.invoke(Unknown Source:12)
invoke
at kotlinx.coroutines.flow.SafeFlow.collectSafely(Unknown Source:2)
at kotlinx.coroutines.flow.AbstractFlow.collect(Unknown Source:69)
at kotlinx.coroutines.flow.internal.ChannelFlowOperatorImpl.flowCollect(Unknown Source:2)
at kotlinx.coroutines.flow.internal.ChannelFlowOperator.kotlinx.coroutines.flow.internal.ChannelFlowOperator.collect$suspendImpl(Unknown Source:21)
collect
at kotlinx.coroutines.flow.FlowKt.kotlinx.coroutines.flow.FlowKt__ReduceKt.single(Unknown Source:68)
single
at com.apollographql.apollo3.interceptor.AutoPersistedQueryInterceptor$intercept$1.invokeSuspend(Unknown Source:79)
at com.apollographql.apollo3.interceptor.AutoPersistedQueryInterceptor$intercept$1.com.apollographql.apollo3.interceptor.AutoPersistedQueryInterceptor$intercept$1.invoke(Unknown Source:12)
invoke
at kotlinx.coroutines.flow.SafeFlow.collectSafely(Unknown Source:2)
at kotlinx.coroutines.flow.AbstractFlow.collect(Unknown Source:69)
at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1.collect(Unknown Source:9)
at kotlinx.coroutines.flow.FlowKt.kotlinx.coroutines.flow.FlowKt__ErrorsKt.catchImpl(Unknown Source:67)
catchImpl
at kotlinx.coroutines.flow.FlowKt__ErrorsKt$catch$$inlined$unsafeFlow$1.collect(Unknown Source:71)
at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1.collect(Unknown Source:9)
at kotlinx.coroutines.flow.FlowKt__EmittersKt$onCompletion$$inlined$unsafeFlow$1.collect(Unknown Source:93)
at kotlinx.coroutines.flow.internal.ChannelFlowOperatorImpl.flowCollect(Unknown Source:2)
at kotlinx.coroutines.flow.internal.ChannelFlowOperator.kotlinx.coroutines.flow.internal.ChannelFlowOperator.collect$suspendImpl(Unknown Source:21)
collect
at kotlinx.coroutines.flow.FlowKt.kotlinx.coroutines.flow.FlowKt__ReduceKt.single(Unknown Source:68)
single
at com.apollographql.apollo3.ApolloCall.execute(Unknown Source:310)
...
Caused by: java.net.SocketException: Software caused connection abort
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:118)
at java.net.SocketInputStream.read(SocketInputStream.java:173)
at java.net.SocketInputStream.read(SocketInputStream.java:143)
at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.readFromSocket(ConscryptEngineSocket.java:945)
at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.processDataFromSocket(ConscryptEngineSocket.java:909)
at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.readUntilDataAvailable(ConscryptEngineSocket.java:824)
at com.android.org.conscrypt.ConscryptEngineSocket$SSLInputStream.read(ConscryptEngineSocket.java:797)
at okio.InputStreamSource.read(Unknown Source:40)
at okio.AsyncTimeout$source$1.read(Unknown Source:7)
at okio.RealBufferedSource.request(Unknown Source:30)
at okio.RealBufferedSource.require(Unknown Source:0)
at okhttp3.internal.http2.Http2Reader.nextFrame(Unknown Source:5)
at okhttp3.internal.http2.Http2Connection$ReaderRunnable.okhttp3.internal.http2.Http2Connection$ReaderRunnable.invoke(Unknown Source:11)
invoke
at okhttp3.internal.concurrent.TaskQueue$execute$1.runOnce(Unknown Source:2)
at okhttp3.internal.concurrent.TaskRunner.okhttp3.internal.concurrent.TaskRunner.runTask(Unknown Source:18)
access$runTask
at okhttp3.internal.concurrent.TaskRunner$runnable$1.run(Unknown Source:43)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at java.lang.Thread.run(Thread.java:1012)
StreamResetException
com.apollographql.apollo3.exception.ApolloParseException: Failed to parse GraphQL http network response
at com.apollographql.apollo3.network.http.HttpNetworkTransport$execute$1.com.apollographql.apollo3.network.http.HttpNetworkTransport$Companion.wrapThrowableIfNeeded(Unknown Source:376)
com.apollographql.apollo3.network.http.HttpNetworkTransport$Companion.access$wrapThrowableIfNeeded
com.apollographql.apollo3.network.http.HttpNetworkTransport.singleResponse
com.apollographql.apollo3.network.http.HttpNetworkTransport.access$singleResponse
invokeSuspend
at com.apollographql.apollo3.network.http.HttpNetworkTransport$execute$1.com.apollographql.apollo3.network.http.HttpNetworkTransport$execute$1.invoke(Unknown Source:12)
invoke
at kotlinx.coroutines.flow.SafeFlow.collectSafely(Unknown Source:2)
at kotlinx.coroutines.flow.AbstractFlow.collect(Unknown Source:69)
at kotlinx.coroutines.flow.internal.ChannelFlowOperatorImpl.flowCollect(Unknown Source:2)
at kotlinx.coroutines.flow.internal.ChannelFlowOperator.kotlinx.coroutines.flow.internal.ChannelFlowOperator.collect$suspendImpl(Unknown Source:21)
collect
at kotlinx.coroutines.flow.FlowKt.kotlinx.coroutines.flow.FlowKt__ReduceKt.single(Unknown Source:68)
single
at com.apollographql.apollo3.interceptor.AutoPersistedQueryInterceptor$intercept$1.invokeSuspend(Unknown Source:79)
at com.apollographql.apollo3.interceptor.AutoPersistedQueryInterceptor$intercept$1.com.apollographql.apollo3.interceptor.AutoPersistedQueryInterceptor$intercept$1.invoke(Unknown Source:12)
invoke
at kotlinx.coroutines.flow.SafeFlow.collectSafely(Unknown Source:2)
at kotlinx.coroutines.flow.AbstractFlow.collect(Unknown Source:69)
at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1.collect(Unknown Source:9)
at kotlinx.coroutines.flow.FlowKt.kotlinx.coroutines.flow.FlowKt__ErrorsKt.catchImpl(Unknown Source:67)
catchImpl
at kotlinx.coroutines.flow.FlowKt__ErrorsKt$catch$$inlined$unsafeFlow$1.collect(Unknown Source:71)
at kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1.collect(Unknown Source:9)
at kotlinx.coroutines.flow.FlowKt__EmittersKt$onCompletion$$inlined$unsafeFlow$1.collect(Unknown Source:93)
at kotlinx.coroutines.flow.internal.ChannelFlowOperatorImpl.flowCollect(Unknown Source:2)
at kotlinx.coroutines.flow.internal.ChannelFlowOperator.kotlinx.coroutines.flow.internal.ChannelFlowOperator.collect$suspendImpl(Unknown Source:21)
collect
at kotlinx.coroutines.flow.FlowKt.kotlinx.coroutines.flow.FlowKt__ReduceKt.single(Unknown Source:68)
single
at com.apollographql.apollo3.ApolloCall.execute(Unknown Source:310)
...
Caused by: okhttp3.internal.http2.StreamResetException: stream was reset: CANCEL
at okhttp3.internal.http2.Http2Stream$FramingSource.read(Unknown Source:42)
at okhttp3.internal.connection.Exchange$ResponseBodySource.read(Unknown Source:10)
at okio.RealBufferedSource.read(Unknown Source:29)
at okio.RealBufferedSource.exhausted(Unknown Source:18)
at okio.InflaterSource.okio.InflaterSource.refill(Unknown Source:45)
readOrInflate
at okio.InflaterSource.read(Unknown Source:0)
read
read
at okio.GzipSource.read(Unknown Source:293)
at okio.RealBufferedSource.okio.RealBufferedSource.indexOfElement(Unknown Source:27)
indexOfElement
at com.apollographql.apollo3.api.json.BufferedSourceJsonReader.nextQuotedValue(Unknown Source:3)
at com.apollographql.apollo3.api.json.BufferedSourceJsonReader.nextString(Unknown Source:95)
at com.apollographql.apollo3.api.json.-JsonReaders.readAny(Unknown Source:95)
at com.apollographql.apollo3.api.json.-JsonReaders.readAny(Unknown Source:83)
at com.apollographql.apollo3.api.json.-JsonReaders.readAny(Unknown Source:83)
at com.apollographql.apollo3.api.json.MapJsonReader$Companion.buffer(Unknown Source:24)
at com.apollographql.apollo3.api.ObjectAdapter.fromJson(Unknown Source:6)
at com.apollographql.apollo3.api.ObjectAdapter.fromJson(Unknown Source:15)
at com.apollographql.apollo3.api.NullableAdapter.fromJson(Unknown Source:15)
at com.apollographql.apollo3.api.internal.ResponseParser.parse(Unknown Source:54)
at com.apollographql.apollo3.api.Operations.parseJsonResponse(SourceFile:11)
at com.apollographql.apollo3.network.http.HttpNetworkTransport$execute$1.com.apollographql.apollo3.network.http.HttpNetworkTransport.singleResponse(Unknown Source:326)
com.apollographql.apollo3.network.http.HttpNetworkTransport.access$singleResponse
invokeSuspend
The text was updated successfully, but these errors were encountered:
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Kotlin usage and allow us to serve you better.
Version
3.8*
Summary
I have a multi-module application, where some modules are leveraging 2* while some are leveraging 3*. In modules which have migrated from 2* to 3*, there is an uptick in ApolloParseExceptions. The underlying causes look to be:
Feature code integration and error handling is "same" between 2* and 3*.
Steps to reproduce the behavior
Additional context: a single exception handler treatment of errors between 2.* and 3.* exists to ensure exception treatment is consistent.
com.apollographql.apollo.exception.ApolloHttpException
andcom.apollographql.apollo3.exception.ApolloHttpException
com.apollographql.apollo.exception.ApolloNetworkException
and -com.apollographql.apollo3.exception.ApolloNetworkException
com.apollographql.apollo.exception.ApolloParseException
andcom.apollographql.apollo3.exception.ApolloParseException
For
ApolloParseException
, SocketTimeoutException (#2783) is explicitly handled in both 2.* and 3.* cases.However, the reported exceptions do not appear in
ApolloParseException
in 2.*.Logs
SocketException - connection reset
SocketException - connection abort
StreamResetException
The text was updated successfully, but these errors were encountered: