50

Ok so I get the following exception. No idea why it is happening. I have followed the guides how to set up auth for google account. I tried to search the google but no success of any solution for this. I haved tried to search for the CONFIGURATION_NOT_FOUND but I could not find it in the firebase docs. I don't know what configuration he can't find. Exception is basically useless. Signing in trough firebase is going great until authenticating it with firebase:

private void authenticateGoogleAccount(GoogleSignInAccount account) {
    AuthCredential credential = GoogleAuthProvider.getCredential(account.getIdToken(), null);
    mAuth.signInWithCredential(credential)
            .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
                @Override
                public void onComplete(@NonNull Task<AuthResult> task) {
                    if (!task.isSuccessful()) {
                        Log.w(TAG, "signInWithCredential", task.getException());
                        Toast.makeText(MainActivity.this, "Authentication failed.",
                                Toast.LENGTH_SHORT).show();
                    }
                    else {
                        Log.d(TAG, "signInWithCredential");
                    }
                }
            });
}

Google sign-in-method is enabled in the firebase console. yes I have found a duplicate of this answer but has 0 answers and one unanswered comment 5 months ago.

Community
  • 1
  • 1
parohy
  • 2,070
  • 2
  • 22
  • 38

11 Answers11

131

Check if you enabled the authentication type you want in the firebase console.

enter image description here

Aman
  • 2,316
  • 3
  • 17
  • 23
20

Enabling Sign-in method (email/password in my case) in Firebase project dashboard fixed the issue for me.

enter image description here

Ishan Hettiarachchi
  • 1,426
  • 2
  • 19
  • 31
18

Have you checked the project_id in your Android app google-services.json file is the same as the Firebase project for which you enabled Google Sign In Authentication? If that is the case and you have not edited the google-services.json file, you can file a support ticket to Firebase.

Jin Liu
  • 2,203
  • 15
  • 13
  • Wow. This is a great answer. I had a different ID than project ID in console. Hope it will work now. Will update – parohy Dec 16 '16 at 14:42
  • Thank you. I have re-downloaded the `play-services.json` and it worked. Finally! – parohy Dec 19 '16 at 12:35
4

just head to your project settings in firebase and enable email/password auth

4

This happened to me in an Android emulator on my Mac M1 developing an app in Flutter, what happened was that the date and time on my Android Emulator was completely out. A cold boot reset the date and time and the Firebase exception issue was solved.

2

This error appears if you have not clicked through the interstitial hero in the admin UI. Simply go to the "Authentication" tab of your project and click "Get Started". If you are using custom authentication, no further configuration is required; Google simply fails to properly initialize your project at first.

(Thanks to @Lahiru Chandima for the pointer.)

chrylis -cautiouslyoptimistic-
  • 75,269
  • 21
  • 115
  • 152
0

If your Firebase one project contail multiple application then download google-service.json file from app->setting->google-service.json and then add in your android studio project.

user7176550
  • 1,501
  • 14
  • 19
0

some people have like google-services (4).json in their project. rename the file to google-services.json and you will be fine

Adam Smaka
  • 5,977
  • 3
  • 50
  • 55
0

I was having the same issue with my MacBook with M1 chip my emulator date and time were not correct. Setting up them manually saved my day.

hamid saifi
  • 184
  • 2
  • 3
0

for my case, check the appIdSuffix. is the suffix already on Apps in firebase /settings/general page? the google-services.json should contain it suffix

additional: if you already have existing build(app/build folder and so on), remove it first

  • This is so hard to read I have trouble determining whether you attempt to answer or to ask for help. If you try to answer, please have a look at [answer]. And I try to avoid rhetoric questions. https://meta.stackoverflow.com/questions/291362/advice-for-non-native-english-speakers – Yunnosch Sep 15 '22 at 09:42
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Sep 20 '22 at 09:16
0

Please check in /android/build.gradle:

buildscript {
  dependencies {
    // ... other dependencies
    classpath 'com.google.gms:google-services:4.3.14'
  }
}

if the version of google-services is the newest or not (visit https://rnfirebase.io/ to see the newest version if you use that library). Update google-services to the newest that solve my problem.