Open Bug 1946603 Opened 1 month ago Updated 23 days ago

QR code preview sometimes shows with vertically-squashed aspect ratio

Categories

(Fenix :: QR, defect)

All
Android
defect

Tracking

(Not tracked)

People

(Reporter: dholbert, Unassigned)

Details

Attachments

(5 files)

Steps to reproduce

  1. Tap the qr-code-scan icon in Fenix's URL bar
  2. Point your camera straight-on at a perfect circle (so you can easily tell if it's squashed or not)
  3. If the circle looks circular (e.g. it fits perfectly in the target square), turn your screen off and on again, or leave the QR-code scanner and reenter it.

Expected behavior

QR code camera-preview should always be shown with a proper aspect ratio, without objects being distorted.

Actual behavior

QR code camera-preview is sometimes shown vertically-squashed -- so circles look like ovals, and squares (e.g. QR codes) look like squashed rectangles).

Device information

  • Firefox version: Nightly 136.0a1 2025-02-03
  • Android device model: Pixel 9 Pro XL (also repro'd on a Pixel 6a)
  • Android OS version: 15

Any additional information?

  • This affects the QR code scanner in the Firefox Sync/Mozilla-Account pairing flow as well.
  • I think (but am not entirely sure) that this makes it a bit harder to capture a QR code, because the code itself is distorted. At least, my perception when doing some QR-code-scanning just now was that it took longer for Firefox to capture the QR code when this bug was happening.
  • I don't know how to make this happen on-demand, unfortunately, but it's often enough that I can trigger it pretty easily as described in the STR.

Here's a screencast of me using the QR code scanner to look at the top of a french press coffee maker, with a perfectly round lid.

In this screencast, I I open the QR Code scanner 3 times. The first two times, the lid is nicely round. The third time, it's vertically squashed.

In the good rendering, it looks like we're displaying a square camera feed in our square rendering area.

In the bad rendering, it looks like maybe we're displaying a tall-rectangular camera feed that's as large as my phone display's full aspect-ratio (like what my Camera app would normally show), and we're squashing that into our square rendering area.

I think (but am not entirely sure) that this makes it a bit harder to capture a QR code, because the code itself is distorted. At least, my perception when doing some QR-code-scanning just now was that it took longer for Firefox to capture the QR code when this bug was happening.

This bug has been here since the time of the original implementation as far as I can remember - I don't believe the camera preview has an effect on scanning the code scanning though.

Attachment #9464524 - Attachment description: screecast of bug (good rendering at first, squashed at the end) → screecast of bug (good rendering at first, bad/squashed rendering at the end)

I confirm the bug on android 14.
Phone model: Nokia X20
Firefox Android build: 137.0a1 (build 2016072095)
build date: 2025-02-05T19:30:05

The problem occurs some times I learn the qr code scanning function. The problem preens radomically. see attachments.

Attached image Good Rendering NG.png
Attached image Bad rendering NG .png
Status: UNCONFIRMED → NEW
Ever confirmed: true

The severity field is not set for this bug.
:royang, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(royang)
Severity: -- → S3
Flags: needinfo?(royang)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: