tauri-apps / tauri-apps/plugins-workspace

Barcode scanner plugin can't scan binary QR codes

Open
#3,468 2 comments 0 reactions 0 assignees View on GitHub
platform: android plugin: barcode-scanner type: bug
Dominant language
Rust
Stars
1.8k
Forks
602
Avg merge
4d 14h
Merged PRs (30d)
9

Description

### Describe the bug

When I scan a binary QR code, it returns an empty string to the JS API.

I'm using qr2term to encode the QR code, and it takes any byte slice: https://docs.rs/qr2term/latest/qr2term/fn.generate_qr_string.html

And I believe binary QR codes are standard. They're mentioned on Wikipedia alongside numeric, alphanumeric, and Kanji: https://en.wikipedia.org/wiki/QR_code#Information_capacity

Most QR codes point to URLs so I guess it won't come up much.

As a workaround, I encoded my binary with Base32. This gave me a slightly bigger QR code than binary.

### Reproduction

_No response_

### Expected behavior

Expected scanning a binary QR code to result in some binary output.

### Full `tauri info` output

```text
(hid some stuff for privacy)

[✔] Environment
- OS: -----
✔ rustc: 1.96.0 (ac68faa20 2026-05-25)
✔ cargo: 1.96.0 (30a34c682 2026-05-25)
✔ rustup: 1.29.0 (28d1352db 2026-03-05)
✔ Rust toolchain: ----
- node: ----
- pnpm: ----
- npm: ----

[-] Packages
- tauri 🦀: 2.11.3
- tauri-build 🦀: 2.6.3
- wry 🦀: 0.55.1
- tao 🦀: 0.35.3
- @tauri-apps/api ⱼₛ: 2.11.1
- @tauri-apps/cli ⱼₛ: 2.10.1 (outdated, latest: 2.11.4)

[-] Plugins
- tauri-plugin-opener 🦀: 2.5.4
- @tauri-apps/plugin-opener ⱼₛ: 2.5.3 (outdated, latest: 2.5.4)
- tauri-plugin-barcode-scanner 🦀: 2.4.5
- @tauri-apps/plugin-barcode-scanner ⱼₛ: 2.4.5

[-] App
- build-type: bundle
- CSP: unset
- frontendDist: ../dist
- devUrl: ----
- framework: React
- bundler: Vite
```

### Stack trace

```text

```

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by tracing the tauri-plugin-barcode-scanner Rust plugin and its @tauri-apps/plugin-barcode-scanner JS API, then reproduce the report with binary data generated by qr2term. Determine how binary scan results are represented across that boundary and verify that the JS API preserves the payload instead of returning an empty string.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, rust
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.