Assigned
Status Update
Comments
bl...@google.com <bl...@google.com> #2
Automated by Blunderbuss job android-credential-manager-autoassigner for config android_credman_config for component 1301097.
ak...@google.com <ak...@google.com> #3
Hello! Thank you for creating this bug, and for a clear description of the issue. In order to help us look into this, would you mind sending a video or screenshot of the issue? For example, you mention that in Android 34, you receive a NoCredentialException, which you do not observe in Android 35. To ensure we can help you optimally, we should eliminate some possibilities via trial and error.
- Since you are using Pixel, it is very likely you store your credentials in Google Password Manager. Can you confirm this is the case? If you are, can you verify the accounts on both devices are the same, and the credentials you expect exist within both devices in that password manager?
- If in ‘1’ above, you aren’t using GPWM, but instead some other provider, can you answer similar questions about parity between your two devices. Have you attempted this on a physical device, and does that have differing behavior?
Once we have more information, we can continue to help you with this issue. Thank you for your help to continue improving Credential Manager!
Description
Version used:
implementation 'androidx.credentials:credentials:1.5.0-rc01'
implementation 'androidx.credentials:credentials-play-services-auth:1.5.0-rc01'
implementation 'com.google.android.libraries.identity.googleid:googleid:1.1.1'
Devices/Android versions reproduced on:
If this is a bug in the library, we would appreciate if you could attach:
- Sample project to trigger the issue.
- A screenrecord or screenshots showing the issue (if UI related).
This is my code:
val signInWithGoogleOption: GetSignInWithGoogleOption = GetSignInWithGoogleOption.Builder(googleClientId ?: "")
.build()
val mGoogleSignInqRequest = GetCredentialRequest.Builder()
.addCredentialOption(signInWithGoogleOption)
.build()
MainScope().launch {
try {
val result = CredentialManager.create(context).getCredential(
request = mGoogleSignInqRequest,
context = context,
)
handleSignIn(result)
} catch (e: GetCredentialException) {
e.printStackTrace()
}
}
When these codes are run on the simulator of SDK 34, the following exception is thrown, but it behaves normally on the simulator of SDK 35.
I tried to log out of my Google account and log in again, but the exception still occurred.
this is the exception logs:
androidx.credentials.exceptions.NoCredentialException: No credentials available
at androidx.credentials.internal.ConversionUtilsKt.toJetpackGetException(ConversionUtils.kt:82)
at androidx.credentials.CredentialProviderFrameworkImpl.convertToJetpackGetException$credentials_release(CredentialProviderFrameworkImpl.kt:295)
at androidx.credentials.CredentialProviderFrameworkImpl$onGetCredential$outcome$2.onError(CredentialProviderFrameworkImpl.kt:162)
at androidx.credentials.CredentialProviderFrameworkImpl$onGetCredential$outcome$2.onError(CredentialProviderFrameworkImpl.kt:150)
at android.credentials.CredentialManager$GetCredentialTransport.lambda$onError$2(CredentialManager.java:694)
at android.credentials.CredentialManager$GetCredentialTransport.$r8$lambda$nlbYav9mLBoE6Yh1vFKCvITF3ks(Unknown Source:0)
at android.credentials.CredentialManager$GetCredentialTransport$$ExternalSyntheticLambda2.run(Unknown Source:6)
at androidx.credentials.CredentialManager$$ExternalSyntheticLambda0.execute(D8$$SyntheticClass:0)
at android.credentials.CredentialManager$GetCredentialTransport.onError(CredentialManager.java:693)
at android.credentials.IGetCredentialCallback$Stub.onTransact(IGetCredentialCallback.java:123)
at android.os.Binder.execTransactInternal(Binder.java:1344)
at android.os.Binder.execTransact(Binder.java:1275)