当前位置: 首页 > 知识库问答 >
问题:

FirebaseApp已删除

章乐逸
2023-03-14

在我用fabric集成将应用程序更改为firebase Crashlytics之后,应用程序开始在HMS设备上崩溃,并出现如下错误。我没有任何问题与谷歌播放设备。我更改了google-service.json,之后可以跟踪崩溃信息。

implementation "com.google.firebase:firebase-messaging:20.1.0"
implementation "com.google.firebase:firebase-core:17.2.3"
implementation "com.google.firebase:firebase-config:19.1.2"
implementation "com.google.firebase:firebase-iid:20.0.2"

implementation('com.google.firebase:firebase-crashlytics:17.3.0') {
    transitive = true
}
implementation 'com.google.firebase:firebase-analytics:18.0.0'
implementation ("android.arch.work:work-firebase:1.0.0-alpha11")
2021-01-20 14:11:34.525 27076-27135/MY-APPLICATION W/Firebase-Installations: Error when communicating with the Firebase Installations server API. HTTP response: [403 Forbidden: {
      "error": {
        "code": 403,
        "message": "Requests from this Android client application MY-APPLICATION are blocked.",
        "status": "PERMISSION_DENIED",
        "details": [
          {
            "@type": "type.googleapis.com/google.rpc.ErrorInfo",
            "reason": "API_KEY_ANDROID_APP_BLOCKED",
            "domain": "googleapis.com",
            "metadata": {
              "service": "firebaseinstallations.googleapis.com",
              "consumer": "projects/651311591439"
            }
          }
        ]
      }
    }
    ]
2021-01-20 14:11:34.525 27076-27135/MY-APPLICATION W/Firebase-Installations: Firebase options used while communicating with Firebase server APIs: AIzaSyCFTn7-Nq2MuhBLaxtFteIHomgj-yaTtyU, upcall-7aaf6, 1:651311591439:android:06c16ecc4c04ca0b
2021-01-20 14:11:34.525 27076-27135/MY-APPLICATION E/Firebase-Installations: Firebase Installations can not communicate with Firebase server APIs due to invalid configuration. Please update your Firebase initialization process and set valid Firebase options (API key, Project ID, Application ID) when initializing Firebase.
2021-01-20 14:11:34.528 27076-27135/MY-APPLICATION I/QarthLog: [PatchStore] createDisableExceptionQarthFile
2021-01-20 14:11:34.528 27076-27135/MY-APPLICATION I/QarthLog: [PatchStore] create disable file for MY-APPLICATION uid is 10171
2021-01-20 14:11:34.529 27076-27176/MY-APPLICATION I/QarthLog: [PatchStore] createDisableExceptionQarthFile
2021-01-20 14:11:34.529 27076-27176/MY-APPLICATION I/QarthLog: [PatchStore] create disable file for MY-APPLICATION uid is 10171
2021-01-20 14:11:34.530 27076-27177/MY-APPLICATION I/QarthLog: [PatchStore] createDisableExceptionQarthFile
2021-01-20 14:11:34.530 27076-27177/MY-APPLICATION I/QarthLog: [PatchStore] create disable file for MY-APPLICATION uid is 10171
2021-01-20 14:11:34.531 27076-27178/MY-APPLICATION I/QarthLog: [PatchStore] createDisableExceptionQarthFile
2021-01-20 14:11:34.531 27076-27178/MY-APPLICATION I/QarthLog: [PatchStore] create disable file for MY-APPLICATION uid is 10171
    
    --------- beginning of crash
2021-01-20 14:11:34.531 27076-27176/MY-APPLICATION E/AndroidRuntime: FATAL EXCEPTION: firebase-installations-executor-3
    Process: MY-APPLICATION, PID: 27076
    java.lang.IllegalStateException: FirebaseApp was deleted
        at com.google.android.gms.common.internal.Preconditions.checkState(Unknown Source:29)
        at com.google.firebase.FirebaseApp.checkNotDeleted(FirebaseApp.java:438)
        at com.google.firebase.FirebaseApp.getApplicationContext(FirebaseApp.java:125)
        at com.google.firebase.installations.FirebaseInstallations.getMultiProcessSafePrefs(FirebaseInstallations.java:578)
        at com.google.firebase.installations.FirebaseInstallations.doNetworkCallIfNecessary(FirebaseInstallations.java:355)
        at com.google.firebase.installations.FirebaseInstallations.lambda$doRegistrationOrRefresh$2(FirebaseInstallations.java:351)
        at com.google.firebase.installations.FirebaseInstallations$$Lambda$4.run(Unknown Source:4)
        at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:929)
2021-01-20 14:11:34.532 27076-27180/MY-APPLICATION I/QarthLog: [PatchStore] createDisableExceptionQarthFile
2021-01-20 14:11:34.532 27076-27180/MY-APPLICATION I/QarthLog: [PatchStore] create disable file for MY-APPLICATION uid is 10171
2021-01-20 14:11:34.532 27076-27177/MY-APPLICATION E/AndroidRuntime: FATAL EXCEPTION: firebase-installations-executor-4
    Process: MY-APPLICATION, PID: 27076
    java.lang.IllegalStateException: FirebaseApp was deleted
        at com.google.android.gms.common.internal.Preconditions.checkState(Unknown Source:29)
        at com.google.firebase.FirebaseApp.checkNotDeleted(FirebaseApp.java:438)
        at com.google.firebase.FirebaseApp.getApplicationContext(FirebaseApp.java:125)
        at com.google.firebase.installations.FirebaseInstallations.getMultiProcessSafePrefs(FirebaseInstallations.java:578)
        at com.google.firebase.installations.FirebaseInstallations.doNetworkCallIfNecessary(FirebaseInstallations.java:355)
        at com.google.firebase.installations.FirebaseInstallations.lambda$doRegistrationOrRefresh$2(FirebaseInstallations.java:351)
        at com.google.firebase.installations.FirebaseInstallations$$Lambda$4.run(Unknown Source:4)
        at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:929)
2021-01-20 14:11:34.533 27076-27135/MY-APPLICATION E/AndroidRuntime: FATAL EXCEPTION: firebase-installations-executor-2
    Process: MY-APPLICATION, PID: 27076
    java.lang.IllegalStateException: FirebaseApp was deleted
        at com.google.android.gms.common.internal.Preconditions.checkState(Unknown Source:29)
        at com.google.firebase.FirebaseApp.checkNotDeleted(FirebaseApp.java:438)
        at com.google.firebase.FirebaseApp.getApplicationContext(FirebaseApp.java:125)
        at com.google.firebase.installations.FirebaseInstallations.insertOrUpdatePrefs(FirebaseInstallations.java:401)
        at com.google.firebase.installations.FirebaseInstallations.doNetworkCallIfNecessary(FirebaseInstallations.java:374)
        at com.google.firebase.installations.FirebaseInstallations.lambda$doRegistrationOrRefresh$2(FirebaseInstallations.java:351)
        at com.google.firebase.installations.FirebaseInstallations$$Lambda$4.run(Unknown Source:4)
        at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:929)
2021-01-20 14:11:34.536 981-27179/? I/QarthDisFileCreator: pattern not match
2021-01-20 14:11:34.538 981-27181/? I/QarthDisFileCreator: pattern not match
2021-01-20 14:11:34.538 981-27184/? I/QarthDisFileCreator: pattern not match
2021-01-20 14:11:34.538 27076-27183/MY-APPLICATION I/QarthLog: [PatchStore] createDisableExceptionQarthFile
2021-01-20 14:11:34.538 27076-27183/MY-APPLICATION I/QarthLog: [PatchStore] create disable file for MY-APPLICATION uid is 10171
2021-01-20 14:11:34.539 27076-27178/MY-APPLICATION E/AndroidRuntime: FATAL EXCEPTION: firebase-installations-executor-5
    Process: MY-APPLICATION, PID: 27076
    java.lang.IllegalStateException: FirebaseApp was deleted
        at com.google.android.gms.common.internal.Preconditions.checkState(Unknown Source:29)
        at com.google.firebase.FirebaseApp.checkNotDeleted(FirebaseApp.java:438)
        at com.google.firebase.FirebaseApp.getApplicationContext(FirebaseApp.java:125)
        at com.google.firebase.installations.FirebaseInstallations.getMultiProcessSafePrefs(FirebaseInstallations.java:578)
        at com.google.firebase.installations.FirebaseInstallations.doNetworkCallIfNecessary(FirebaseInstallations.java:355)
        at com.google.firebase.installations.FirebaseInstallations.lambda$doRegistrationOrRefresh$2(FirebaseInstallations.java:351)
        at com.google.firebase.installations.FirebaseInstallations$$Lambda$4.run(Unknown Source:4)
        at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:929)
2021-01-20 14:11:34.539 27076-27180/MY-APPLICATION E/AndroidRuntime: FATAL EXCEPTION: firebase-installations-executor-6
    Process: MY-APPLICATION, PID: 27076
    java.lang.IllegalStateException: FirebaseApp was deleted
        at com.google.android.gms.common.internal.Preconditions.checkState(Unknown Source:29)
        at com.google.firebase.FirebaseApp.checkNotDeleted(FirebaseApp.java:438)
        at com.google.firebase.FirebaseApp.getApplicationContext(FirebaseApp.java:125)
        at com.google.firebase.installations.FirebaseInstallations.getMultiProcessSafePrefs(FirebaseInstallations.java:578)
        at com.google.firebase.installations.FirebaseInstallations.doNetworkCallIfNecessary(FirebaseInstallations.java:355)
        at com.google.firebase.installations.FirebaseInstallations.lambda$doRegistrationOrRefresh$2(FirebaseInstallations.java:351)
        at com.google.firebase.installations.FirebaseInstallations$$Lambda$4.run(Unknown Source:4)
        at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:929)
2021-01-20 14:11:34.540 981-27182/? I/QarthDisFileCreator: pattern not match
2021-01-20 14:11:34.540 981-27186/? I/QarthDisFileCreator: pattern not match
2021-01-20 14:11:34.540 27076-27183/MY-APPLICATION E/AndroidRuntime: FATAL EXCEPTION: firebase-installations-executor-7
    Process: MY-APPLICATION, PID: 27076
    java.lang.IllegalStateException: FirebaseApp was deleted
        at com.google.android.gms.common.internal.Preconditions.checkState(Unknown Source:29)
        at com.google.firebase.FirebaseApp.checkNotDeleted(FirebaseApp.java:438)
        at com.google.firebase.FirebaseApp.getApplicationContext(FirebaseApp.java:125)
        at com.google.firebase.installations.FirebaseInstallations.getMultiProcessSafePrefs(FirebaseInstallations.java:578)
        at com.google.firebase.installations.FirebaseInstallations.doNetworkCallIfNecessary(FirebaseInstallations.java:355)
        at com.google.firebase.installations.FirebaseInstallations.lambda$doRegistrationOrRefresh$2(FirebaseInstallations.java:351)
        at com.google.firebase.installations.FirebaseInstallations$$Lambda$4.run(Unknown Source:4)
        at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:929)

共有1个答案

林雅畅
2023-03-14

Firebase Crashlytics不依赖于GMS,但如果您正在使用任何其他依赖于GMS的服务,请使用替代HMS服务。此外,华为有自己的AG connect崩溃服务。您可以集成HMS崩溃,详情请参阅以下文档

另外,如果您最近更改了google-services.json文件,请尝试从android project中删除build文件夹并重新构建。

 类似资料:
  • 我遇到了一个与Firebase和JavaEE有关的问题。 我目前正在为我的项目编写一些Java servlet,我第一次使用Firebase是因为我想尝试一些新的东西。 我的实际问题如下:我得到了一个servlet,负责在用户数据库中交换iOS设备令牌。这是向设备发送远程推送通知所必需的。我在谷歌教程中也这样做过,但我得到了以下例外: 我访问Firebase数据库的方式是通过Java SDK。 我

  • 我不小心从~/.kube/config中删除了配置文件。每个 kubectl 命令都由于缺少配置而失败。 示例: 与服务器localhost:8080的连接被拒绝-是否指定了正确的主机或端口? 我已经使用以下方式安装了k3s: 和kubectl使用: 有人知道如何解决这个问题吗?

  • 我正在运行一个Yii2应用程序。今天我遇到了一个问题,至少有250个条目的整个表都是空的。该表由文件信息条目(原始文件名、新文件名)组成。因此,每个条目在逻辑上都链接到文件系统中的一个文件。我检查了文件系统的文件,发现文件也被删除了。因此,我得出结论,数据在yii2应用程序中被删除。我有一个操作将被调用(POST)来删除一个条目。 我为它做了一种通用函数: 在视图中,我有一个带有操作列的文件附件列

  • 我正在尝试将一些Symfony 3代码重构为Symfony 4。 我得到以下错误时,试图登录: 编译容器时,“monolog.logger.db”服务或别名已被删除或内联。您应该将其公开,或者停止直接使用conta iner,改用依赖项注入。 我的日志代码: 独白配置: app.monolog.db_handler config(注意,我在这里尝试了,但没有影响: 我怎样才能在Symfony 4中

  • 我在Visual Studio2019中有一个Xamarin表单解决方案。我现在只使用Android版本。完整的错误是: 在此进程中,java.lang.IllegalStateException Message=Default FirebaseApp未初始化AppCardView.Sample.android。确保首先调用FirebaseApp.InitializeApp(上下文)。 在我的An

  • 我希望管理员创建用户。但这将是在客户端,因为会有很多管理员,我不想让那么多人访问我的Firebase控制台。这就是为什么我不想使用Firebase管理SDK。 我找了很多地方,找到了这个。下面是代码: 因此,您可以创建两个不同的Firebase Auth对象,例如: 现在,在onCreate中,您可以将它们初始化为: 要获取ProjectID、WebAPI密钥,您可以转到Firebase项目控制台