juliuscanute / qr_code_scanner

QR Code Scanner for Flutter
BSD 2-Clause "Simplified" License
984 stars 699 forks source link

[BUG] MLkit - Already running #373

Open bernaferrari opened 2 years ago

bernaferrari commented 2 years ago

PlatformException(ALREADY_RUNNING, Start cannot be called when already running, , null)

I'm getting that weird exception when hot restarting (not hot reloading) an app using MLKit. With QRView it works fine. Re-running works.

MLKitScanner(
      onError: (context, error) => Text(
        error.toString(),
        style: const TextStyle(color: Colors.red),
      ),
      qrCodeCallback: (code) {
        debugPrint('Code ${code.displayValue}');
      },
    )
Flutter 2.3.0-24.1.pre • channel beta • https://github.com/flutter/flutter.git
Framework • revision 615957513e (3 weeks ago) • 2021-06-25 09:24:44 -0700
Engine • revision 9d517f475b
Tools • Dart 2.14.0 (build 2.14.0-188.5.beta

Testing in a Galaxy S9 with Android 10.

Termtime commented 2 years ago

Same over here with a Samsung A31 running Android 10

jabirmayar commented 2 years ago

Same issue on android Samsung c9 pro. (Android 8.0)