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.

Unrecognized QR code when scanning

See original GitHub issue

I used https://github.com/Bacon/BaconQrCode to generate QR codes for my app. Here is an example output:

qr-bug

Authenticator says “Unrecognized QR code.” when I try to scan it, however using Google Authenticator app to scan the code works fine. I can also decode it using https://zxing.org/w/decode.jspx and it says the parsed result is:

otpauth://totp/Google%3Aexample%40gmail.com?secret=qjv3en5jjjhgq4pk3m6e576ymwuc5d4x&issuer=Google

This looks valid to me.

In fact, when I take the above URL and put it into https://www.qr-code-generator.com/ and then scan the output QR code with Authenticator, it works! There’s something about the above QR code that’s not working with Authenticator for some reason.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mymindstormcommented, Apr 12, 2018

This reader and the error I’m getting from jsqrcode, Invalid mode: 7 in (block:0 bit:3), seem to say that it’s in ECI mode 7. According to the code you have it should be 26, so jsqrcode may just be reading the ECI data wrong.

That patch I found seems to work just fine. It should work with 5.0.10

0reactions
multiwebinccommented, Apr 12, 2018

Are you sure the ECI mode is set to 7? According to https://online-barcode-reader.inliteresearch.com/, the above QR code uses UTF-8 character set, which also coincides with what was requested during QR generation, not ECI mode 7 (which would be ISO/IEC 8859-5).

Also, looking at the code for BaconQrCode it looks like they have taken these various encodings into account, so it would seem likely that the error is not with that package but instead with jsqrcode. Unfortunately it looks like jsqrcode is no longer being maintained.

Read more comments on GitHub >

github_iconTop Results From Across the Web

9 reasons Why Your QR Code is Not Working
If your camera won't scan the QR Code, it's probably tilted at a certain angle while scanning. To fix this, ensure that your...
Read more >
12 Reasons why your QR code is not working
There are couple of reasons why a QR code does not function or scan properly. These codes are designed to be scanned by...
Read more >
Troubleshoot QR code scanning with your phone's camera
Tap Continue without scanning at the bottom of the QR code scanning screen. Then, type in your product's entry key or serial number....
Read more >
"Unrecognized QR Code" every time I scan any QR code
The workaround that fixed it for me was to use Bixby Vision to scan the QR code. It then asked if I wanted...
Read more >
Troubleshooting QR Code problems for Two-Step Verification
If you are having problems seeing or scanning the QR Code during the Two-Step Verification, you can manually enter the secret code instead....
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