com.google.firebase.FirebaseException: An internal error has occurred. [ CONFIGURATION_NOT_FOUND ]

65.5k Views Asked by At

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.

11

There are 11 best solutions below

2
On BEST ANSWER

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.

0
On

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.

0
On

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

0
On

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

0
On

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

enter image description here

0
On

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.

0
On

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.)

2
On

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
On

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

0
On

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.

5
On

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

enter image description here