0

I've been building my App for IOS on a Macbook. The build and installation on a physical Iphone was successfull. But it kept crashing without any error message as soon as Firebase_Auth.verifyPhoneNr() was called. I then switched to flutters beta channel and there I finally got something in the console:

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.

I already run flutter clean which didn't resolve the issue. I am not sure if this is an bug within the flutter framework or just some OS problem on my end.

Xentrax
  • 81
  • 3
  • 9
  • While Flutter beta is still tested, it's not as the stable channel. Changing to beta (or any of the other channels) should really only be done if the current channel doesn't meet your needs. Your error is _likely_ an issue with your code. I recommend that you change back to stable and share your code with us. – Christopher Moore Jun 15 '20 at 21:55

2 Answers2

0

As requested, here is the code snippet.

I doubt that it is my code. On android everything works fine. Switching to beta also resolved another error I had: 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),
          ),
        );
      },
Xentrax
  • 81
  • 3
  • 9
0

I digged a little deeper:

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

I just had to add the URL of my Firebase Project to the Info.plist.

Xentrax
  • 81
  • 3
  • 9