qrcodejs icon indicating copy to clipboard operation
qrcodejs copied to clipboard

just reporting an error - Uncaught Error: code length overflow. (1756>1056)

Open mr-kyle opened this issue 4 years ago • 5 comments

this will generate an error. go here: https://codepen.io/davidshimjs/pen/NdBYrg and enter the below

https://sdasda-asdasd-in-uat.appspot.com/?bid=0006300GG-UCA01&title=G-UCA01&name=Faculty%20of%20Information%20Technology&z=1&lat=-37.910976965731614&lng=145.13378548592536&fid=12143&cid=159&pid=1154825&buildingId=3387

error message: qrcode.min.js:1 Uncaught Error: code length overflow. (1756>1056) at Function.b.createData (qrcode.min.js:1) at b.makeImpl (qrcode.min.js:1) at b.getBestMaskPattern (qrcode.min.js:1) at b.make (qrcode.min.js:1) at QRCode.makeCode (qrcode.min.js:1)

mr-kyle avatar Sep 04 '20 13:09 mr-kyle

Same here...

ebartz avatar Apr 23 '21 11:04 ebartz

More details: Does not work for 192 >= length >= 217

barvemihir avatar Aug 06 '21 08:08 barvemihir

mine also got this error: Uncaught Error: code length overflow. (1604>1056) at QRCodeModel.createData (qrcode.js:105:54) at QRCodeModel.makeImpl (qrcode.js:90:54) at QRCodeModel.getBestMaskPattern (qrcode.js:91:479) at QRCodeModel.make (qrcode.js:88:127) at QRCode.makeCode (qrcode.js:584:17)

to workaround this issue, we can try to lower the correction level in qrcode.js , line 542

correctLevel : QRErrorCorrectLevel.H

change to

correctLevel : QRErrorCorrectLevel.L

Hope it helps!

at41man avatar Mar 15 '23 04:03 at41man

Same here...

image

BaiJiangJie avatar Aug 25 '23 03:08 BaiJiangJie