html5-qrcode icon indicating copy to clipboard operation
html5-qrcode copied to clipboard

Android/Chrome freezing camera after a few minutes

Open phstc opened this issue 3 years ago • 8 comments

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):

  • Android Tablet
  • Chrome

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.

phstc avatar Sep 29 '22 13:09 phstc

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

mrister avatar Nov 04 '22 18:11 mrister

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/

denxorz avatar Nov 10 '22 16:11 denxorz

@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.

phstc avatar Nov 10 '22 16:11 phstc

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

mrister avatar Nov 10 '22 16:11 mrister

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

Adrxking avatar Jan 25 '23 13:01 Adrxking

@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?

owennemo avatar Feb 12 '24 01:02 owennemo

@owennemo it worked on Firefox on the same device.

phstc avatar Feb 12 '24 21:02 phstc

@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?

owennemo avatar Feb 29 '24 04:02 owennemo