zxing-js / library

Multi-format 1D/2D barcode image processing library, usable in JavaScript ecosystem.

Home Page:https://zxing-js.github.io/library/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Green screen when reading EAN code

NicolasFR-45 opened this issue · comments

We use the zxing-js library to read barcodes on our website. It's convenient because the user doesn't need to download any app :)
script page
We are using the latest version 0.20.0 of Zxing.

For about 2 months we have noticed a bug since reading EANs on Chrome for Android (v. 115.0.5790.138): A green square is displayed instead of seeing the camera video (yet we hear the sound of the smartphone lens activate)

Yet with the same smartphone - but another browser - Sansung's Internet application (v. 22.0.1.1): barcode reading still works very well!

Google Chrome still has permission to enable smartphone camera.

I noticed that the problem is the same on another site that uses the same library.

I haven't had the opportunity to test on an iPhone. On my windows PC, everything works fine.

What can cause this green screen? Thank you for your help :)

Desktop:

  • OS: Windows
  • Browser: Firefox
  • Version: 116.0

Smartphone:

  • Device: Samsung
  • OS: Android
  • Browser Chrome
  • Version: 115.0.5790.138

Hello, I found the solution on bugs.chromium.org
It's a Chrome browser bug! To solve it, you have to go to the chrome://flags page and disable "Use passthrough command decoder".

For others having a problem with the screen being green when scanning, it's not a zxing bug, it's either permissions or Chrome setting. In addition to the above solution, here's two other solutions:

teckel12/vue-barcode-reader#7