Open Yetland opened 1 month ago
You're referring to a fact that you're not able to see "NoCredentialException", but only the error message. Am I correct?
After my test in different devices(samsung/xiaomi), My xiaomi's expcetion msg is "No credentials available" but samsung's is "During begin sign in, failure response from one tap: 16: [28433] Cannot find a matching credential.". So your judgement condition should be replaced.
when (e) {
is NoCredentialException -> {
handleCredentialsNotAvailable(
context = context,
state = state,
credentialManager = credentialManager,
clientId = clientId,
nonce = nonce,
onTokenIdReceived = onTokenIdReceived,
onDialogDismissed = onDialogDismissed
)
}
is GetCredentialCancellationException -> {
state.close()
}
is GetCredentialInterruptedException -> {
state.close()
}
else -> {
e.localizedMessage?.let { onDialogDismissed(it) }
state.close()
}
}
"No credentials available" message indicates that Credential Manager is not available on that device (Xiaomi). And that second error on samsung device, probably indicates that the google account was not found on a device. Xiaomi devices do have an issue with Credential Manager sadly.
Through testing on a Xiaomi device, I discovered that the Google API may not function properly if there are more than six Google accounts on the phone.
2024-08-18 08:42:46.908 12107-12107 OneTapCompose com.stevdzasan.onetapcompose E GetCredentialException: androidx.credentials.exceptions.NoCredentialException: During begin sign in, failure response from one tap: 16: [28433] Cannot find a matching credential.
2024-08-18 08:42:46.908 12107-12107 MainActivity com.stevdzasan.onetapcompose D androidx.credentials.exceptions.NoCredentialException: During begin sign in, failure response from one tap: 16: [28433] Cannot find a matching credential.
2024-08-18 08:42:47.200 1966-3974 AuthPII com.google.android.gms.persistent E [RequestTokenManager] getToken() -> BAD_AUTHENTICATION. App: com.stevdzasan.onetapcompose, Service: oauth2:openid
amuc: Long live credential not available.
at ubm.a(:com.google.android.gms@242632016@24.26.32 (040700-650348549):971)
at ubs.b(:com.google.android.gms@242632016@24.26.32 (040700-650348549):28)
at ubq.a(:com.google.android.gms@242632016@24.26.32 (040700-650348549):623)
at tux.j(:com.google.android.gms@242632016@24.26.32 (040700-650348549):3)
at yrc.i(:com.google.android.gms@242632016@24.26.32 (040700-650348549):19)
at yrc.fc(:com.google.android.gms@242632016@24.26.32 (040700-650348549):1347)
at ocs.onTransact(:com.google.android.gms@242632016@24.26.32 (040700-650348549):97)
at android.os.Binder.transact(Binder.java:499)
at biqs.onTransact(:com.google.android.gms@242632016@24.26.32 (040700-650348549):10)
at android.os.Binder.transact(Binder.java:499)
at bbai.onTransact(:com.google.android.gms@242632016@24.26.32 (040700-650348549):148)
at android.os.Binder.execTransact(Binder.java:565)
2024-08-18 08:42:47.204 1966-2623 AuthPII com.google.android.gms.persistent E [RequestTokenManager] getToken() -> BAD_AUTHENTICATION. App: com.stevdzasan.onetapcompose, Service: oauth2:openid
amuc: Long live credential not available.
at ubm.a(:com.google.android.gms@242632016@24.26.32 (040700-650348549):971)
at ubs.b(:com.google.android.gms@242632016@24.26.32 (040700-650348549):28)
at ubq.a(:com.google.android.gms@242632016@24.26.32 (040700-650348549):623)
at tux.j(:com.google.android.gms@242632016@24.26.32 (040700-650348549):3)
at yrc.i(:com.google.android.gms@242632016@24.26.32 (040700-650348549):19)
at yrc.fc(:com.google.android.gms@242632016@24.26.32 (040700-650348549):1347)
at ocs.onTransact(:com.google.android.gms@242632016@24.26.32 (040700-650348549):97)
at android.os.Binder.transact(Binder.java:499)
at biqs.onTransact(:com.google.android.gms@242632016@24.26.32 (040700-650348549):10)
at android.os.Binder.transact(Binder.java:499)
at bbai.onTransact(:com.google.android.gms@242632016@24.26.32 (040700-650348549):148)
at android.os.Binder.execTransact(Binder.java:565)
2024-08-18 08:42:47.208 1966-1984 AuthPII com.google.android.gms.persistent E [RequestTokenManager] getToken() -> BAD_AUTHENTICATION. App: com.stevdzasan.onetapcompose, Service: oauth2:openid
amuc: Long live credential not available.
at ubm.a(:com.google.android.gms@242632016@24.26.32 (040700-650348549):971)
at ubs.b(:com.google.android.gms@242632016@24.26.32 (040700-650348549):28)
at ubq.a(:com.google.android.gms@242632016@24.26.32 (040700-650348549):623)
at tux.j(:com.google.android.gms@242632016@24.26.32 (040700-650348549):3)
at yrc.i(:com.google.android.gms@242632016@24.26.32 (040700-650348549):19)
at yrc.fc(:com.google.android.gms@242632016@24.26.32 (040700-650348549):1347)
at ocs.onTransact(:com.google.android.gms@242632016@24.26.32 (040700-650348549):97)
at android.os.Binder.transact(Binder.java:499)
at biqs.onTransact(:com.google.android.gms@242632016@24.26.32 (040700-650348549):10)
at android.os.Binder.transact(Binder.java:499)
at bbai.onTransact(:com.google.android.gms@242632016@24.26.32 (040700-650348549):148)
at android.os.Binder.execTransact(Binder.java:565)
2024-08-18 08:42:47.212 1966-2721 AuthPII com.google.android.gms.persistent E [RequestTokenManager] getToken() -> BAD_AUTHENTICATION. App: com.stevdzasan.onetapcompose, Service: oauth2:openid
amuc: Long live credential not available.
at ubm.a(:com.google.android.gms@242632016@24.26.32 (040700-650348549):971)
at ubs.b(:com.google.android.gms@242632016@24.26.32 (040700-650348549):28)
at ubq.a(:com.google.android.gms@242632016@24.26.32 (040700-650348549):623)
at tux.j(:com.google.android.gms@242632016@24.26.32 (040700-650348549):3)
at yrc.i(:com.google.android.gms@242632016@24.26.32 (040700-650348549):19)
at yrc.fc(:com.google.android.gms@242632016@24.26.32 (040700-650348549):1347)
at ocs.onTransact(:com.google.android.gms@242632016@24.26.32 (040700-650348549):97)
at android.os.Binder.transact(Binder.java:499)
at biqs.onTransact(:com.google.android.gms@242632016@24.26.32 (040700-650348549):10)
at android.os.Binder.transact(Binder.java:499)
at bbai.onTransact(:com.google.android.gms@242632016@24.26.32 (040700-650348549):148)
at android.os.Binder.execTransact(Binder.java:565)
2024-08-18 08:42:47.224 12107-12107 OneTapCompose com.stevdzasan.onetapcompose E GetCredentialException: androidx.credentials.exceptions.NoCredentialException: During begin sign in, failure response from one tap: 16: [28433] Cannot find a matching credential.
2024-08-18 08:42:47.224 12107-12107 MainActivity com.stevdzasan.onetapcompose D androidx.credentials.exceptions.NoCredentialException: During begin sign in, failure response from one tap: 16: [28433] Cannot find a matching credential.
"Cannot find a matching credential" message indicates that no Google account is available on the device.
"Cannot find a matching credential" message indicates that no Google account is available on the device.
we have 5 existing google accounts on the sample device
You should't catch exception with message 'No credentials available'. When i did't login any google account, it throw a exception message 'During begin sign in, failure response from one tap: 16: [28433] Cannot find a matching credential.' and the exception type is NoCredentialException. Plz fix your exception catch.
![image](https://github.com/user-attachments/assets/a79b38e6-5b11-4e8f-a9db-515bc4417d88)