IllegalStateException coming from SecureCredentialsManager.awaitCredentials
Describe the problem
There is a crash coming out of the SecureCredentialsManager.awaitCredentials() call
What was the expected behavior?
This call should not crash.
Reproduction
Fatal Exception: java.lang.IllegalStateException: Already resumed, but proposed with update com.auth0.android.result.Credentials@22f1d45 at kotlinx.coroutines.CancellableContinuationImpl.alreadyResumedError(CancellableContinuationImpl.kt:482) at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:447) at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:420) at kotlinx.coroutines.CancellableContinuationImpl.resumeWith(CancellableContinuationImpl.kt:328) at com.auth0.android.authentication.storage.SecureCredentialsManager$awaitCredentials$4$1.onSuccess(SecureCredentialsManager.kt:264) at com.auth0.android.authentication.storage.SecureCredentialsManager$awaitCredentials$4$1.onSuccess(SecureCredentialsManager.kt:262) at com.auth0.android.authentication.storage.SecureCredentialsManager.continueGetCredentials$lambda-3(SecureCredentialsManager.kt:459) at com.auth0.android.authentication.storage.SecureCredentialsManager.$r8$lambda$lzipqfeeDXjWZ6piYqZb9m3XmPs() at com.auth0.android.authentication.storage.SecureCredentialsManager$$ExternalSyntheticLambda1.run(:10)
Environment
https://github.com/auth0/Auth0.Android/releases/tag/2.8.0
This can happen if the continuation object is updated twice but I cannot see the code flow possibility executing this.
Is this reproducible for you to provide us with steps to reproduce this?
Even if we call from multiple threads, each time new continuation object is used so I can't see what scenario is causing this crash. It'd be great if you can let us know how this method is being called
We left it open for quite some time to see if there is some feedback from the community. We will close this issue as it is not reproducible from our end. Anyone with more details can feel free to reopen this and we can jump on it right away.