bug(barcode-scanning): unable to scan glitter insemination barcode
Plugin(s)
- [X] Barcode Scanning
- [ ] Face Detection
- [ ] Translation
Did you test the latest version?
- [X] I use the latest version
Platform(s)
- [ ] Android
- [X] iOS
- [ ] Web
Current behavior
I'm struggling to scan these barcode labels, and it only works very rarely. I'm using an iPad Air. I have another app that can scan them without any issues.
Expected behavior
To scan the codebar correctly
Reproduction
https://github.com/FVolral/.capacitor-app
Steps to reproduce
$ npm run build && npx cap sync && npx cap open ios
The reproduction should try to scan the barcode use readBarcodesFromImage() but it doesn't work, not sure if it's me or a bug from the plugin. a working repro that use it may help.
Other information
My reproduction is not working, and I haven't been able to find a valid reproduction scenario. So, I did what I could, but it leads to a 'File does not exist' error when I'm trying to use the 'readBarcodesFromImage()' method. As far as I can tell, the path should be correct since the images load correctly in the DOM, right?".
Also, on my iPad, I can scan these insemination glitter barcodes almost instantly using an app called 'QR Reader' developed by Tap Media.
Those barcode use CODE_128 formats.
Capacitor doctor
💊 Capacitor Doctor 💊
Latest Dependencies:
@capacitor/cli: 5.3.0 @capacitor/core: 5.3.0 @capacitor/android: 5.3.0 @capacitor/ios: 5.3.0
Installed Dependencies:
@capacitor/android: not installed @capacitor/cli: 5.3.0 @capacitor/core: 5.3.0 @capacitor/ios: 5.3.0
[success] iOS looking great! 👌
Before submitting
- [X] I understand that incomplete issues (e.g. without reproduction) are closed.
Hi @FVolral, thank you for your request.
As far as I can tell, the path should be correct since the images load correctly in the DOM, right?".
No, you need to provide a native path, not the web path. Here you can find an example: https://github.com/robingenz/capacitor-mlkit-plugin-demo/blob/main/src/app/modules/barcode-scanning/barcode-scanning.page.ts#L86:L98
I tried it myself and i can reproduce your issues. But I am not sure if the plugin can do much here. After all, the mlkit sdk is responsible for detecting the barcodes. It's best to create an issue in this repository: https://github.com/googlesamples/mlkit But I will leave this issue open for now. Please update this issue if you have any news.
Yep, that's what I thought. I will open an issue on mlkit. Thank you for your response.