flutter_barcode_scanner icon indicating copy to clipboard operation
flutter_barcode_scanner copied to clipboard

Unhandled Exception: MissingPluginException(No implementation found for method scanBarcode on channel flutter_barcode_scanner)

Open MateoSchultheis opened this issue 4 years ago • 5 comments

E/flutter (30297): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: MissingPluginException(No implementation found for method scanBarcode on channel flutter_barcode_scanner) E/flutter (30297): #0 MethodChannel._invokeMethod package:flutter/…/services/platform_channel.dart:154 E/flutter (30297): E/flutter (30297): #1 FlutterBarcodeScanner.scanBarcode package:flutter_barcode_scanner/flutter_barcode_scanner.dart:43 E/flutter (30297): E/flutter (30297): #2 _BotonesBusquedaWidgetState.scanQR package:prueba3_git/widgets/botones_busqueda_widget.dart:53 E/flutter (30297): E/flutter (30297):

This happens when in the MainActivity.kt file I change from FlutterActivity to FlutterFragmentActivity. I need it FlutterFragmentActivity to start session with biometric data

To Reproduce Steps to reproduce the behavior:

  1. I have a button that calls the method that scans
  2. qrScanRes = await FlutterBarcodeScanner.scanBarcode( "#ff6666", "Cancelar", true, ScanMode.QR); This is where it throws the aforementioned error

Expected behavior You should be able to open the viewfinder of the camera and be able to scan QR or barcode

Smartphone :

  • Device: Xiaomi MI9
  • OS: 11 RKQ1.200826.002

Sorry if the report is not right. If you need more information, I will gladly supply it.

MateoSchultheis avatar Jan 03 '22 19:01 MateoSchultheis

E/flutter (30297): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: MissingPluginException(No implementation found for method scanBarcode on channel flutter_barcode_scanner) E/flutter (30297): #0 MethodChannel._invokeMethod package:flutter/…/services/platform_channel.dart:154 E/flutter (30297): E/flutter (30297): #1 FlutterBarcodeScanner.scanBarcode package:flutter_barcode_scanner/flutter_barcode_scanner.dart:43 E/flutter (30297): E/flutter (30297): #2 _BotonesBusquedaWidgetState.scanQR package:prueba3_git/widgets/botones_busqueda_widget.dart:53 E/flutter (30297): E/flutter (30297):

This happens when in the MainActivity.kt file I change from FlutterActivity to FlutterFragmentActivity. I need it FlutterFragmentActivity to start session with biometric data

To Reproduce Steps to reproduce the behavior:

  1. I have a button that calls the method that scans
  2. qrScanRes = await FlutterBarcodeScanner.scanBarcode( "#ff6666", "Cancelar", true, ScanMode.QR); This is where it throws the aforementioned error

Expected behavior You should be able to open the viewfinder of the camera and be able to scan QR or barcode

Smartphone :

  • Device: Xiaomi MI9
  • OS: 11 RKQ1.200826.002

Sorry if the report is not right. If you need more information, I will gladly supply it.

did you have a hotfix?

kechankrisna avatar Jan 05 '22 16:01 kechankrisna

I fixed mine with: #128

In file FlutterBarcodeScannerPlugin.java

I've modified all reference to FlutterActivity to FlutterFragmentActivity and now it works.

This is a workaround that works for me.

alexprazeres avatar Feb 15 '22 01:02 alexprazeres

I fixed mine with: #128

In file FlutterBarcodeScannerPlugin.java I've modified all reference to FlutterActivity to FlutterFragmentActivity and now it works. This is a workaround that works for me.

Where can I find this file, FlutterBarcodeScannerPlugin.java please

wishwelloklu avatar Apr 27 '22 10:04 wishwelloklu

I fixed mine with: #128

In file FlutterBarcodeScannerPlugin.java I've modified all reference to FlutterActivity to FlutterFragmentActivity and now it works. This is a workaround that works for me.

Where can I find this file, FlutterBarcodeScannerPlugin.java please

By exploring the package you can locate it, it remains hidden in the .pub-cache folder /Users/UserFolder/.pub-cache/hosted/pub.dev/flutter_barcode_scanner-2.0.0/android/src/main/java/com/amolg/flutterbarcodescanner/FlutterBarcodeScannerPlugin.java Then, as @wishwelloklu comments, you have to modify the references FlutterActivity to FlutterFragmentActivity and now it works.

kmorfo avatar Sep 23 '23 22:09 kmorfo

I fixed mine with: In file FlutterBarcodeScannerPlugin.java I've modified all reference to FlutterActivity to FlutterFragmentActivity and now it works. This is a workaround that works for me.

Where can I find this file, FlutterBarcodeScannerPlugin.java please In windows you can find it, By exploring the package you can locate it, it remains hidden in the .pub-cache folder " C:\Users<YourUserName>\AppData\Local\Pub\Cache\hosted\pub.dev\flutter_barcode_scanner-2.0.0\android\src\main\java\com\amolg\flutterbarcodescanner", you have to modify the references FlutterActivity to FlutterFragmentActivity and now it works.

piumantha97 avatar Mar 23 '24 00:03 piumantha97