question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RSSExpandedReader fills console log with NotFoundException

See original GitHub issue

Describe the bug The RSSExpandedReader fills the console with NotFoundException log messages, even when only a single 1D format is enabled in MultiFormatReader with hints.set(DecodeHintType.POSSIBLE_FORMATS, [BarcodeFormat.EAN_13]); edit: use decodeWithState() instead of decode to avoid overwriting existing hints.

To Reproduce Steps to reproduce the logging behavior:

  1. Go to the demo page
  2. Open debug panel and console with F12 and ESC
  3. On demo page click start
  4. See logging in console

Expected behavior

  1. Silently fail when pairs cannot be found.
  2. RSSExpandedReader is not run when not among possible formats.

Screenshots image

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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Swiftworkcommented, Nov 19, 2020

@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 that reader.decode(binaryBitmap); should be reader.decodeWithState(binaryBitmap);.

I would generally advice avoiding changing the library files directly as each update will remove these changes 😄

0reactions
Swiftworkcommented, Dec 10, 2020

Closed by https://github.com/zxing-js/library/pull/381, but the underlying issue is still present. RSSExpanded is not ready for usage yet.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found