{"action":"closed","issue":{"url":"https://api.github.com/repos/awslabs/aws-mobile-appsync-sdk-android/issues/65","repository_url":"https://api.github.com/repos/awslabs/aws-mobile-appsync-sdk-android","labels_url":"https://api.github.com/repos/awslabs/aws-mobile-appsync-sdk-android/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/awslabs/aws-mobile-appsync-sdk-android/issues/65/comments","events_url":"https://api.github.com/repos/awslabs/aws-mobile-appsync-sdk-android/issues/65/events","html_url":"https://github.com/awslabs/aws-mobile-appsync-sdk-android/issues/65","id":382322419,"node_id":"MDU6SXNzdWUzODIzMjI0MTk=","number":65,"title":"How do you handle  java.lang.IllegalStateException at RealAppSyncCall.java:350","user":{"login":"olga-dorogan","id":8676393,"node_id":"MDQ6VXNlcjg2NzYzOTM=","avatar_url":"https://avatars2.githubusercontent.com/u/8676393?v=4","gravatar_id":"","url":"https://api.github.com/users/olga-dorogan","html_url":"https://github.com/olga-dorogan","followers_url":"https://api.github.com/users/olga-dorogan/followers","following_url":"https://api.github.com/users/olga-dorogan/following{/other_user}","gists_url":"https://api.github.com/users/olga-dorogan/gists{/gist_id}","starred_url":"https://api.github.com/users/olga-dorogan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olga-dorogan/subscriptions","organizations_url":"https://api.github.com/users/olga-dorogan/orgs","repos_url":"https://api.github.com/users/olga-dorogan/repos","events_url":"https://api.github.com/users/olga-dorogan/events{/privacy}","received_events_url":"https://api.github.com/users/olga-dorogan/received_events","type":"User","site_admin":false},"labels":[{"id":1072753912,"node_id":"MDU6TGFiZWwxMDcyNzUzOTEy","url":"https://api.github.com/repos/awslabs/aws-mobile-appsync-sdk-android/labels/AppSync","name":"AppSync","color":"dabaf4","default":false},{"id":821677687,"node_id":"MDU6TGFiZWw4MjE2Nzc2ODc=","url":"https://api.github.com/repos/awslabs/aws-mobile-appsync-sdk-android/labels/bug","name":"bug","color":"d73a4a","default":true},{"id":1080697568,"node_id":"MDU6TGFiZWwxMDgwNjk3NTY4","url":"https://api.github.com/repos/awslabs/aws-mobile-appsync-sdk-android/labels/closing-soon-if-no-response","name":"closing-soon-if-no-response","color":"b60205","default":false},{"id":1067465828,"node_id":"MDU6TGFiZWwxMDY3NDY1ODI4","url":"https://api.github.com/repos/awslabs/aws-mobile-appsync-sdk-android/labels/requesting%20feedback","name":"requesting feedback","color":"32c11f","default":false}],"state":"closed","locked":false,"assignee":{"login":"cbommas","id":5359504,"node_id":"MDQ6VXNlcjUzNTk1MDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/5359504?v=4","gravatar_id":"","url":"https://api.github.com/users/cbommas","html_url":"https://github.com/cbommas","followers_url":"https://api.github.com/users/cbommas/followers","following_url":"https://api.github.com/users/cbommas/following{/other_user}","gists_url":"https://api.github.com/users/cbommas/gists{/gist_id}","starred_url":"https://api.github.com/users/cbommas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbommas/subscriptions","organizations_url":"https://api.github.com/users/cbommas/orgs","repos_url":"https://api.github.com/users/cbommas/repos","events_url":"https://api.github.com/users/cbommas/events{/privacy}","received_events_url":"https://api.github.com/users/cbommas/received_events","type":"User","site_admin":false},"assignees":[{"login":"cbommas","id":5359504,"node_id":"MDQ6VXNlcjUzNTk1MDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/5359504?v=4","gravatar_id":"","url":"https://api.github.com/users/cbommas","html_url":"https://github.com/cbommas","followers_url":"https://api.github.com/users/cbommas/followers","following_url":"https://api.github.com/users/cbommas/following{/other_user}","gists_url":"https://api.github.com/users/cbommas/gists{/gist_id}","starred_url":"https://api.github.com/users/cbommas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbommas/subscriptions","organizations_url":"https://api.github.com/users/cbommas/orgs","repos_url":"https://api.github.com/users/cbommas/repos","events_url":"https://api.github.com/users/cbommas/events{/privacy}","received_events_url":"https://api.github.com/users/cbommas/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2018-11-19T17:36:54Z","updated_at":"2018-12-30T17:58:22Z","closed_at":"2018-12-30T17:58:22Z","author_association":"CONTRIBUTOR","body":"We have a lot of IllegalStateException at RealAppSyncCall.java:350.\r\n\r\nAfter user logs in, our app subscribes to the topic, run some queries and mutations.\r\nFirst time we faced the issue when the same mutations were processed almost simultaneously, so we got rid of them by cancelling all previously started before starting new one.\r\nBut it helps only for this case\r\n\r\nHow can we handle the exception?\r\n\r\nHere is an example of stack trace\r\n```\r\nFatal Exception: java.lang.IllegalStateException\r\nExpected: TERMINATED, but found [ACTIVE, CANCELED]\r\ncom.apollographql.apollo.internal.RealAppSyncCall.b (RealAppSyncCall.java:350)\r\ncom.apollographql.apollo.internal.RealAppSyncCall.a (RealAppSyncCall.java:69)\r\ncom.apollographql.apollo.internal.RealAppSyncCall$1.onFetch (RealAppSyncCall.java:278)\r\ncom.amazonaws.mobileconnectors.appsync.InterceptorCallback.onFetch (AppSyncOfflineMutationInterceptor.java:141)\r\ncom.apollographql.apollo.internal.interceptor.ApolloCacheInterceptor$1$1.onFetch (ApolloCacheInterceptor.java:115)\r\ncom.apollographql.apollo.internal.interceptor.ApolloParseInterceptor$1.onFetch (ApolloParseInterceptor.java:102)\r\ncom.apollographql.apollo.internal.interceptor.ApolloServerInterceptor$1.run (ApolloServerInterceptor.java:91)\r\njava.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1162)\r\njava.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:636)\r\njava.lang.Thread.run (Thread.java:764)\r\n```\r\n\r\n**Environment:**\r\n - AppSync SDK Version: 2.6.28\r\n\r\n**Device Information:**\r\n - Device: happens to all devices\r\n - Android Version: happens to all versions \r\n - Specific to simulators: No\r\n"}}
{"actor":{"display_login":"cbommas"}}