Skip to content

App Sync SDK Crashing with java.lang.IllegalStateException #363

@jayshildave1983

Description

@jayshildave1983

Describe the bug
There is a crash in the interceptor for App Sync SDK in the class AppSyncSigV4SignerInterceptor.java line number 173
The chain request needs to be closed before it can be proceeded.

To Reproduce
Steps to reproduce the behavior:
The crash is random and happens generally when there is a retry request in place

Expected behavior
The SDK should not crash while trying to do a retry request.

Screenshots
Not applicable

Environment(please complete the following information):

  • AppSync SDK Version: 3.1.1

Device Information (please complete the following information):

  • Device: All
  • Android Version: All
  • Specific to simulators: No

Additional context
This came in because OKHttp used by AppSyncSDK for Networking request had a update. Details can be found here
square/okhttp#4986

Crash log with details.
Fatal Exception: java.lang.IllegalStateException: cannot make a new request because the previous response is still open: please call response.close()
at okhttp3.internal.connection.Transmitter.newExchange$okhttp(Transmitter.java:157)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:35)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:112)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:87)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:82)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:112)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:87)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:84)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:112)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:71)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:112)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:87)
at com.amazonaws.mobileconnectors.appsync.sigv4.AppSyncSigV4SignerInterceptor.intercept(AppSyncSigV4SignerInterceptor.java:173)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions