flutter-ml / google_ml_kit_flutter

A flutter plugin that implements Google's standalone ML Kit
MIT License
907 stars 709 forks source link

Flutter : NSInvalidArgumentException : with GoogleMlKit Barcode scan library #652

Open akash-gaea opened 4 days ago

akash-gaea commented 4 days ago

In my Flutter project, I was using scan: 1.6.0 plugin for scanning barcodes/qr codes, which was working fine.

Recently I wanted to change the plugin to google_mlkit_barcode_scanning: 0.12.0, in android it works, fine, but when I try to use this in iOS, the scan is successful, but after 30-40 seconds, it throws an exception, due to which my app fails to respond

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString objectForKey:]: unrecognized selector sent to instance 0x3008ec410'
*** First throw call stack:
(0x19b5c4f20 0x19345a018 0x19b6ce480 0x19b561fb4 0x19b5618d0 0x1065a8424 0x106f4e7bc 0x106f5034c 0x1065a83d4 0x1065a8c18 0x104f63d24 0x104f62fb8 0x104f6225c 0x106f4cb98 0x106f4e7bc 0x106f5666c 0x106f57408 0x106f64404 0x106f63a38 0x1f841b934 0x1f84180cc)
libc++abi: terminating due to uncaught exception of type NSException

I tried to create a demo project, and it worked fine in that project.

Any suggestion, what am I doing wrong here?

Screenshots

image

Platform (please complete the following information):