之前一切正常,但现在firebase似乎不能创建新的令牌。我正在尝试调用await FirebaseMessaging.instance.getToken();
,但收到此错误
FLTFirebaseMessaging: An error occurred while calling method Messaging#getToken, errorOrNil => {
NSLocalizedFailureReason = "Too many server requests.";
}
[VERBOSE-2:ui_dart_state.cc(199)] Unhandled Exception: [firebase_messaging/unknown] An unknown error has occurred.
#0 MethodChannelFirebaseMessaging.getToken (package:firebase_messaging_platform_interface/src/method_channel/method_channel_messaging.dart:226:7)
<asynchronous suspension>
#1 _SignUpState._sendVerificationCode (package:shuri_parent/src/pages/sign_up.dart:343:25)
<asynchronous suspension>
#2 _SignUpState.build.<anonymous closure> (package:shuri_parent/src/pages/sign_up.dart:252:43)
<asynchronous suspension>
我正在使用firebase_messaging: : ^10.0.9
我的应用程序在生产中坏了,我真的需要你们的帮助。
这是我的flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 2.3.0-17.0.pre.121, on Mac OS X 10.15.7 19H1419
darwin-x64, locale en-RW)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] VS Code (version 1.61.0)
[✓] Connected device (2 available)
• No issues found!
此外,我的应用程序最近才部署,没有超过10个用户,其他人似乎无法使用该应用程序,因为这个拦截器。您的帮助我们将不胜感激。
发布于 2021-10-28 12:39:38
噢!我的错,我找到了问题所在。我的问题是GoogleServices-info.plist文件中的firebase api密钥错误
谢谢你给我的所有支持。
发布于 2021-10-27 10:48:07
确保您的Flutter应用程序以iOS 8或更高版本为目标。请检查下面的链接
https://firebase.google.com/docs/flutter/setup?platform=ios
在某些android和ios设备中,由于其版本和api级别原因,无法接收firbase响应
https://stackoverflow.com/questions/69735606
复制相似问题