Skip to content

repeat decode report "Readers were able to detect the code" #575

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

Open
RelicOfTesla opened this issue Sep 3, 2023 · 6 comments
Open

repeat decode report "Readers were able to detect the code" #575

RelicOfTesla opened this issue Sep 3, 2023 · 6 comments

Comments

@RelicOfTesla
Copy link

RelicOfTesla commented Sep 3, 2023

Describe the bug
repeat decode report error.

To Reproduce
Steps to reproduce the behavior:

  1. select a qrcode image file, like a url qrcode-image
  2. open chrome developer console, and click xx button
  3. See error or See good qrcode result
  4. repeat click xx button again and again .

Screenshots

N: No MultiFormat Readers were able to detect the code.
    at cr.decodeInternal (/unpkg.com_@[email protected]_umd_index.min.js:1:258268)
    at cr.decodeWithState (/unpkg.com_@[email protected]_umd_index.min.js:1:257320)
    at t.BrowserMultiFormatReader.decodeBitmap (/unpkg.com_@[email protected]_umd_index.min.js:1:331917)
    at t.BrowserMultiFormatReader.decode (/unpkg.com_@[email protected]_umd_index.min.js:1:35508)
    at n (/unpkg.com_@[email protected]_umd_index.min.js:1:34933)
    at /unpkg.com_@[email protected]_umd_index.min.js:1:35104
    at new Promise (<anonymous>)
    at t.BrowserMultiFormatReader.decodeOnce (/unpkg.com_@[email protected]_umd_index.min.js:1:35084)
    at HTMLImageElement.imageLoadedListener (/unpkg.com_@[email protected]_umd_index.min.js:1:33775)
Promise.catch (async)
(anonymous) @ err.html:26
dispatch @ jquery.min.js:2
y.handle @ jquery.min.js:2
err.html:21 blob:null/906896c9-a98d-4257-980e-b0d6e8e46de7
v {text: 'a', rawBytes: Uint8Array(9), numBits: 72, resultPoints: Array(3), format: 11, …}
err.html:21 blob:null/906896c9-a98d-4257-980e-b0d6e8e46de7
N: No MultiFormat Readers were able to detect the code.
    at cr.decodeInternal (/unpkg.com_@[email protected]_umd_index.min.js:1:258268)
    at cr.decodeWithState (/unpkg.com_@[email protected]_umd_index.min.js:1:257320)
    at t.BrowserMultiFormatReader.decodeBitmap (/unpkg.com_@[email protected]_umd_index.min.js:1:331917)
    at t.BrowserMultiFormatReader.decode (/unpkg.com_@[email protected]_umd_index.min.js:1:35508)
    at n (/unpkg.com_@[email protected]_umd_index.min.js:1:34933)
    at /unpkg.com_@[email protected]_umd_index.min.js:1:35104
    at new Promise (<anonymous>)
    at t.BrowserMultiFormatReader.decodeOnce (/unpkg.com_@[email protected]_umd_index.min.js:1:35084)
    at HTMLImageElement.imageLoadedListener (/unpkg.com_@[email protected]_umd_index.min.js:1:33775)

Desktop (please complete the following information):

  • OS: win10
  • Browser chrome
  • Version 115.0.5790.171
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.4/jquery.min.js"></script>
<script src="unpkg.com_@[email protected]_umd_index.min.js"></script>


<input type="file" class='fp'>
<img class="img1"  />
<button type="button" class='btn'>xx</button>

<script>

    $('.fp').change(function(){
        var fp = $('.fp');
        var f=fp[0].files[0];
        let blobURL = URL.createObjectURL(f);
        console.log(blobURL);
        $('.img1').attr('src', blobURL).data('src', blobURL);
    });

    $('.btn').click(function(){
        let blobURL = $('.img1').attr('src');
        console.log(blobURL);
        let reader = new ZXing.BrowserMultiFormatReader();
        // reader.setHints(null);
        let r = reader.decodeFromImageUrl(blobURL);
        // let r = reader.decodeFromImage($('.img1')[0]);
        r.then(console.log).catch(console.error);
    })

</script>

<style>
    .img1{
        max-width: 400px;
    }
</style>
@RelicOfTesla
Copy link
Author

RelicOfTesla commented Sep 3, 2023

example qrcode, the value is "a"
qrcode5

@RelicOfTesla
Copy link
Author

RelicOfTesla commented Sep 3, 2023

it's work on v0.18.6, exception >= v.0.19

@teckel12
Copy link

@RelicOfTesla Could this just be how you implemented the library? As I don't get have any issues with repeated scanning of the above QR code here:

https://barcode.leethost.com/

@RelicOfTesla
Copy link
Author

@teckel12, Decode from static image file, don't scan from camera.

@dolin-tan
Copy link

@teckel12 I am also encountering the above issues now. Some IMG QR codes can be scanned, and some also report this error. IMG only has different width and height, is it due to the IMG ratio issue?

Copy link

Stale issue message

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

No branches or pull requests

3 participants