You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Firebase AppCheck随机拦截部分用户请求致应用故障求助

Firebase AppCheck 随机拦截Google Play版本应用的数据库请求,导致大量用户卸载

近期收到大量用户反馈应用无法正常使用,已造成每周超200用户卸载。排查后确认是Firebase AppCheck拦截了用户的数据库访问请求,服务器返回错误并强制断开连接,日志信息如下:

Firebase Database connection was forcefully killed by the server. Will not attempt reconnect. Reason: Invalid appcheck token

目前问题呈现随机性,且仅在从Google Play商店安装的版本中出现,部分设备测试则完全正常,我已在自己的设备上复现该问题。

已尝试的排查步骤:

  • 升级Firebase SDK到最新BOM版本(32.7.3),问题仍存在
  • 严格按照官方文档在Application类中初始化Firebase AppCheck
  • 排查AppCheck配置,未发现明显错误

当前使用的依赖:

implementation platform('com.google.firebase:firebase-bom:32.7.3')
implementation 'com.google.firebase:firebase-appcheck-playintegrity'
implementation 'com.google.firebase:firebase-appcheck-debug'

Application类中的初始化代码:

FirebaseApp.initializeApp(getApplicationContext());
FirebaseAppCheck firebaseAppCheck = FirebaseAppCheck.getInstance();
firebaseAppCheck.installAppCheckProviderFactory(
        PlayIntegrityAppCheckProviderFactory.getInstance());

我已附上显示未验证及无效请求的截图,多方排查后仍未找到确切解决方案,情况紧急,恳请社区协助定位问题原因并提供修复建议。

内容的提问来源于stack exchange,提问作者ismail alaoui

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.28 19:52:14