TOTP scanning fails on tall android devices #1545

Closed
opened 2025-11-26 22:52:08 -06:00 by GiteaMirror · 9 comments
Owner

Originally created by @varunyellina on GitHub (Dec 15, 2022).

Steps To Reproduce

  1. On Android device, edit a saved login to add TOTP for 2FA.
  2. If your device is not the standard aspect ratio of 16:9, then the camera preview will look stretched vertically in Bitwarden.
  3. Scanning fails on my 21:9 Flip phone.

Expected Result

It should scan normally.

Actual Result

It is not scanning. It is scanning normally if I fold the phone into a 90deg shape. The camera preview is not warped in this mode.

Screenshots or Videos

PXL_20221215_052038660
PXL_20221215_052104632
PXL_20221215_052204934

Additional Context

No response

Operating System

Android

Operating System Version

13

Device

Samsung Z Flip 3

Build Version

2022.11.0 (5880)

Beta

  • Using a pre-release version of the application.
Originally created by @varunyellina on GitHub (Dec 15, 2022). ### Steps To Reproduce 1. On Android device, edit a saved login to add TOTP for 2FA. 2. If your device is not the standard aspect ratio of 16:9, then the camera preview will look stretched vertically in Bitwarden. 3. Scanning fails on my 21:9 Flip phone. ### Expected Result It should scan normally. ### Actual Result It is not scanning. It is scanning normally if I fold the phone into a 90deg shape. The camera preview is not warped in this mode. ### Screenshots or Videos ![PXL_20221215_052038660](https://user-images.githubusercontent.com/1850730/207780440-8b0460a2-a3a3-47f2-834d-9383548c4562.jpg) ![PXL_20221215_052104632](https://user-images.githubusercontent.com/1850730/207780454-d4eb7376-04ea-4219-a7f7-39dfa7ea33ca.jpg) ![PXL_20221215_052204934](https://user-images.githubusercontent.com/1850730/207780459-430be617-6857-42d8-92af-7beb61931eef.jpg) ### Additional Context _No response_ ### Operating System Android ### Operating System Version 13 ### Device Samsung Z Flip 3 ### Build Version 2022.11.0 (5880) ### Beta - [ ] Using a pre-release version of the application.
GiteaMirror added the bug label 2025-11-26 22:52:08 -06:00
Author
Owner

@ntlv commented on GitHub (Dec 28, 2022):

I can repro this on an Asus Zenfone 9 though it is less extreme. Perhaps Google's recently released Viewfinder library could be used to solve this issue.

@ntlv commented on GitHub (Dec 28, 2022): I can repro this on an Asus Zenfone 9 though it is less extreme. Perhaps Google's recently released [Viewfinder library](https://android-developers.googleblog.com/2022/11/introducing-camera-viewfinder.html) could be used to solve this issue.
Author
Owner

@dal00 commented on GitHub (Jan 18, 2023):

@varunyellina you should change that TOTP if you are using it because it is readable in the reflection of your phone.

@dal00 commented on GitHub (Jan 18, 2023): @varunyellina you should change that TOTP if you are using it because it is readable in the reflection of your phone.
Author
Owner

@Cheesebaron commented on GitHub (Jan 25, 2023):

ZXing.Net.Mobile is kind of a dead project and has so many issues with regards to handling aspect ratios with cameras. Detecting cameras and their resolutions. Handling frames from high resolution cameras and more. Mainly on Android though.

For simple QR codes I highly recommend just rolling your own AVFoundation code for iOS reading AVMetadataObjects and for Android using AndroidX.Camera.View + a simple frame analyzer that sends the data to ZXing.Net.

This has solved most QR code reading issues in most of my Apps, where I was using ZXing.Net.Mobile before.

@Cheesebaron commented on GitHub (Jan 25, 2023): ZXing.Net.Mobile is kind of a dead project and has so many issues with regards to handling aspect ratios with cameras. Detecting cameras and their resolutions. Handling frames from high resolution cameras and more. Mainly on Android though. For simple QR codes I highly recommend just rolling your own AVFoundation code for iOS reading AVMetadataObjects and for Android using AndroidX.Camera.View + a simple frame analyzer that sends the data to ZXing.Net. This has solved most QR code reading issues in most of my Apps, where I was using ZXing.Net.Mobile before.
Author
Owner

@N1co93 commented on GitHub (Jan 27, 2023):

I can confirm this issue on my Google Pixel 6 with Android 13.

@N1co93 commented on GitHub (Jan 27, 2023): I can confirm this issue on my Google Pixel 6 with Android 13.
Author
Owner

@Greenderella commented on GitHub (Feb 14, 2023):

Hi there,

This issue appears to be duplicated from this one: https://github.com/bitwarden/mobile/issues/1130

I will proceed to close this one. If you wish to add any further information/screenshots/recordings etc., please feel free to do so here: https://github.com/bitwarden/mobile/issues/1130 - our engineering team will be happy to review these.

@Greenderella commented on GitHub (Feb 14, 2023): Hi there, This issue appears to be duplicated from this one: https://github.com/bitwarden/mobile/issues/1130 I will proceed to close this one. If you wish to add any further information/screenshots/recordings etc., please feel free to do so here: https://github.com/bitwarden/mobile/issues/1130 - our engineering team will be happy to review these.
Author
Owner

@test4testUnlimit commented on GitHub (May 11, 2023):

Same problem on Samsung Galaxy A30s (and A50)

@test4testUnlimit commented on GitHub (May 11, 2023): Same problem on Samsung Galaxy A30s (and A50)
Author
Owner

@capatina commented on GitHub (Oct 19, 2023):

HELLO, SAME PROBLEM HERE. PLEASE FIX IT ASAP (GALAXY Z FOLD 5)

@capatina commented on GitHub (Oct 19, 2023): HELLO, SAME PROBLEM HERE. PLEASE FIX IT ASAP (GALAXY Z FOLD 5)
Author
Owner

@test4testUnlimit commented on GitHub (Nov 4, 2023):

Dude, I see your secret QR in reflection...

@test4testUnlimit commented on GitHub (Nov 4, 2023): Dude, I see your secret QR in reflection...
Author
Owner

@varunyellina commented on GitHub (Dec 22, 2023):

Dude, I see your secret QR in reflection...

Changed the TOTP.

@varunyellina commented on GitHub (Dec 22, 2023): > Dude, I see your secret QR in reflection... Changed the TOTP.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#1545