onBarCodeRead data for upc-e giving inconsistent results

Author: mljlynchCreated Dec 8, 2021Updated Apr 15, 2023

Bug Report

To Do First

  • Did you try latest release?
  • Did you try master?
  • Did you look for existing matching issues?

Platforms

Android iOs

Versions

  • react-native-camera: 3.40.0
  • react-native: 0.63.4
  • react: 16.13.1"

Description/Current Behaviour

Upc-e giving inconsistent results

Barcode:

Lipton UPC

Results

handleBarcodeRead | type = UPC_E handleBarcodeRead | data = 04136202 handleBarcodeRead | type = UPC_E handleBarcodeRead | data = 04136202 handleBarcodeRead | type = UPC_E handleBarcodeRead | data = 11146209 handleBarcodeRead | type = UPC_E handleBarcodeRead | data = 04136202 handleBarcodeRead | type = UPC_E handleBarcodeRead | data = 11328508 handleBarcodeRead | type = UPC_E handleBarcodeRead | data = 04136202 handleBarcodeRead | type = UPC_E handleBarcodeRead | data = 04136202 handleBarcodeRead | type = UPC_E handleBarcodeRead | data = 04136202 handleBarcodeRead | type = UPC_E handleBarcodeRead | data = 04136202 handleBarcodeRead | type = UPC_E handleBarcodeRead | data = 04136202

Expected Behaviour

Consistently reading the expected barcode `04136202

Steps to Reproduce

Scan the above and then console.log the onBarCodeRead callback data prop

Source: react-native-camera/react-native-camera