endroid / qr-code

QR Code Generator
https://endroid.nl
MIT License
4.46k stars 727 forks source link

Validator issues #296

Closed GonozalIX closed 3 years ago

GonozalIX commented 3 years ago

Hi,

I have an issue similar to #107 and couldn't figure out yet if it's a problem of the validator or the underlying generator library. Here is a reduced sample code:

$qrCode = new QrCode("meit:///MyDevice/352");
$qrCode->setValidateResult(true);
$a = $qrCode->writeString();

This leads to a Built-in validation reader read "" instead of "meit:///MyDevice/352". Adjust your parameters to increase readability or disable built-in validation.

If you exchange 352 by 351 or 353 everything works as intended… also switching the ErrorCorrectionLevel from LOW to HIGH and back didn't change anything.

If I disable validation the qr code can be read by all qr readers I checked without any problems… so it seems it was generated correctly and just validation failed.

Best.

endroid commented 3 years ago

Hi @GonozalIX unfortunately I can not control the inner workings of the reader and each reader has its own accuracy so this means there will always remain cases where the validation reader says the code is readable and some other software can not read the code and the other way around.

As you mentioned you can read the code with other readers so the problem in this case would be inside the validator. Maybe you can create an issue in the validator library with the image and the result. Or before that you could first try reading the image using that library directly as an extra check that it is not something in my library.

Good luck!