Library: throw new NotFoundException()

Created on 17 Nov 2020  Â·  3Comments  Â·  Source: zxing-js/library

[https://zxing-js.github.io/library/examples/multi-camera/]

surface
chrome

The Google browser console keeps outputting throw new NotFoundException()ï¼›

This situation causes memory to rise, so why must it throw an error message?

You can leave the error message to the user

question

All 3 comments

This is due to a console.log in decodeRow()

PR proposes

a quick workaround is to free console continuously with

codeReader.decodeFromVideoDevice(null, 'webcam-preview', (result, err) => {
      if (result) { /* do stuff */}
      if (err) {
           if (err instanceof ZXing.NotFoundException) {
                  console.clear()
            }
            /** treat others err here.... */
      }
}

This isn't really the solution to the problem. As stated in issue #367 the RSSExpandedReader isn't quite ready yet. I am guessing you have the same issue I did, that hints were overwritten, and was solved here https://github.com/zxing-js/library/issues/367#issuecomment-723476412. Alternatively you can instead set hints to not include RSS Expanded format using the comment above. The documentation should be updated to reflect this. Lastly this seems as if it is a duplicate of #367, I suggest closing this issue and looking there :)

@Swiftwork Yes you are right. As you suggested, I use this code with only the supported formats as described, and all is working well

const formats = [
    ZXing.BarcodeFormat.AZTEC,
    ZXing.BarcodeFormat.CODABAR,
    ZXing.BarcodeFormat.CODE_39,
    ZXing.BarcodeFormat.CODE_128,
    ZXing.BarcodeFormat.EAN_8,
    ZXing.BarcodeFormat.EAN_13,
    ZXing.BarcodeFormat.ITF,
    ZXing.BarcodeFormat.PDF_417,
    ZXing.BarcodeFormat.QR_CODE
]
const hints = new Map()
hints.set(ZXing.DecodeHintType.POSSIBLE_FORMATS, formats)
codeReader = new ZXing.BrowserMultiFormatReader(hints) 

So I think also this issue could be closed

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mpodlasin picture mpodlasin  Â·  12Comments

helloo0-0oword picture helloo0-0oword  Â·  8Comments

sethusuryateja picture sethusuryateja  Â·  6Comments

ismailjamiljauhari picture ismailjamiljauhari  Â·  6Comments

kenlyon picture kenlyon  Â·  6Comments