zxing-js / library

Multi-format 1D/2D barcode image processing library, usable in JavaScript ecosystem.
https://zxing-js.github.io/library/
Apache License 2.0
2.45k stars 542 forks source link

Repeatedly prints the wrong value in console while checking in the example Scan 1D/2D Code from Video Camera #211

Open robinjos333 opened 5 years ago

robinjos333 commented 5 years ago

The example Scan 1D/2D Code from Video Camera, After two or three successful reading the example continuously prints the wrong value in console. In my case : Object { text: "116131397848886", rawBytes: null, numBits: 0, resultPoints: (4) […], format: 12, timestamp: 1566899520096, resultMetadata: null } multi-camera:95:25

odahcam commented 5 years ago

Are you talking about the demo?

robinjos333 commented 5 years ago

yes

odahcam commented 5 years ago

Could you send a print screen or gif for me to understand what is exactly happening?

robinjos333 commented 5 years ago

Screenshot from 2019-09-02 11-44-49

robinjos333 commented 5 years ago

Any updates regarding this issue?

odahcam commented 5 years ago

I couldn't reproduce it yet, sorry.

robinjos333 commented 5 years ago

I am using Ubuntu 18.04.2 LTS (64-bit) Firefox Quantum 69.0 (64-bit) Webcamera - iball C8.0 FACE2ECAF

lundal commented 4 years ago

Looks like i have the same issue in a local project. About 10-15 minutes after starting decodeFromStream(), it begins to issue a RSS_14 (format 12) barcode every scan interval, unless i completely black out my camera. Each callback has the same barcode at the same coordinates, but it changes after reloading the page.

Screenshot from 2019-09-22 13-28-25

@zxing/library 0.15.1 Chromium 76.0.3809.100 Ubuntu 19.04 (64-bit) ThinkPad integrated webcam

odahcam commented 4 years ago

Occurs only when scanning RSS-14?

lundal commented 4 years ago

I'm only purposefully scanning Code 128 and EAN-13 barcodes, but the continuously triggered wrong barcodes are always RSS-14. Seems like the RSS14Reader gets stuck somehow, perhaps by some noise in the video feed that map to unexpected values? I guess i'll just disable RSS-14 decoding in my project to work around it.

odahcam commented 4 years ago

Does it only happens with this specific video?

lundal commented 4 years ago

No issues after using hints to only enable Code 128 and EAN-13. All the wrong barcodes i have seen have been RSS-14.

odahcam commented 4 years ago

Right, thanks.

github-actions[bot] commented 4 years ago

Stale issue message

odahcam commented 4 years ago

ping @odahcam

infuzz commented 4 years ago

Hi, I got exactly the same issue ! After some successfull qrcode scans, I suddenly got repeatedly a false value coming form nowhere.... reset method call do not change anything. Each line looks like that:

{text: "11613051567673", rawBytes: null, numBits: 0, resultPoints: [ 0: i {x: 248, y: 255}, 1: i {x: 342, y: 255}, 2: i {x: 298, y: 180}, 3: i {x: 257, y: 180}], format: 12, timestamp: 1582672746750}

odahcam commented 4 years ago

Could any of you create a online demo (open source) were the error is showing?

vrebo commented 4 years ago

I have the same issue.

The current demo (https://zxing-js.github.io/library/examples/multi-camera/) can be used to trigger the issue.

In my case, it was triggered after move this barcode (https://barcode.tec-it.com/en/Code128?data=0180659777631032653693) in front of the camera in repeated times.

The Reader doesn't log any result when the camera image is in complete black.

infinite4evr commented 4 years ago

I have tried to reproduce this issue in this small template html, Used alert coz I don't have debugger on for my android, Scanning bar codes of other types are working fine, but once RSS_14 type bar code is scanned, it continuously sends the same bar code result for further scans https://gist.github.com/infinite4evr/fc51a14612550d0506704357586bde16

You can use a temporary html hosting site and paste this html in it and load the link. Try if this works till then : https://5e5f486322dfe.htmlsave.com/ https://barcode.tec-it.com/en/RSS14?data=0123456789012

I may even be wrongly implementing this , I am new to this lib.

Reader.reset() does not seem to work, reinitializing the lib is the only workaround I have found

odahcam commented 4 years ago

I see, it seems to be exclusive to RSS 14 decodings. That should make it easier to find the problem.

arthurmmedeiros commented 4 years ago

Just wanna say I'm having the same issue with RSS 14. After a few minutes the callback function gets values out of nowhere.

neumartin commented 4 years ago

Hi! Any update with this bug?

odahcam commented 4 years ago

No updates yet. RSS 14 needs a review.

haykkarapetyan commented 1 year ago

Hi there, Is there any update on this? I' have the same issue with decoding RSS_14 barcodes.

paulzala commented 1 year ago

I've experienced the same issue after the library is left running for a while - not actually after scaning any RSS_14 barcodes, but just starts firing the callback continuously.