question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

qrcode.makeCode() still has Code Length OverFlow Error

See original GitHub issue

Come form https://github.com/davidshimjs/qrcodejs/issues/78 and firstly thanks for you awesome fork for the original repo. it seems that qrcode.makeCode() still has this issue. please do a further job, thank you.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:8

github_iconTop GitHub Comments

1reaction
suxiaogangcommented, May 24, 2018

nice job dude

1reaction
fladna9commented, May 24, 2018

Ok, problem is the qrcode.min.js file. It works fine on qrcode.js

Tested on Chrome, Safari, Firefox, and had no problem so far. Below is the code of the Testpage i used (just edited index.html with your JS code).

capture d ecran 2018-05-24 a 09 18 49

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko" lang="ko">
<head>
	<title>Cross-Browser QRCode generator for Javascript</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" />
	<script type="text/javascript" src="jquery.min.js"></script>
	<script type="text/javascript" src="qrcode.js"></script>
</head>
<body>
	<div id="qrcode" style="width:100px; height:100px; margin-top:15px;"></div>

	<script type="text/javascript">
		var QRCodeBox = new QRCode(document.getElementById("qrcode"), {
			width: 200,
			height: 200,
			correctLevel: QRCode.CorrectLevel.H
		});
		var str = "ed2k://|file|【电影家园www.idyjy.com下载】寂静之地.HD韩版中英双字.mp4|1129787457|AD3BD4384712D52D2BB09A150AF64D55|h=BMZZS7VBJ4ZAROGOU56245LCBBO6DRO7|/";
		QRCodeBox.makeCode(str);
	</script>
</body>

Will redo a min.js as soon as i have a bit of time for this. Thanks for the bug submission.

In the mean time, i highly recommend you to use the non-minified version, or to minify it yourself… I’m not sure i’ll have time today to do this. 😉

Have a good day !

Read more comments on GitHub >

github_iconTop Results From Across the Web

Code Length OverFlow Error · Issue #78 · davidshimjs/qrcodejs
When a string is passed in between 192 and 220 characters long and using correct level H a code Length Overflow appears. This...
Read more >
Qrcode.js - Error: code length overflow. (1716>1056)
I have hit this same error myself using the library, it appears there is a bug in the library where if you use...
Read more >
Dynamic QR Code - Code Length Overflow error - Jotform
I've tried multiple browsers and different forms - this widget has stopped displaying. It was working fine a few hours ago.
Read more >
qrcodejs - Bountysource
DOMException: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported. I am using the following code to generate the qr...
Read more >
Qrcode.js – Error: code length overflow. (1716>1056) - iTecNote
H and have a string between 192 and 220 character it will fail (Note that the length specified in the error message is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found