serratus / quaggaJS

An advanced barcode-scanner written in JavaScript
https://serratus.github.io/quaggaJS/
MIT License
5.06k stars 978 forks source link

Chrome browser crashes with Quagga.stop() method, on Pixel 3a device #448

Open abhijeet-pandhe opened 3 years ago

abhijeet-pandhe commented 3 years ago

We have implemented the quagga scanner and it works fine on all devices, except for Pixel 3a. When the Quagga.stop() method is triggered the browser freezes unexpectedly without throwing any error (The same behaviour is observed on the Quagga demo site). Below is the screenshot, here you can see that the home icon and icon to open new tabs has got overlapped (When I clicked on switch tab after the browser stopped working) 2020-11-06 (1)

Any idea on how to fix this?

ericblade commented 3 years ago

hmm. using the same Chrome version on each device? it is possible that perhaps there's some device-related breakage in chrome, although it does seem a bit unlikely.. i've heard reports that Android 11 as a whole has issues with browser camera usage, but I don't have Android 11 to be able to confirm anything.

any possibility of getting that hooked up to Chrome debugging to see if there's any console logging?

There's a possibility that it could be some sort of infinite loop in some code somewhere too...

abhijeet-pandhe commented 3 years ago

Yes, the Pixel device that I'm using for testing has Android 11 installed on it.. so I guess this might be an Android 11 specific issue (This is the exact same issue I'm facing https://github.com/ericblade/quagga2/issues/266). I also tried doing Chrome debugging but no luck with that either as no error is displayed in the console.

Screenshot (182)

Zaphod-Beeblebrox commented 3 years ago

Check my response in the mentioned issue: https://github.com/ericblade/quagga2/issues/266

Calling pause on the video element before calling Quagga.stop() will fix this.

ericblade commented 3 years ago

A potential fix has been implemented in @ericblade/quagga2 @ 1.3.0 . Please test and report results there. https://github.com/ericblade/quagga2/issues/266

Note that there is still an open issue in the Android bug tracker, that has not been at all addressed.