juliansteenbakker / mobile_scanner

A universal scanner for Flutter based on MLKit. Uses CameraX on Android and AVFoundation on iOS.
BSD 3-Clause "New" or "Revised" License
911 stars 524 forks source link

The mobile_scanner plugin for web doesn't implement the method 'updateScanWindow' #486

Open thomtomdup opened 1 year ago

thomtomdup commented 1 year ago

Hello.

When i changed the permission of camera denied to autorised i have this error in console :

Error: PlatformException(Unimplemented, null, The mobile_scanner plugin for web doesn't implement the method 'updateScanWindow', null)

Can you tell me if it's normal ?

Thank you.

bhanuka96 commented 1 year ago

any solution?

CorjanBos commented 1 year ago

Same error message here. Error also seems to occur when disposing a page with MobileScanner widget in it.

(only in web of course :-))

philitell commented 1 year ago

Is there any solution for this? (seeing this error in web)

ceecee-h commented 1 year ago

I am getting the same error on the web, works fine on mobile... any solutions?

Amphaal commented 1 year ago

_methodChannel.invokeMethod('updateScanWindow', {'rect': data});

This invokes native methods inside kotlin and switf where we have updateScanWindow methods but web doesn't.

@juliansteenbakker would @ribeiro-gabriel proposition to opt-out conditionally of this callback on web platform be enough ? Is the underlying JS library supposed to acknowledge this method call ? 🙏

masim302 commented 1 year ago

I am also getting the same error when click on the back arrow in the app bar.

navaronbracke commented 9 months ago

This was implemented to ignore the scan window on the web, since ZXing does not provide the size of the barcode. So the crash should no longer occur.

We could however, decide to make a rectangle with the points of the barcode and do an intersection.