Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NotFoundException2: No MultiFormat Readers were able to detect the code. #20

Closed
mvysny opened this issue Mar 20, 2024 · 3 comments
Closed

Comments

@mvysny
Copy link
Contributor

mvysny commented Mar 20, 2024

I'm getting this error for every frame: NotFoundException2: No MultiFormat Readers were able to detect the code..
I assume that this is the normal modus operandi for ZXing when it can't detect the QR code in the video stream, and therefore we should exclude it from reporting to the server.

According to mebjas/html5-qrcode#320, this only happens with webpack, so I'm assuming that webpack changes the class name of the exception and it's not caught by this.excludes. I'd propose to exclude this exception from reporting it to the server-side, but I'd exclude it only if the error message matches as well, otherwise we might accidentally not report other valid NotFoundExceptions as well.

This is a serious issue since this has the potential to overwhelm the server with calls if multiple users open their cameras, akin to DDOS. This needs to be fixed fast.

@mvysny
Copy link
Contributor Author

mvysny commented Mar 22, 2024

Uh-oh, the fix doesn't work properly when compiling for production: I'm getting "l: No MultiFormat Readers were able to detect the code.". Note the error name "l" - lowercase L character. I assume that the name/type of the error is mangled/obfuscated by webpack. We'll need to match based on the message only.

@mvysny
Copy link
Contributor Author

mvysny commented Mar 22, 2024

Also I'm frequently getting "DOMException: IndexSizeError : Index or size is negative or greater than the allowed amount", let's add an ignore clause for that as well.

mvysny added a commit to mvysny/vaadin-litelement-zxing that referenced this issue Mar 22, 2024
@ADEXITUM
Copy link

Yeah. It seems that Webpack obfuscates some code in a way that causes such problem.
In my case the error is "j: No MultipartFormat Readers were able to detect the code."

I get some "j" instead of "l".

I'll stick to ignoring any error if it has "No MultipartFormat Readers were able to detect the code" in it.
I guess rebuilding the project may lead to another error change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants