capawesome-team / capacitor-mlkit

⚑️ ML Kit plugins for Capacitor. Supports Android and iOS.
https://capawesome.io/plugins/mlkit/
Apache License 2.0
147 stars 46 forks source link

bug: Barcode Scanner Sometimes Reads Incorrect Values for Code128 Barcode #171

Closed umeshsarkar closed 4 months ago

umeshsarkar commented 4 months ago

Plugin(s)

Version

6.1.0

Platform(s)

Current behavior

When scanning a Code128 barcode, the scanner does not always return the correct value. For instance, as shown in the attached screenshots, I am trying to scan a Code128 barcode with the accurate value 8003012345678902345678901234. However, it returns 8243175366890234567580173, which is incorrect.

scanning-barcode-real scan-result-with-wrong-value

Expected behavior

The barcode scanner should return the actual value of the Code128 barcode on every scan.

Reproduction

https://github.com/robingenz/capacitor-mlkit-plugin-demo

Steps to reproduce

  1. Clone the official barcode-scanning demo repository:
    git clone https://github.com/robingenz/capacitor-mlkit-plugin-demo.git
  2. Change to the root directory of the project:
    cd capacitor-mlkit-plugin-demo
  3. Install all dependencies:
    npm i
  4. Prepare and launch the Android app:
    npx ionic cap sync android
    npx ionic cap run android
  5. Select the barcode scanning module in the app.
  6. In the barcode scanning module, select the format Code128 and click on START SCAN.
  7. Scan the barcode from the attached Code128 barcode sample.
  8. After a successful scan, the result values are displayed at the bottom of the barcode scanning page.
  9. Compare the Raw Value or Display Value to the value mentioned in the attached Code128 barcode sample. They do not match.

sample-barcode-code128.pdf

Other information

The device used for testing: Google Pixel 6a (Android Version 14)

Capacitor doctor

πŸ’Š Capacitor Doctor πŸ’Š

Latest Dependencies:

@capacitor/cli: 6.1.1 @capacitor/core: 6.1.1 @capacitor/android: 6.1.1 @capacitor/ios: 6.1.1

Installed Dependencies:

@capacitor/android: 6.0.0 @capacitor/cli: 6.0.0 @capacitor/core: 6.0.0 @capacitor/ios: 6.0.0

[success] Android looking great! πŸ‘Œ [error] Xcode is not installed

Before submitting

robingenz commented 4 months ago

I close this issue as duplicate of #96.