RSSExpandedReader fills console log with NotFoundException
See original GitHub issueDescribe the bug
The RSSExpandedReader fills the console with NotFoundException log messages, even when only a single 1D format is enabled in edit: use MultiFormatReader
with hints.set(DecodeHintType.POSSIBLE_FORMATS, [BarcodeFormat.EAN_13]);
decodeWithState()
instead of decode
to avoid overwriting existing hints.
To Reproduce Steps to reproduce the logging behavior:
- Go to the demo page
- Open debug panel and console with F12 and ESC
- On demo page click start
- See logging in console
Expected behavior
- Silently fail when pairs cannot be found.
RSSExpandedReader is not run when not among possible formats.
Screenshots
Additional context Relevant code https://github.com/zxing-js/library/blob/0dba01bc99bbe5a47d224d8a0d4c0c7c6fad81c3/src/core/oned/rss/expanded/RSSExpandedReader.ts#L97-L113
Great job on the library @odahcam !
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Bad idea to leave "console.log()" calls in your production ...
You're saying if the console is undefined, then set the console to an empty function. I don't understand the colon syntax after 'log'....
Read more >console.log() - Web APIs - MDN Web Docs
The console.log() method outputs a message to the web console. The message may be a single string (with optional substitution values), ...
Read more >Debugging in JavaScript: Using console.log()
Now try filling out the form. The text from our fantastical adventure will appear — and both messages will be properly logged to...
Read more >Javascript Project to Build QRCode & BarCode Scanner Using ...
Welcome folks today in this blog post we will be building a qrcode and barcode scanner using webcam and image file in browser....
Read more >JavaScript console.log() Method - W3Schools
Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Hopingocean the comments don’t solve the primary issue which is, as the title states, “RSSExpandedReader fills console log with NotFoundException”. The reason for the issue in the title, is primarily that the
RSSExpandedReader
is not ready for usage yet, but has been merged to master. This, I guess, is for testing purposes (maybe better to be merged to development). The reason this is issue is still open is due to this.The issue the comments above addressed was the fact that
RSSExpandedReader
was activated even though it was not requested. Which is due to the README missing thatreader.decode(binaryBitmap);
should bereader.decodeWithState(binaryBitmap);
.I would generally advice avoiding changing the library files directly as each update will remove these changes 😄
Closed by https://github.com/zxing-js/library/pull/381, but the underlying issue is still present. RSSExpanded is not ready for usage yet.