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

半城伤御伤魂 提交于 2021-02-07 12:17:13

问题


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.


回答1:


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.




回答2:


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




回答3:


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




回答4:


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.



来源:https://stackoverflow.com/questions/41124178/com-google-firebase-firebaseexception-an-internal-error-has-occurred-configu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!