-
-
Notifications
You must be signed in to change notification settings - Fork 989
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
No MultiFormat Readers were able to detect the code. #320
Comments
I have the same problem (version 2.1.0). With the complied version (either from the node_modules directory or from unpkg.com) is works, but with webpack it throws this error during scanning. Stacktrace:
Code: import {Html5QrcodeScanner, Html5QrcodeSupportedFormats} from 'html5-qrcode';
function onScanSuccess(decodedText, decodedResult) {
// handle the scanned code as you like, for example:
console.log(`Code matched = ${decodedText}`, decodedResult);
}
function onScanFailure(error) {
// handle scan failure, usually better to ignore and keep scanning.
// for example:
console.warn(`Code scan error = ${error}`);
}
let html5QrcodeScanner = new Html5QrcodeScanner(
"reader",
{
fps: 10,
qrbox: {width: 250, height: 250},
formatsToSupport: [ Html5QrcodeSupportedFormats.QR_CODE ]
},
false
);
html5QrcodeScanner.render(onScanSuccess, onScanFailure); |
@drophit Can you share the sample file being tested? |
I am using Version 2.1.12 {!! HTML::script('assets/js/as/html5-qrcode.min.js') !!}
<script>
var url = '{{ route('entry.building.card', ['tokenbuliding']) }}';
function docReady(fn) {
// see if DOM is already available
if (document.readyState === "complete"
|| document.readyState === "interactive") {
// call on next available tick
setTimeout(fn, 1);
} else {
document.addEventListener("DOMContentLoaded", fn);
}
}
docReady(function () {
var resultContainer = document.getElementById('qr-reader-results');
var lastResult, countResults = 0;
function onScanSuccess(decodedText, decodedResult) {
if (decodedText !== lastResult) {
++countResults;
lastResult = decodedText;
// console.log(`Scan result ${decodedText}`, decodedResult);
console.log(decodedText);
window.location.href = url.replace('tokenbuliding', decodedText);
html5QrcodeScanner.clear();
}
}
var html5QrcodeScanner = new Html5QrcodeScanner(
"qr-reader", { fps: 10, qrbox: {width: 250, height: 250}, aspectRatio: 1 });
html5QrcodeScanner.render(onScanSuccess);
});
</script> |
facing the same issue, has this been resolved @mebjas |
facing same issue with version 2.1.2 onScanSuccess(decodedText, decodedResult) { stacktrace |
Hello @mebjas Any news on that issue? Code: this.html5QrcodeScanner = new Html5Qrcode(
'barCodeReader',
{
verbose: true,
formatsToSupport: [
Html5QrcodeSupportedFormats.CODE_128,
Html5QrcodeSupportedFormats.CODE_39,
Html5QrcodeSupportedFormats.EAN_8
]
}
);
this.html5QrcodeScanner.start(
cameraId,
{
fps: 10,
qrbox: {
width: Math.round(width * 0.8),
height: Math.round(width * 0.5),
},
videoConstraints: {
advanced: [
{
deviceId: cameraId,
width,
height
}
]
}
},
onScanSuccess,
onScanFailure,
); Stack
|
I have the same issue when I use with |
Hi @mebjas, I'm also face to this issue in version 2.2.0 too
|
For me, this error depends on the video width and height. If I do not restrict the video size, it reliably detects all codes without delay. If I fit the video into a div that has width and height set via CSS (say, 100px), then I cannot detect the codes, even though nothing else changed. See also #415 (comment) |
Just started using the library today, and I am experiencing, if not the same, then a similar type of event. I am only going to scan QR and CODE_128 codes, so I set formatsToSupport to limit it to only those two formats. But, if I do that, then I can't scan the CODE_128 codes. Removing the formatsToSupport setting, and I can scan the codes just fine. |
I have the same issue when I use upload file @mebjas (latest version) |
when i put a logo design in my qr code in the center. the qr code reader is not working it's say D: No MultiFormat Readers were able to detect the code. |
Same issue here using Webpack... any workaround? |
I have the same issue in my code with the "No MultiFormat Readers werre able to detect the code". But... It only happens if I upload the image like: If I use the camera of my device(s) it works. Reproducible on https://scanapp.org/. The fun part is - that the same code to generate and save the QR code works with HTML5-QRCode sometimes (~50%). So I think in my case it has something todo with the generation of the QR code itself. |
facing same issue. any solution ? |
it's already been 4 years this issue was not yet resolved |
@JanbertCampos |
Maybe Duplicating #960 |
Using your demo and any bard code (all but the QR) for version 2.0.13 getting this error
No MultiFormat Readers were able to detect the code.
https://blog.minhazav.dev/QR-and-barcode-scanner-using-html-and-javascript/
file upload and see error
The text was updated successfully, but these errors were encountered: