-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sending 2 mutations sequentially, callback doesn't get called on one of them #72
Comments
Thanks for reporting this @joelmbell We have a bunch of functional tests where we run about 18 mutations in a for loop which passes: https://github.com/awslabs/aws-mobile-appsync-sdk-ios/blob/master/AWSAppSyncTests/AWSAppSyncTests.swift#L324 Which auth mechanism you are using? (AWS_IAM, API_KEY, UserPools?) Thanks, |
@rohandubal I am using the new I'll continue testing on my end, I should be able to narrow it down further. |
Thanks for the info @joelmbell I will try to reproduce on my end as well. |
@rohandubal the more I look at this, it seems like its actually an issue the Cognito SDK we're using to fetch the token in The sdk is never calling its callback the second time a token is requested, so the callback to this function isn't getting called, which is just bubbling up the stack to the actual mutation resultHandler Given that this isn't an issue with the actual AppSync SDK we can probably close this ticket and I'll handle that case in my application and possibly open a bug on the AWSCognitoAuth iOS proj |
Hello @joelmbell I tried re-producing on my side but was not able to. It worked as expected on SDK version I was using the class MyCognitoUserPoolsAuthProvider: AWSCognitoUserPoolsAuthProviderAsync {
func getLatestAuthToken(_ callback: @escaping (String?, Error?) -> Void) {
AWSCognitoUserPoolsSignInProvider.sharedInstance().getUserPool().currentUser()?.getSession().continueWith(block: { (task) -> Any? in
if let error = task.error {
callback(nil, error)
} else if let token = task.result?.idToken?.tokenString {
callback(token, nil)
}
return nil
})
}
} Does your code look similar? I think I might need a some repreo steps or a small sample app from you where I can debug this. Thanks, |
@rohandubal closing this, you may have missed my above comment explaining that it was an implementation detail on my end causing this. In short, the callback in Thanks for looking into this, and for responding so quickly! |
Describe the bug
When you send two mutations, one right after the other, a callback will get called for one of them, but not for the other one.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The callback should be called twice, once for each mutation that was sent.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment(please complete the following information):
Device Information (please complete the following information):
Additional context
If you wait for the first mutation to complete, then call the second everything works as expected. This was working fine in a previous version of app sync, I have not yet identified which version it broke in.
The text was updated successfully, but these errors were encountered: