Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: androidx.credentials.exceptions.NoCredentialException: No credentials available #659

Open
3 tasks done
Deorigami opened this issue Jul 14, 2024 · 5 comments
Open
3 tasks done
Labels
bug Something isn't working

Comments

@Deorigami
Copy link

General Info

  • I checked for similar bug report
  • I am using the latest version
  • I checked the troubleshooting page for similar problems

Version(s)

2.5.2

Kotlin Target(s) and their respective versions

2.0.0

What happened? (include your code)

I upgraded the version to 2.5.2 because i want to use Google Sign In on iOS but after upgrade from 2.5.0 this error appear on Android

when execute composeAuth.rememberSignInWithGoogle().startFlow()

Credential exception
androidx.credentials.exceptions.NoCredentialException: No credentials available
at androidx.credentials.CredentialProviderFrameworkImpl.convertToJetpackGetException$credentials_release(CredentialProviderFrameworkImpl.kt:276)
at androidx.credentials.CredentialProviderFrameworkImpl$onGetCredential$outcome$2.onError(CredentialProviderFrameworkImpl.kt:152)
at androidx.credentials.CredentialProviderFrameworkImpl$onGetCredential$outcome$2.onError(CredentialProviderFrameworkImpl.kt:143)
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(Unknown Source: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)

Steps To Reproduce (optional)

No response

Relevant log output (optional)

No response

@Deorigami Deorigami added the bug Something isn't working label Jul 14, 2024
@jan-tennert
Copy link
Collaborator

@Aaron246 This issue is probably caused by the Google Sign In change, any ideas?

@Aaron246
Copy link
Contributor

I don't think the change has anything to do with this.

@Deorigami can you please check all of these for your project:

  1. You have 2 credentials in google cloud console, one web application and one android.
    Screenshot 2024-07-15 000957
  2. You are using the client ID in web application (the first one in the above screenshot) for

install(ComposeAuth) {
googleNativeLogin(serverClientId = "google-client-id")
}

in your android project and in the supabase console here
Screenshot 2024-07-15 001736
3. The sha-1 certificate and package name in the android credential on the google cloud console (the second credential on google cloud console) is same as the app you are testing right now i.e. if you are testing on debug version or the release version make sure the respective sha-1 key is used in the google cloud console here :
Screenshot 2024-07-15 002616

If all of these are correct, the issue seems to be with the new Credential Manager API which is being used in ComposeAuth.

Lot of people are facing issues with the API you can see here.

@jan-tennert
Copy link
Collaborator

jan-tennert commented Jul 14, 2024

I upgraded the version to 2.5.2 because i want to use Google Sign In on iOS but after upgrade from 2.5.0 this error appear on Android

Just to clarify @Deorigami, does 2.5.0 work?

@Deorigami
Copy link
Author

@jan-tennert Yes 2.5.0 works well on android without this issue, i have to rollback to 2.5.0

@jan-tennert
Copy link
Collaborator

Hmm, just tried updating one of my old projects and it seems to work fine. Not sure what we can do on this issue other than referring to Google

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants