Giter Site home page Giter Site logo

Comments (5)

scb01 avatar scb01 commented on June 1, 2024

@olga-dorogan

Let me investigate this and get back to you.

from aws-mobile-appsync-sdk-android.

scb01 avatar scb01 commented on June 1, 2024

@olga-dorogan

The mutation queue handling logic is intended to be a sequential pipe, executing mutations one at a time. There were, however, synchronization issues and race conditions that were causing the same mutation to be tried more than one thread concurrently, which resulted in this exception.

Version 2.7.1 of the SDK contains synchronization and threading model changes that fixes this issue.
See the following for a test that shows 25 mutations issued in a rapid fire fashion that is then validated for sequential execution

Please upgrade to v2.7.1 and let us know how you fare.

from aws-mobile-appsync-sdk-android.

scb01 avatar scb01 commented on June 1, 2024

@olga-dorogan

Closing as I haven't heard back. Please feel free to post here or create a new thread if still facing issues.

from aws-mobile-appsync-sdk-android.

DeMoss15 avatar DeMoss15 commented on June 1, 2024

@cbommas
Hello.

We've caught very similar exception with similar stacktrace on executing a lot of mutations but on AppSync 2.7.8:

Fatal Exception: java.lang.IllegalStateException: Expected: TERMINATED, but found [ACTIVE, CANCELED]
       at com.apollographql.apollo.internal.RealAppSyncCall.responseCallback(RealAppSyncCall.java:383)
       at com.apollographql.apollo.internal.RealAppSyncCall.access$000(RealAppSyncCall.java:72)
       at com.apollographql.apollo.internal.RealAppSyncCall$1.onResponse(RealAppSyncCall.java:272)
       at com.amazonaws.mobileconnectors.appsync.InterceptorCallback.onResponse(InterceptorCallback.java:127)
       at com.apollographql.apollo.internal.interceptor.ApolloCacheInterceptor$1$1.onResponse(ApolloCacheInterceptor.java:102)
       at com.apollographql.apollo.internal.interceptor.ApolloParseInterceptor$1.onResponse(ApolloParseInterceptor.java:84)
       at com.apollographql.apollo.internal.interceptor.ApolloServerInterceptor$1$1.onResponse(ApolloServerInterceptor.java:110)
       at okhttp3.RealCall$AsyncCall.execute(RealCall.java:206)
       at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
       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:764)

from aws-mobile-appsync-sdk-android.

itslonua avatar itslonua commented on June 1, 2024

Fatal Exception: java.lang.IllegalStateException: Expected: TERMINATED, but found [ACTIVE, CANCELED]
at com.apollographql.apollo.internal.RealAppSyncCall.responseCallback(RealAppSyncCall.java:373)
at com.apollographql.apollo.internal.RealAppSyncCall.access$000(RealAppSyncCall.java:62)
at com.apollographql.apollo.internal.RealAppSyncCall$1.onResponse(RealAppSyncCall.java:262)
at com.amazonaws.mobileconnectors.appsync.InterceptorCallback.onResponse(AppSyncOfflineMutationInterceptor.java:117)
at com.apollographql.apollo.internal.interceptor.ApolloCacheInterceptor$1$1.onResponse(ApolloCacheInterceptor.java:92)
at com.apollographql.apollo.internal.interceptor.ApolloParseInterceptor$1.onResponse(ApolloParseInterceptor.java:71)
at com.apollographql.apollo.internal.interceptor.ApolloServerInterceptor$1$1.onResponse(ApolloServerInterceptor.java:100)
at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519)
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:923)

AppSync: 3.3.2

from aws-mobile-appsync-sdk-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.