1

我正在使用颤振,除了今天,一切都运行良好。现在,每当我尝试登录时,都会收到此错误消息:我的 iOS 模拟器上的 FIREBASE 发生网络错误(例如超时、连接中断或无法访问的主机)。

这是我的控制台中抛出的错误:

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=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    "LocalDataTask <59EA3048-54FD-41F4-87FF-4919A55A9E06>.<1>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <59EA3048-54FD-41F4-87FF-4919A55A9E06>.<1>, NSLocalizedDescription=cancelled} [-999]

我已经尝试了一切,用谷歌搜索了一切,但这很奇怪。由于代码以前可以工作,但不能在我的系统上工作。我想我的模拟器有一些问题。检查了我的模拟器的日期,没问题。

这是我的登录代码:

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

颤振医生报告:

[✓] Flutter (Channel master, v1.5.9-pre.194, on Mac OS X 10.14.5 18F132, locale en-US)
    • Flutter version 1.5.9-pre.194 at /Users/alok/flutter
    • Framework revision 3436e165c8 (6 weeks ago), 2019-05-09 10:37:34 -0700
    • Engine revision 644db5a49c
    • Dart version 2.3.1 (build 2.3.1-dev.0.0 a0290f823c)


[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/alok/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.0, Build version 10A255
    • ios-deploy 1.9.4
    • CocoaPods version 1.6.0

[!] Android Studio (version 3.4)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
Aloks-MacBook-Air:newmonkapp alok$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v1.5.9-pre.194, on Mac OS X 10.14.5 18F132, locale en-US)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.0)
[!] 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 (1 available)

! Doctor found issues in 1 category.

还遇到了上述错误中包含的此错误:

遇到网络错误。代码,错误:-999,错误域=NSURLErrorDomain 代码=-999 “取消” UserInfo={NSErrorFailingURLStringKey= https://play.googleapis.com/log , NSErrorFailingURLKey= https://play.googleapis.com/log , _NSURLErrorRelatedURLSessionTaskErrorKey =( "LocalUploadTask .<1>" ), _NSURLErrorFailingURLSessionTaskErrorKey=LocalUploadTask .<1>, NSLocalizedDescription=cancelled} 5.16.0 - [GULNetwork][I-NET901017] 遇到网络错误。代码,错误:-999,错误域=NSURLErrorDomain 代码=-999 “取消” UserInfo={NSErrorFailingURLStringKey= https://play.googleapis.com/log , NSErrorFailingURLKey= https://play.googleapis.com/log, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalUploadTask .<1>" ), _NSURLErrorFailingURLSessionTaskErrorKey=LocalUploadTask .<1>, NSLocalizedDescription=cancelled} 5.16.0 - [Firebase/Core][I-COR000020] 发布到 Clearcut 时出错:错误域 = NSURLErrorDomain 代码 = -999 “取消” UserInfo={NSErrorFailingURLStringKey= https://play.googleapis.com/log , NSErrorFailingURLKey= https://play.googleapis.com/log , _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalUploadTask .<1>" ), _NSURLErrorFailingURLSessionTaskErrorKey= LocalUploadTask .<1>,NSLocalizedDescription=cancelled},状态码:0

4

1 回答 1

0

我也遇到了类似的问题,但这与我使用的 Firebase 插件的版本无关。我这边的问题是由 Google Cloud Console 上配置的受限 API 密钥引起的:https://console.cloud.google.com/apis/credentials?project=[PROJECT_ID]

于 2021-09-16T15:14:36.737 回答