victorperin / qr-scanner-cli

A CLI tool to read QR Code from images
https://victorperin.github.io/qr-scanner-cli/
MIT License
73 stars 24 forks source link

Cannot read properties of undefined (reading 'includes') #203

Open majkinetor opened 2 years ago

majkinetor commented 2 years ago

I get this error when I scan i invoice sample I used:

Check out this image: first one works, second one shows this error:

image

GenieTim commented 2 years ago

I have the same problem for some images. Have you found a solution yet?

majkinetor commented 2 years ago

No solution for this project, but I found the one that works fine

and this one for web app

ssstonebraker commented 2 years ago

same problem

victorperin commented 2 years ago

This is strange. Can anyone provide-me a picture to reproduce?

GenieTim commented 2 years ago

This is strange. Can anyone provide-me a picture to reproduce?

Sure. One example would be the image attached below (also available, in case GitHub does some compression stuff, under https://www.dative.ch/wp-content/uploads/2020/02/Zahlteil-D.jpg (not my file, so it might disappear)).

Zahlteil-D

The command executed is e.g. simply qrscanner --clear ./yourPathTo/theImageFile.jpg.

jjnilton commented 1 year ago

+1

rcheetah commented 1 year ago

+1

gdun98 commented 11 months ago

For this case, the error being thrown is from the qrcode-reader package. Specifically Couldn't find enough alignment patterns. I had a different error, that resulted in the same output. In my case qrcode-reader hit this case: https://github.com/edi9999/jsqrcode/blob/master/src/detector.js#L246.

So two things are going on:

I've had a look at the upstream package and it hasn't been updated in 6 years, and I haven't been able to deduce what is wrong with the limited time I have available to look into this. And have had better luck with zbar for my issue, but even zbar doesn't like the image linked in this issue.

Hopefully, this is a better starting point for anyone who looks into this in the future.

This is strange. Can anyone provide-me a picture to reproduce?

Sure. One example would be the image attached below (also available, in case GitHub does some compression stuff, under https://www.dative.ch/wp-content/uploads/2020/02/Zahlteil-D.jpg (not my file, so it might disappear)).

Zahlteil-D

The command executed is e.g. simply qrscanner --clear ./yourPathTo/theImageFile.jpg.

iladshyan commented 6 months ago

Does anyone have any updates? This is only happening to certain files.

victorperin commented 1 month ago

I'm trying to figure it out, but no idea why this occours, seems to be something with qrcode-reader package.