gpt4 book ai didi

ios - 由于 Flutter 中的模拟器错误,退回到从 NSUserDefaults 加载访问 token

转载 作者:行者123 更新时间:2023-12-02 00:05:31 25 4
gpt4 key购买 nike

我已经厌倦了调试这个问题,但更准确地说,我无法找到任何完美的解决方案。

以前我的应用运行流畅,没有任何麻烦,但现在我在登录我的帐户时收到此错误。

可能的问题:这是 Firebase 问题,但模拟器无法在模拟器中存储 accessToken

我已经关注了这些问题:

  1. Falling back to loading/storing access token from NSUserDefaults because of simulator bug
  2. Falling back to loading access token from NSUserDefaults because of simulator bug

现在我的应用程序运行良好,但当我尝试登录时出现问题。我已经看到了解决方案,但根据上述研究,对我来说没有任何效果。

到目前为止我所做的是:

  1. Restarted the app
  2. Restarted my system, and tried to run the app
  3. Changed the version of the FIREBASE_CORE and FIREBASE_AUTH in my pubspec.yaml file
  4. Re-installed XCode. Same problem
  5. This is flutter firebase packages in my pubspec.yaml file
  • firebase_core:^0.3.0
  • firebase_auth:^0.8.0

尽管如此,事情还是一事无成。错误似乎是一致的。

登录代码:

final AuthCredential credential = EmailAuthProvider.getCredential(email: this.email.text, password: this.password.text);
this._auth.signInWithCredential(credential).then((user) async {
}, onError: (e){
Helpers.showError(context, (e as PlatformException).message);
});

错误:

<强>1。第一次运行应用程序时:

Launching lib/main.dart on iPhone 7 in debug mode...
Running Xcode build...

├─Assembling Flutter resources... 4.1s
└─Compiling, linking and signing... 7.0s
Xcode build done. 14.5s
Configuring the default Firebase app...
5.20.0 - [Firebase/Core][I-COR000004] App with name __FIRAPP_DEFAULT does not exist.
Configured the default Firebase app __FIRAPP_DEFAULT.
Falling back to loading access token from NSUserDefaults because of simulator bug
Falling back to storing access token in NSUserDefaults because of simulator bug
Falling back to loading access token from NSUserDefaults because of simulator bug
Falling back to storing access token in NSUserDefaults because of simulator bug
Falling back to loading access token from NSUserDefaults because of simulator bug
Falling back to storing access token in NSUserDefaults because of simulator bug
5.20.0 - [Firebase/Analytics][I-ACS023007] Analytics v.50801000 started
5.20.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled
flutter: in the main builder
flutter: in the init page state
flutter: building the init page
"LocalUploadTask <A98F1971-4A48-4CDD-8658-567C6E24AE0E>.<1>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalUploadTask <A98F1971-4A48-4CDD-8658-567C6E24AE0E>.<1>, NSLocalizedDescription=cancelled} [-999]
<Google/Utilities/Network/ERROR> Encounter network error. Code, error: -999, Error Domain=NSURLErrorDomain Code=-999 "cancelled" UserInfo={NSErrorFailingURLStringKey=https://play.googleapis.com/log, NSErrorFailingURLKey=https://play.googleapis.com/log, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalUploadTask <A98F1971-4A48-4CDD-8658-567C6E24AE0E>.<1>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalUploadTask <A98F1971-4A48-4CDD-8658-567C6E24AE0E>.<1>, NSLocalizedDescription=cancelled}
5.20.0 - [GULNetwork][I-NET901017] <Google/Utilities/Network/ERROR> Encounter network error. Code, error: -999, Error Domain=NSURLErrorDomain Code=-999 "cancelled" UserInfo={NSErrorFailingURLStringKey=https://play.googleapis.com/log, NSErrorFailingURLKey=https://play.googleapis.com/log, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalUploadTask <A98F1971-4A48-4CDD-8658-567C6E24AE0E>.<1>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalUploadTask <A98F1971-4A48-4CDD-8658-567C6E24AE0E>.<1>, NSLocalizedDescription=cancelled}
[C3.1.1 06A394ED-7FAF-45F0-ACCA-755A5E942EB5 ::1.56091<->::1.8080]
Connected Path: satisfied (Path is satisfied), interface: lo0
Duration: 1.659s, DNS @0.005s took 0.013s, TCP @0.038s took 0.001s, TLS took 0.316s
bytes in/out: 3907/808, packets in/out: 10/9, rtt: 0.000s, retransmitted packets: 0, out-of-order packets: 0


Your Facebook SDK is out of date. We recommend upgrading to the latest Version 4.37.0, to ensure your app's performance is not affected and to take advantage of our newest features!

Facebook SDK for iOS: https://developers.facebook.com/docs/ios/
Facebook SDK for Android: https://developers.facebook.com/docs/android/
[C2.1.1 D009F134-D0FD-41DF-BCB2-713CBD8875DF ::1.56090<->::1.8080]
Connected Path: satisfied (Path is satisfied), interface: lo0
Duration: 1.729s, DNS @0.005s took 0.023s, TCP @0.037s took 0.014s, TLS took 0.295s
bytes in/out: 4353/1054, packets in/out: 10/9, rtt: 0.000s, retransmitted packets: 0, out-of-order packets: 0
5.20.0 - [Firebase/Core][I-COR000020] Error posting to Clearcut: Error Domain=NSURLErrorDomain Code=-999 "cancelled" UserInfo={NSErrorFailingURLStringKey=https://play.googleapis.com/log, NSErrorFailingURLKey=https://play.googleapis.com/log, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalUploadTask <A98F1971-4A48-4CDD-8658-567C6E24AE0E>.<1>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalUploadTask <A98F1971-4A48-4CDD-8658-567C6E24AE0E>.<1>, NSLocalizedDescription=cancelled}, with Status Code: 0
flutter: building the init page
flutter: building the init page
[C4.1.1 09BF4681-8112-4F65-84AA-824DC0C0F7A3 ::1.56101<->::1.8080]
Connected Path: satisfied (Path is satisfied), interface: lo0
Duration: 0.622s, DNS @0.003s took 0.002s, TCP @0.020s took 0.001s, TLS took 0.148s
bytes in/out: 3761/1543, packets in/out: 9/10, rtt: 0.000s, retransmitted packets: 0, out-of-order packets: 0
flutter: Calling GET API: /init
Syncing files to device iPhone 7...
flutter: {token: null, is_user_active: false, user: null}
Syncing files to device iPhone 7... 4,586ms (!)

<强>2。当我尝试登录时:

Challenge SecTrustResultType 5 for www.googleapis.com, properties: (
{
type = error;
value = "Root certificate is not trusted.";
}
)
Cancelling authentication challenge for https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPassword?key=XXXXXXXXXXXXXXXXXXXXXX
"LocalDataTask <A48A2557-0E1B-4F61-8E54-B319538559DA>.<1>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <A48A2557-0E1B-4F61-8E54-B319538559DA>.<1>, NSLocalizedDescription=cancelled} [-999]

<强>3。 Firebase 抛出:

Network error (such as timeout, interrupted connection or unreachable host) has occurred

flutter 医生:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v1.7.9-pre.9, on Mac OS X 10.14.5 18F132, locale en-US)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 10.0)
[✓] iOS tools - develop for iOS devices
[✓] Chrome - develop for the web
[!] Android Studio (version 3.4)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] Connected device (3 available)

! Doctor found issues in 1 category.

接下来我可以尝试什么?

最佳答案

由于这是一个我们大多数人都不知道的错误,因此我决定自己编写它,因为我已经找到了解决方案。就这样吧。

我尝试了很多东西,但我和我的团队发现了一些东西,那就是 Firebase 软件包版本中有一些东西。我所做的是:

  1. Make a new project totally
  2. Connect it to firebase
  3. Use the current version firebase_auth 0.8.3
  4. And run the project, and make sure your login works
  5. When you are done, run the old project and see it will work.

可能性是所有项目的包通常存储在同一个文件中,因此执行 cat .packages 会给您带来想法。

谢谢,祝学习愉快!

关于ios - 由于 Flutter 中的模拟器错误,退回到从 NSUserDefaults 加载访问 token ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56733488/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com