Skip to content

Bug: QR code generated with error correction level L, unreadable when printed small #659

Open

Description

@anshul23102

Bug Report: QR Code Error Correction Level L Causes Scan Failures in Print

Description

DevCard QR codes are generated using the default error correction level L
(7% data recovery). When the QR code is printed in a small format (e.g., on
a business card at 3cm x 3cm) or displayed on a low-resolution screen, even
minor smudging, pixelation, or partial occlusion (a logo overlay, a coffee
stain) makes the code unscannable. Level M (15%) or Q (25%) provides
substantially better real-world reliability at minimal size cost.

Steps to Reproduce

  1. Generate a DevCard QR code for a user.
  2. Print it at business-card scale (approximately 3cm x 3cm).
  3. Attempt to scan the printed code under non-ideal lighting.
  4. Observe scan failures that do not occur on the digital version.

Root Cause

The QR generation library is called without specifying an error correction
level, defaulting to L.

Impact

The primary sharing mechanism (QR code at physical events, conferences, on
printed business cards) is unreliable, directly undermining the product's
core value proposition.

Proposed Fix

Set error correction to M or Q in the QR generation call:

import QRCode from "qrcode";

const qrDataUrl = await QRCode.toDataURL(devCardUrl, {
  errorCorrectionLevel: "M",  // Recovers up to 15% damage
  margin: 2,
  width: 256,
});

Activity

  1. github-actions commented on Jul 3, 2026

    @github-actions
    Contributor

    Hi @anshul23102,

    Thanks for opening this issue.
    
    Please reply with one of the following areas so the issue can be routed to the appropriate team member:
    
    - /backend
    - /web
    - /mobile
    - /devops
    
    Once an area is selected, the corresponding label will be added automatically.
    
  2. anshul23102 commented on Jul 3, 2026

    @anshul23102
    ContributorAuthor

    @Dev-Card Hi! I came across this issue and I would love to work on it as part of GSSoC '26.

    I have reviewed the problem description carefully and am confident I can deliver a well-tested, production-ready fix within the contribution timeline. Please let me know if you need any additional context or have specific implementation preferences before I get started.

    Could you please assign this issue to me?

    /assign
    /claim

  3. anshul23102 commented on Jul 3, 2026

    @anshul23102
    ContributorAuthor

    Hi @Dev-Card, I'd like to work on this as part of GSSoC '26.

    The issue is accurate — error correction level L (7% recovery) is too weak for small prints. Level M (15%) or Q (25%) adds negligible size overhead but provides real robustness. A simple one-line change to the QR generation library call.

    I can update the code and test with various print sizes to confirm readability improves.

    /assign
    /claim

  4. Harxhit commented on Jul 15, 2026

    @Harxhit
    Collaborator

    @anshul23102 I have assigned this issue to you.

  5. moved this from Todo to In progress in DevCardon Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

  • Status
    In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions