抖动中发生了网络错误(例如超时,连接中断或主机无法访问)

时间:2019-06-20 12:12:41

标签: flutter firebase-authentication general-network-error

我正在颤抖,除了今天,一切都运转良好。现在,每当我尝试登录时,都会出现以下错误: 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]

我尝试了一切,用Google搜索了一切,但这很奇怪。由于该代码以前可以运行,但是在我的系统上不起作用。我猜我的模拟器存在一些问题。 检查了模拟器的日期,很好。

这是我的登录代码:

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 Doctor报告:

[✓] 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

0 个答案:

没有答案