0

我一直在 Macbook 上为 IOS 构建我的应用程序。物理 Iphone 上的构建和安装成功。但是一旦调用 Firebase_Auth.verifyPhoneNr(),它就会一直崩溃而没有任何错误消息。然后我切换到颤振 beta 通道,我终于在控制台中得到了一些东西:

error:  invalid compressed data to inflate /Users/*user*/flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk_product/vm_outline_strong.dill
file #3:  bad zipfile offset (local header sig):  553391
file #4:  bad zipfile offset (local header sig):  3196642

Oops; flutter has exited unexpectedly: "ProcessException: The command failed
  Command: unzip -o -q /Users/*user*/flutter/bin/cache/downloads/storage.googleapis.com/flutter_infra/flutter/9a28c3bcf40ce64fee61e807ee3e1395fd6bd954/flutter_patched_sdk_product.zip -d /Users/*user*/flutter/bin/cache/artifacts/engine/common".
A crash report has been written to /Users/*user*/Documents/GitHub/*Project*/flutter_01.log.

我已经运行了flutter clean,但没有解决问题。我不确定这是颤振框架中的一个错误,还是我的一些操作系统问题。

4

2 回答 2

0

根据要求,这是代码片段。

我怀疑这是我的代码。在 android 上一切正常。切换到测试版也解决了我遇到的另一个错误:https ://github.com/flutter/flutter/issues/39032

 FirebaseAuth _auth = FirebaseAuth.instance;
    ProgressDialog loadingDialog =
        ProgressDialog(context, isDismissible: false);
    loadingDialog.style(
      message: "Überprüfe Nummer",
      progressWidget: Container(
          padding: EdgeInsets.all(10), child: CircularProgressIndicator()),
    );
    await loadingDialog.show();
    await _auth.verifyPhoneNumber( //Crash happens here.
      phoneNumber: normalizedPhoneNr,
      timeout: Duration(seconds: 30),
      verificationCompleted: (_credentials) async {
        await _auth.signInWithCredential(_credentials);
        await loadingDialog.hide();
      },
      verificationFailed: (AuthException authException) {
        loadingDialog.hide();
        return Flushbar(
          message: authException.message,
          backgroundColor: Colors.red,
          duration: Duration(seconds: 8),
        )..show(context);
      },
      codeSent: null,
      codeAutoRetrievalTimeout: (_verID) async {
        await loadingDialog.hide();
        await Navigator.push(
          context,
          MaterialPageRoute(
            builder: (context) => VerificationCodeEnterPage(_verID),
          ),
        );
      },
于 2020-06-16T06:11:10.850 回答
0

我挖得更深一点:

Fatal Exception: NSInternalInconsistencyException
0  CoreFoundation                 0x1baed8164 __exceptionPreprocess
1  libobjc.A.dylib                0x1babecc1c objc_exception_throw
2  CoreFoundation                 0x1badc7bb8 -[NSCache init]
3  Runner                         0x10486ad14 -[FIRPhoneAuthProvider verifyPhoneNumber:UIDelegate:completion:] + 130 (FIRPhoneAuthProvider.m:130)
4  Runner                         0x104ab8550 -[FLTFirebaseAuthPlugin handleMethodCall:result:] + 350 (FLTFirebaseAuthPlugin.m:350)
5  Flutter                        0x10583f830 (Fehlt)
6  Flutter                        0x10532f750 (Fehlt)
7  Flutter                        0x1055e9fbc (Fehlt)
8  Flutter                        0x105337ea8 (Fehlt)
9  Flutter                        0x105339b20 (Fehlt)
10 CoreFoundation                 0x1bae53efc __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__
11 CoreFoundation                 0x1bae53c14 __CFRunLoopDoTimer
12 CoreFoundation                 0x1bae53288 __CFRunLoopDoTimers
13 CoreFoundation                 0x1bae4dfe0 __CFRunLoopRun
14 CoreFoundation                 0x1bae4d660 CFRunLoopRunSpecific
15 GraphicsServices               0x1c525e604 GSEventRunModal
16 UIKitCore                      0x1bf02215c UIApplicationMain
17 Runner                         0x1047f8aa0 main + 6 (AppDelegate.swift:6)
18 libdyld.dylib                  0x1bacc91ec start

我只需将我的 Firebase 项目的 URL 添加到 Info.plist。

于 2020-06-17T17:13:33.487 回答