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

13

57

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.

Malik answered 13/12, 2016 at 14:59 Comment(0)
A
19

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.

Anaphora answered 15/12, 2016 at 22:12 Comment(2)
Wow. This is a great answer. I had a different ID than project ID in console. Hope it will work now. Will updateMalik
Thank you. I have re-downloaded the play-services.json and it worked. Finally!Malik
Y
148

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

enter image description here

Youngyoungblood answered 15/6, 2019 at 20:8 Comment(5)
I was using signInWithCustomToken(), and just visiting the authentication page in firebase console and pressing on "Get Started" button was sufficient for me.Bakken
@LahiruChandima - nice!Passenger
Same. There's goes 2 hours of my day 🙄Barnum
No mention of this in the google docs. Thanks google!Downwind
Yup, get back to the Firebase console, hit Get Started and you're off to the races. Happy dev.Periphery
H
25

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

enter image description here

Hendecagon answered 15/1, 2021 at 10:2 Comment(0)
A
19

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.

Anaphora answered 15/12, 2016 at 22:12 Comment(2)
Wow. This is a great answer. I had a different ID than project ID in console. Hope it will work now. Will updateMalik
Thank you. I have re-downloaded the play-services.json and it worked. Finally!Malik
M
5

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

Masturbate answered 12/10, 2022 at 17:11 Comment(0)
K
4

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

Kobi answered 11/3, 2021 at 15:36 Comment(0)
I
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.

Ivelisseivens answered 19/11, 2021 at 16:9 Comment(2)
I have same issue and cold boot on M1 android is working! thanks a lot.Frulla
well you just saved me a few hours of pulling my hair out. Cheers!Mossberg
V
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.

Vespasian answered 11/5, 2017 at 12:31 Comment(0)
P
0

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

Piezoelectricity answered 26/12, 2021 at 15:36 Comment(0)
E
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.

Egan answered 8/2, 2022 at 7:8 Comment(0)
S
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

Stomatic answered 15/9, 2022 at 9:39 Comment(2)
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 How to Answer. And I try to avoid rhetoric questions. meta.#291862Cacophonous
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.Basseterre
F
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.

Formulaic answered 7/1, 2023 at 2:16 Comment(0)
S
0

Make sure you run the flutterfire configure command and follow the instructions

https://firebase.google.com/docs/flutter/setup

Shavon answered 12/6 at 6:6 Comment(0)
C
0

Might sound obvious but make sure your firebase SDK config that you set up in your app points to the correct project.

Firebase config SDK can be found at:

  1. Login to your firebase console on the browser
  2. Select project
  3. Gear --> project setting
  4. Scroll to SDK setup and configuration

Example of firabaseConfig:

const firebaseConfig = {
  apiKey: "make sure it points to the correct project",
  authDomain: "PROJECT_ID.firebaseapp.com",
  projectId: "PROJECT_ID",
  storageBucket: "PROJECT_ID.firebasestorage.app",
  messagingSenderId: "whatever",
  appId: "whatever"
};
Cleanup answered 6/11 at 4:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.