0

I have the following code snippet to connect to Firebase

mAuth = FirebaseAuth.getInstance();

        GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
                .requestIdToken(getString(R.string.default_web_client_id))
                .requestEmail()
                .build();

        mGoogleSignInClient = GoogleSignIn.getClient(this, gso);

...

The error is pointing to : GoogleSignIn.getSignedInAccountFromIntent..

protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

            if (requestCode == RESULT_CODE_SIGNIN) {
                Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);
                try {
   

Error:

android.app.Activity.dispatchActivityResult(Activity.java:8110), android.app.ActivityThread.deliverResults(ActivityThread.java:4839), android.app.ActivityThread.handleSendResult(ActivityThread.java:4887), android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51), android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135), android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95), android.app.ActivityThread$H.handleMessage(ActivityThread.java:2017), android.os.Handler.dispatchMessage(Handler.java:107), android.os.Looper.loop(Looper.java:214), android.app.ActivityThread.main(ActivityThread.java:7397), java.lang.reflect.Method.invoke(Native Method), com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492), com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)]

I uploaded my app to the GooglePlaystore. When I downloaded it, the app opened up and when I tried to login, it keeps on asking me to select the gmail accounts signed in to my phone. I can't proceed. So I uninstalled it. I connected my phone to Android Studio and installed it and was able to login properly.

So what is the difference ? What is in my Playstore or in Firebase? How to fix this issue? My clients can't use it. Any help would be greatly appreciated.

padlanau
  • 257
  • 3
  • 11
  • For sure you are getting an Exception for that. Please look at your logcat and add it to your question. – Alex Mamo Mar 25 '21 at 11:45
  • Thanks @AlexMamo for the time. I have been watching some exceptions in the logcat actually and I have no clue how to fix it and if it is related. I created a ticket to Google Playstore of this issue I'm having. Anyway, have attached the one showing at logcat after I clicked on Google login. – padlanau Mar 26 '21 at 02:24

1 Answers1

0

I found the answer to this and it is now working:

search for Syed Umair: Google SignIn API Exception 10

padlanau
  • 257
  • 3
  • 11