Auth0.Android icon indicating copy to clipboard operation
Auth0.Android copied to clipboard

IllegalStateException coming from SecureCredentialsManager.awaitCredentials

Open tomhusson-toast opened this issue 3 years ago • 1 comments

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

tomhusson-toast avatar Oct 06 '22 15:10 tomhusson-toast

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

poovamraj avatar Oct 13 '22 14:10 poovamraj

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.

poovamraj avatar Nov 06 '22 18:11 poovamraj