简体   繁体   English

com.google.firebase.FirebaseException:发生内部错误。 [ CONFIGURATION_NOT_FOUND ]

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

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.我曾尝试搜索CONFIGURATION_NOT_FOUND但我无法在 firebase 文档中找到它。 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:在使用 firebase 进行身份验证之前,通过 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.在 firebase 控制台中启用了 Google 登录方法。 yes I have found a duplicate of this answer but has 0 answers and one unanswered comment 5 months ago.是的,我找到了这个答案的副本,但 5 个月前有 0 个答案和一个未回答的评论。

Check if you enabled the authentication type you want in the firebase console.检查您是否在 firebase 控制台中启用了所需的身份验证类型。

在此处输入图片说明

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?您是否检查过 Android 应用google-services.json文件中的project_id与启用 Google 登录身份验证的 Firebase 项目相同? If that is the case and you have not edited the google-services.json file, you can file a support ticket to Firebase.如果是这种情况,并且您尚未编辑 google-services.json 文件,则可以向 Firebase 提交支持请求。

Enabling Sign-in method (email/password in my case) in Firebase project dashboard fixed the issue for me.在 Firebase 项目仪表板中启用登录方法(在我的情况下为电子邮件/密码)为我解决了这个问题。

在此处输入图片说明

如果您的 Firebase 一个项目包含多个应用程序,则从 app->setting->google-service.json 下载 google-service.json 文件,然后添加到您的 android studio 项目中。

只需前往 firebase 中的项目设置并启用电子邮件/密码身份验证

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.这发生在我在 Mac M1 上的 Android 模拟器中使用 Flutter 开发应用程序时,发生的情况是我的 Android 模拟器上的日期和时间完全没有了。 A cold boot reset the date and time and the Firebase exception issue was solved.冷启动重置了日期和时间,Firebase 异常问题得到解决。

some people have like google-services (4).json in their project.有些人在他们的项目中喜欢google-services (4).json rename the file to google-services.json and you will be fine将文件重命名为google-services.json就可以了

I was having the same issue with my MacBook with M1 chip my emulator date and time were not correct.我的带有 M1 芯片的 MacBook 遇到了同样的问题,我的模拟器日期和时间不正确。 Setting up them manually saved my day.手动设置它们节省了我的一天。

for my case, check the appIdSuffix.对于我的情况,请检查 appIdSuffix。 is the suffix already on Apps in firebase /settings/general page? firebase /settings/general 页面中的应用程序上是否已经有后缀? the google-services.json should contain it suffix google-services.json 应该包含它的后缀

additional: if you already have existing build(app/build folder and so on), remove it first附加:如果您已经有现有的构建(app/build 文件夹等),请先将其删除

This error appears if you have not clicked through the interstitial hero in the admin UI.如果您没有在管理 UI 中点击插页英雄,就会出现此错误。 Simply go to the "Authentication" tab of your project and click "Get Started".只需 go 到项目的“身份验证”选项卡,然后单击“开始”。 If you are using custom authentication, no further configuration is required;如果您使用自定义身份验证,则无需进一步配置; Google simply fails to properly initialize your project at first. Google 一开始根本无法正确初始化您的项目。

(Thanks to @Lahiru Chandima for the pointer.) (感谢@Lahiru Chandima的指点。)

Please check in /android/build.gradle:请检查/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). google-services 的版本是否是最新的(如果您使用该库,请访问https://rnfirebase.io/查看最新版本)。 Update google-services to the newest that solve my problem.将 google-services 更新到解决我问题的最新版本。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 firebase:CONFIGURATION_NOT_FOUND - firebase : CONFIGURATION_NOT_FOUND Firebase 代码 400“消息”:“CONFIGURATION_NOT_FOUND” - Firebase code 400 "message": "CONFIGURATION_NOT_FOUND" 身份工具包 API 配置返回“CONFIGURATION_NOT_FOUND” - Identity Toolkit API config returns "CONFIGURATION_NOT_FOUND" Datastream 故障排除:“发生未知错误。请重试。如果错误仍然存在,请联系 Google 支持” - Datastream Troubleshoot: "An unknown error occurred. Please try again. If the error persists, contact Google support" Flutter 错误:(getGoogleApiForMethod() 返回 Gms:com.google.firebase.auth.api.internal.zzaq@3e2567) - Flutter Error:(getGoogleApiForMethod() returned Gms: com.google.firebase.auth.api.internal.zzaq@3e2567) Firebase 错误消息 - 文档已移动 https://fcm.googleapis.com/batch?google_abuse=GOOGLE_ABUSE_EXEMPTION - Firebase Error Message - The document has moved https://fcm.googleapis.com/batch?google_abuse=GOOGLE_ABUSE_EXEMPTION 找不到 com.google.android.gms.providerinstaller.dynamite 的本地模块描述符 class。 Flutter Firebase - Local module descriptor class for com.google.android.gms.providerinstaller.dynamite not found. Flutter Firebase W/DynamiteModule:找不到 com.google.firebase.auth 的本地模块描述符类 - W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found 错误:System.InvalidOperationException:IDX20803:无法从以下位置获取配置:'https://securetoken.google.com - Error : System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'https://securetoken.google.com Bigquery 发生内部错误,无法完成请求。 错误:60909208 - Bigquery An internal error occurred and the request could not be completed. Error: 60909208
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM