简体   繁体   English

无法在模拟器上获取 FIS 身份验证令牌

[英]Failed to get FIS auth token on emulator

Im using firebase for sending notification.我使用 firebase 发送通知。

my version of firebase-messages is:我的 firebase-messages 版本是:

implementation ("com.google.firebase:firebase-messaging:20.0.0") 

I configure my firebase with google-service.json我用google-service.json配置我的 firebase

The weird issue that when I run my app on the emulator on browserstack I get this error: Failed to get FIS auth token and java.util.concurrent.ExecutionException: com.google.firebase.installations.FirebaseInstallationsException奇怪的问题是,当我在browserstack上的模拟器上运行我的应用程序时,出现此错误: Failed to get FIS auth tokenjava.util.concurrent.ExecutionException: com.google.firebase.installations.FirebaseInstallationsException

it seems it comes from the installation它似乎来自安装

but when I run it on physical android device I don't get the error and I succeed to get Token... I checked only on one physical device.In addition I checked on like 10 different emulators devices (include my physical device just on emulator) and they all show the same error.但是当我在物理 android 设备上运行它时,我没有收到错误并且我成功获得了令牌......我只检查了一个物理设备。此外我检查了 10 种不同的仿真器设备(包括我的物理设备就在模拟器),它们都显示相同的错误。

I tried to change the firebase-messaging to version 20.1.0 but it didn't change anything... I don't understand what might be the issue for that especially that it worked before and I didn't change anything and why it happens only on emulator and not on physical device我试图将 firebase firebase-messaging更改为20.1.0版,但它没有改变任何东西......我不明白这可能是什么问题,特别是它之前工作并且我没有改变任何东西以及为什么它只发生在模拟器上而不发生在物理设备上

From my understanding, BrowserStack offers real devices.据我了解,BrowserStack 提供真实设备。 In case the issue doesn't appear on a local device, I would suggest reaching out to the BrowserStack Support team at support@browserstack.com and they should be able to throw some lights towards this.如果问题没有出现在本地设备上,我建议通过 support@browserstack.com 与 BrowserStack 支持团队联系,他们应该能够对此有所了解。

Solution 1解决方案 1

  1. If you made any changes inside the firebase console - Download and update google-services.json file from firebase console.如果您在 firebase 控制台中进行了任何更改 - 从 firebase 控制台下载并更新google-services.json文件。

Solution 2解决方案 2

  1. If You are using a Real device Check your Internet connection.如果您使用的是Real device检查您的 Internet 连接。

  2. If you are using android studio Emulator - Establish an internet connection by resetting the emulator.如果您使用的是 android 工作室Emulator - 通过重置模拟器建立互联网连接。

    2.1. 2.1。 Open Tools -> AVD manager打开Tools -> AVD manager

步骤 2.1

2.2. 2.2. Wipe Data of the emulator擦除模拟器的数据擦除模拟器2.2的数据

  1. Run Project using fresh emulator.使用全新的模拟器运行项目。

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

相关问题 E/FirebaseInstanceId:无法获取 FIS 身份验证令牌 - E/FirebaseInstanceId: Failed to get FIS auth token 在 Flutter Android 上获取 FIS 身份验证令牌失败 - Failed to get FIS auth token on Flutter Android Firebase 错误 - E/FirebaseInstanceId:无法在 Android Studio 中获取 FIS 身份验证令牌 - Firebase error- E/FirebaseInstanceId: Failed to get FIS auth token in Android Studio 反应本机 android,在尝试获取 firebase 消息设备令牌时得到 FIS_AUTH_ERROR - react native android, got FIS_AUTH_ERROR when trying to get firebase messaging device token FirebaseRemoteConfigClientException:Firebase 安装无法获取用于获取的安装授权令牌 - FirebaseRemoteConfigClientException: Firebase Installations failed to get installation auth token for fetch 身份验证令牌与〜/ .emulator_console_auth_token不匹配 - authentication token does not match ~/.emulator_console_auth_token java.io.IOException: FIS_AUTH_ERROR in Android Z03548EZFF48D09214119934 - java.io.IOException: FIS_AUTH_ERROR in Android Firebase 无法在flickr中获取身份验证令牌 - unable to get auth token in flickr 无法获取请求令牌 - Failed to get request Token Firebase Android 身份验证失败:expired_token(身份验证令牌已过期) - Firebase Android Authentication failed: expired_token (Auth token is expired)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM