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

UPC isn’t detected

Open Leonick opened this issue 3 years ago • 8 comments

Describe the bug UPC-A and UPC-E codes doesn't seem to be detected even when configured to

I've tried both my own implementation of Html5Qrcode and with you example page. Tried your example UPC pictures, several codes on actual product boxes, and picture from Google search. None are detected.

Other barcodes such as EAN work.

Screenshots If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: iPhone Mini 12 and iPhone 7
  • OS: iOS 15 and iOS 14
  • Browser: Safari

Additional context image image image

Leonick avatar Oct 16 '21 12:10 Leonick

Can you try with following config

var config = { 
    fps: 10,
    qrbox: {width: 250, height: 250},
    // Important notice: this is experimental feature, use it at your
    // own risk. See documentation in
    // mebjas@/html5-qrcode/src/experimental-features.ts
    experimentalFeatures: {
        useBarCodeDetectorIfSupported: true
    },
};

mebjas avatar Oct 26 '21 16:10 mebjas

Unfortunately not, as the BarcodeDetector API isn't supported by Safari on iOS.

Leonick avatar Oct 26 '21 16:10 Leonick

@Leonick hey did you find any solution to this ? I'm struggling with the same

vishakha-simply avatar Nov 04 '21 18:11 vishakha-simply

@vishakha-simply I did not. Had to use a different solution. github.com/ericblade/quagga2 Examples are out of date and documentation not as good so bit trickier to set up, but it works.

Leonick avatar Nov 06 '21 07:11 Leonick

why not to grab the quagga2 code that works with UPC code an integrte it in html5-qrcode?

ROBERT-MCDOWELL avatar Nov 06 '21 12:11 ROBERT-MCDOWELL

Hey @mebjas, awesome job with this repo. Thanks! I'm really excited to use it with the inventory app that I'm developing based on the Google App Script. However I'm experiencing the same issues as other commenters. The app is not scanning codes from the popular items which are with UPC codes. Do you foresee looking into this anytime soon? Thank you!

marcinheniborg avatar Mar 21 '22 12:03 marcinheniborg

@mebjas Do you have a sense of whether or not a fix for iOS barcode scanning will make it into any releases in the near future? I'm evaluating this package to replace quagga, the speed and accuracy is great but I need to support both Android and iOS.

erikmillergalow avatar Apr 05 '22 22:04 erikmillergalow

2.2.1 Not scanning for me in FF+Chrome on Android +1 for rectification of this bug, spoiling an otherwise excellent piece of software

gbsystems avatar Apr 12 '22 11:04 gbsystems

Will look into this based on @Breno1288 's PR.

To be tracked for v2.2.7

mebjas avatar Oct 30 '22 05:10 mebjas

Fixed in zxing-js. Will be published in version 2.3.1. Now UPC-A and UPC-E will get scanned without useBarCodeDetectorIfSupported support - thus across platform.

Track progress on this version at: https://github.com/mebjas/html5-qrcode/issues/605

mebjas avatar Nov 16 '22 15:11 mebjas

Issue fixed with version 2.3.1 -- please help with verification (please comment in issue #605 if the issue is still reproduced in certain platform).

Github release: https://github.com/mebjas/html5-qrcode/releases/tag/v2.3.1 NPM: https://www.npmjs.com/package/html5-qrcode/v/2.3.1

Closing this issue for now.

mebjas avatar Nov 16 '22 16:11 mebjas