[英]firebase_messaging/unknown: An unknown error has occured on Flutter IOS
Everything was working fine before but now firebase can't seem to create a new token.之前一切正常,但现在 firebase 似乎无法创建新令牌。 I'm trying to call await FirebaseMessaging.instance.getToken();
我正在尝试调用await FirebaseMessaging.instance.getToken();
but getting this error但得到这个错误
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>
I'm using firebase_messaging: : ^10.0.9
我正在使用firebase_messaging: : ^10.0.9
My application is broken in production, I really need your help guys.我的应用程序在生产中出现问题,我真的需要你们的帮助。
This is my flutter doctor
这是我的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!
Also my app is just recently deployed and doesn't have more than 10 users, other can't seem to use the app due to this blocker.此外,我的应用程序是最近才部署的,用户不超过 10 个,其他人似乎由于这个拦截器而无法使用该应用程序。 Your help will be much appreciated.非常感谢您的帮助。
in my case I have different bundle identifier on Xcode and in Firebase Console.在我的例子中,我在 Xcode 和 Firebase 控制台上有不同的包标识符。
I have this issue after implementing Flavor on Flutter app.在 Flutter 应用程序上实施 Flavor 后,我遇到了这个问题。 the Bundle Identifier is created dynamically based on the scheme on my Xcode Bundle Identifier 是根据我的 Xcode 上的方案动态创建的
Make sure that your Flutter app targets iOS 8 or later.确保您的 Flutter 应用程序面向 iOS 8 或更高版本。 Please check this link below请检查下面的链接
https://firebase.google.com/docs/flutter/setup?platform=ios https://firebase.google.com/docs/flutter/setup?platform=ios
in some android and ios devices not receiving firbase base responce because of its versions and api level在某些 android 和 ios 设备中,由于其版本和 api 级别而未收到 firbase 基本响应
Oh!哦! my bad, I found the issue.我不好,我发现了问题。 My issue was a wrong api key of firebase in the GoogleServices-info.plist file我的问题是 GoogleServices-info.plist 文件中 firebase 的 api 密钥错误
Thanks for all the support you gave me.谢谢你给我的所有支持。
Turn out the error throw because I'm using a vpn app.因为我使用的是 vpn 应用程序,所以抛出错误。 Try to change your.network to a different.network then try again尝试将您的网络更改为不同的网络,然后重试
I resolved this issue by redownloading the GoogleService-Info.plist
from the firebase & replace the current file.我通过从 firebase 重新下载GoogleService-Info.plist
并替换当前文件解决了这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.