获取令牌失败,消息:FIS_AUTH_ERROR

问题描述 投票:0回答:1

我正在使用 Expo 构建 2 个 Android 应用程序,并使用 1 个 Firebase 项目。 对于通知,我正在使用博览会通知。 我已将 Firebase 服务器密钥上传到 Expo

expo push:android:upload --api-key XXX-XXX-XXX
。 我在 firebase 项目设置中使用 Google Play Console 的 SHA-1 配置了 Android 应用程序凭据,然后下载了最新的
google-services.json
,然后放入
app.json
并设置路径
android.googleServicesFile : "./google-services.json"
。 我已将包名称 API Google Cloud Platform 配置为与
app.json
android.package
相同,与 Android App Firebase 项目设置包名称相同。 我已配置
SHA-1 Certificate Fingerprint
API Google Cloud Platform 和 Android App Firebase 项目设置,与 Google Play Console 中的
SHA-1 Certificate Fingerprint
相同。 我在 Google Cloud Platform 中启用了
Firebase Installation API
Firebase Cloud Messaging
FCM Registration API
Cloud Messaging
。 我在我的应用程序中设置了单用户登录,因此当用户进行新登录时,
usertoken
的过去将被重置为新令牌,另一个登录将被注销。 问题是,我的一个应用程序运行良好,而另一个应用程序出现错误,它说,
Fetching the token Failed, message : FIS_AUTH_ERROR
。 并且通知不会传递到损坏的应用程序。 请帮助我...

google-cloud-platform firebase-cloud-messaging google-cloud-messaging expo
1个回答
0
投票

根据我的经验,Firebase Installations SDK (FIS) 错误是由以下原因引起的:

  • google-services.json 和 Google Cloud Console 之间的 API 密钥不匹配。
  • 谷歌云控制台中列入白名单的应用程序指纹不匹配。您可以使用
    eas credentials
    检查应用程序的凭据。您可以检查当前应用程序指纹并将其添加到谷歌云控制台中的“白名单”中。
© www.soinside.com 2019 - 2024. All rights reserved.