Open mortphose opened 1 month ago
Hi @mortphose, thanks for your report. Can you provide the code snippet of your sign in code to better understand how it's being called? And is that the full stacktrace?
Apologies for the delay in my response, here's my sign in:
fun signIn(username: String?, password: String?) {
AWSMobileClient.getInstance().signIn(username?.trim(), password?.trim(), null,
object : Callback<SignInResult?> {
override fun onResult(signInResult: SignInResult?) {
val signInState = signInResult?.signInState
when (signInState) {
<redacted>
}
}
override fun onError(e: Exception) {
<redacted>
}
}
)
}
It's a pretty basic call and function - I'm dealing with the data elsewhere after a login. I've also attached a firebase stacktrace.
@mortphose @vincetran can be link to this? https://github.com/aws-amplify/aws-sdk-android/issues/3572
@lolucosmin doesn't look like any of the errors I've seen on my end, but can't rule out being related.
I believe there may be a race condition here where onError is firing twice and the second time userCallback
is null.
The value gets set to Done
and is not supposed to fire again, but if different threads try to provide a callback at the same time, a race condition may allow this null pointer.
We will look into fixing.
Describe the bug When using signIn, I rarely receive this error:
To Reproduce Only way to reproduce it is using signIn, and even then, it's not every time.
Which AWS service(s) are affected? android-sdk-mobile-client and maybe android-sdk-auth-userpools
Expected behavior I don't expect this to happen with signIn.
Environment Information (please complete the following information):
Additional context I'm not able to replicate this reliably, so I'm not sure how common this is for users.