mebjas / html5-qrcode

A cross platform HTML5 QR code reader. See end to end implementation at: https://scanapp.org
https://qrcode.minhazav.dev
Apache License 2.0
5.06k stars 976 forks source link

Android/Chrome freezing camera after a few minutes #550

Open phstc opened 2 years ago

phstc commented 2 years ago

Describe the bug

I'm using html5-qrcode for a check-in app. Users point their QR code and I use the reader to confirm their check-in.

We notice is that, after a few minutes of no use, the camera freezes and only works again if I reload the page. . To Reproduce Steps to reproduce the behavior:

  1. Open a page with the QR Code Reader
  2. Do nothing for 10 minutes
  3. Camera freezes

Tablet (please complete the following information):

Additional context

I apologize for the lack of details. I'm trying to get more details from the customer using the app. I will update this issue as soon as I get more details.

Hopefully, this is a known problem with a potential know fix.

mrister commented 2 years ago

Experienced a very similar problem @phstc did you maybe find a solution? Also on Chrome on android tablet.

denxorz commented 2 years ago

Does the tablet get locked while waiting the 10 min? Because I see a malfunctioning scanner on iOS as well after a screenlock: https://github.com/mebjas/html5-qrcode/issues/515

It might be good if you can check if you can also reproduce it with the https://scanapp.org/

phstc commented 2 years ago

@mrister @denxorz it seems to be specific on Chrome. We changed to Firefox, and it is working as expected now.

I suspect Chrome on Android is doing some power savings.

mrister commented 2 years ago

INteresting, will check it out, thank you very much @phstc !

Adrxking commented 1 year ago

Same problem, after using the app the scanner starts freezing and you cannot unfreeze it until you remove app data

owennemo commented 9 months ago

@phstc Based on your experience, is there a possible factor in the RAM or camera of the mobile device used for the scanner in Chrome?

phstc commented 9 months ago

@owennemo it worked on Firefox on the same device.

owennemo commented 8 months ago

@phstc I haven't been able to try it on Firefox because the website used is not secure (not https). So far I have always tried it on Chrome, based on your tests, is there really a power saving condition in chrome after being idle for 10 minutes that causes freezing?