php-qrcode-detector-decoder icon indicating copy to clipboard operation
php-qrcode-detector-decoder copied to clipboard

InvalidArgumentException

Open pimduijst opened this issue 6 years ago • 3 comments

I have a directory with a lot of generated QR codes in .png format. When I scan the dir it shows me all the files it contains but when I want this lib to translate the codes to it crashes after a few items 'translating' with the following error.

PHP Fatal error: Uncaught exception 'InvalidArgumentException' in /Users/admin/Webdev/logboekenonline/src/app/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/Version.php:121 Stack trace: #0 /Users/admin/Webdev/logboekenonline/src/app/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/Version.php(112): Zxing\Qrcode\Decoder\Version::getVersionForNumber(0) #1 /Users/admin/Webdev/logboekenonline/src/app/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Detector/Detector.php(84): Zxing\Qrcode\Decoder\Version::getProvisionalVersionForDimension(17) #2 /Users/admin/Webdev/logboekenonline/src/app/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Detector/Detector.php(69): Zxing\Qrcode\Detector\Detector->processFinderPatternInfo(Object(Zxing\Qrcode\Detector\FinderPatternInfo)) #3 /Users/admin/Webdev/logboekenonline/src/app/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/QRCodeReader.php(62): Zxing\Qrcode\Detector\Detector->detect(NULL) #4 /Users/lo in /Users/admin/Webdev/logboekenonline/src/app/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/Version.php on line 121

This is the code it fails on and the textstring it should show is: https://www.logboekenonline.nl/02mqou 02MQOU

Any one any suggestions what the problem is?

pimduijst avatar Jul 12 '19 07:07 pimduijst

Same error

suhanovskiy avatar Jul 31 '19 17:07 suhanovskiy

Same error, but with a different use case. If I take a picture of a qr code and then send it to the code it breaks and the code needs 4GB of RAM to do this.

derhalbbrite avatar Oct 16 '19 14:10 derhalbbrite

Any fix for this? I can confirm that if you take a pictures of a qr code it will exhaust allowed memory, even if I give it a lot more memory, it can't complete a simple text scanning. Any tips as to what should we do or how should we supply the qr code through a picture?

tamas-web avatar Apr 01 '20 08:04 tamas-web