mirror of
https://github.com/bitwarden/android.git
synced 2026-03-25 07:41:55 -05:00
Autofocus for TOTP QR code on Android is not working #1075
Closed
opened 2025-11-26 22:38:29 -06:00 by GiteaMirror
·
15 comments
No Branch/Tag Specified
main
BWA-238-authenticator-sync-migration
clean-up-root-nav
sdlc/sdk-update
android-collections
PM-30130-remove-archive-feature-flag
PM-34042-preview-attachments-update
PM-32721-sort-password-history
llm/skill-refinements
release/2026.3-rc49
PM-24380/flight-recorder-redact-hostname
cx/android-architect-agent
llm/add-resolving-sdk-updates-skill
QA-1523/sanity-test-saucelabs
release/2026.3-rc48
PM-26577-app-links-support
PM-26896-autofill-fix
release/2026.2-rc47
PM-32714/fallback-to-web-vault-host
pr-6572
PM-28834/setting-app-layout-horizonos
release/2026.2-rc46
release/2026.1-rc45
PM-30644/added-logs-for-debug
PM-30644/quicktile-nav-not-showing-migration
minor-gradle-updates
release/2026.1-rc42
release/2026.1-rc44
release/2026.1-rc43
PM-28834/set-landscape-on-horizonos-devices
context-rules
devclarity/update-code-review-command
PM-20026/force-ltr-passwords-and-codes
release/2025.12-rc41
cmcg/testCoverage
PM-29014/talkback-support-for-passwords
release/2025.12-rc40
BRE-1305/publish_test
accept-user-certs
autofill-permissions
release/2025.11-rc39
PM-22479/check-all-certificates-validate-asset-links
release/2025.10-rc38
agalles/android-latest
optimize-test-workflows
tier2-test-sharding
retro-agent
PM-27001/skip-account-selection-only-one-exists-cxp
release/2025.10-rc37
agalles/test-1118
release/2025.10-rc36
PM-20593-token-refresh
QA-1126b/adding-native-sanity-test
release/2025.9-rc35
pm-25933/sdk-update-password
release/2025.9-rc34
release/2025.8-rc33
agalles/20250821-release
debug-release-issues
pm-24249-allow-automated-prs-for-sdk-updates
release/2025.8-rc32
release/WORKFLOW-TEST-2025.8-rc28
agalles/20250807release
release/2025.07-rc25
release/hotfix-v2025.7.0-bwa
pm-23311/export-vault-policy-bypass
release/2025.07-rc24
authenticator-pm-sync-flags-issue
ps/implement-sdk-repository-example
release/hotfix-v2025.6.0-bwpm
release/2025.06-rc21
agalles/automate-android-fastlane-patch
release/2025.05-rc20
release/2025.04-rc19
languages/basque
release/2025.03-rc19
update-readme
qrcode/feature
innovation/archive/pm-19153-archive-items
qrcode/2-ui-fields
qrcode/1-page
hold-on-biometric-prompt-alternative
release-notes-process
release/2025.02-rc16
bwa-monorepo
PM-8223/new-device-verification-ux-improvements
pm-18451/exempt-from-policies
test-bwa
cs-workaround-linked-0-copy
release/2025.01-rc15
release/2025.01-rc14
release/2024.12-rc13
pm-16670/sync-leave-notice
821
PM-16695/backport-lean-more-new-device-verification
km/15084-testing
release/hotfix-v2024.11.7
release/2024.11-rc1
pm-11304/collection-add-item-button
PM-14241/disabling-logs-app-crash
poc/offline-editing
new-version-calc
pm-11649/expired-link-services
pm-6702/add-feature-flag
pm-6702/email-verification-feature
pm-9933/marketing-copy-update
pm-6702/registration-flows
update-templates
pm-6701/email-verification-selfhost-registration
v2026.3.0-bwpm
v2026.3.0-bwa
v2026.2.1-bwpm
v2026.2.1-bwa
v2026.2.0-bwpm
v2026.2.0-bwa
v2026.1.1-bwa
v2026.1.1-bwpm
temp-test
v2026.1.0-bwpm
v2026.1.0-bwa
v2025.12.1-bwa
v2025.12.1-bwpm
v2025.12.0-bwa
v2025.12.0-bwpm
v2025.11.1-bwpm
v2025.11.1-bwa
v2025.11.0-bwpm
v2025.11.0-bwa
v2025.10.1-bwa
v2025.10.1-bwpm
v2025.10.0-bwa
v2025.10.0-bwpm
v2025.9.1-bwa
v2025.9.1-bwpm
v2025.9.0-bwa
v2025.9.0-bwpm
v2025.8.1-bwa
v2025.8.1-bwpm
v2025.8.0-bwa
v2025.8.0-bwpm
v2025.7.2-bwa
v2025.7.2-bwpm
v2025.7.1-bwa
v2025.7.1-bwpm
v2025.7.0-bwa
v2025.7.0-bwpm
v2025.6.1-bwpm
v2025.6.0-bwa
v2025.6.0-bwpm
v2025.1.0-bwa
v2025.5.0-bwa
v2025.5.0-bwpm
v2025.5.999
2025.4.0
v2025.4.0
untagged-4731eaadac73f3dfbbb8
v2025.3.0
v2025.2.0
untagged-815a165c5d70ffe75bc7
v2025.1.2
v2025.1.1
v2025.1.0
v2024.12.0
untagged-5a76b6392a4c8998c63a
v2024.11.7
v2024.11.6
v2024.11.5
v2024.11.4
v2024.11.3
v2024.11.2
v2024.11.1
v2024.11.0
v2024.10.2
v2024.10.1
v2024.10.0
v2024.9.0
v2024.8.1
v2024.8.0
v2024.7.3
v2024.7.2
v2024.7.1
v2024.7.0
v2024.6.1
v2024.6.0
v2024.5.1
v2024.4.1
v2024.4.2
v2024.4.0
v2024.3.3
v2024.3.1
v2024.3.0
v2024.2.1
v2024.2.0
v2024.1.1
v2024.1.0
v2023.12.0
v2023.10.0
v2023.9.2
maui-single-project-android
v2023.9.1
v2023.9.0
v2023.8.0
v2023.7.0
v2023.5.0
v2023.4.0
v2023.3.2
v2023.3.1
v2023.3.0
v2023.2.0
v2023.1.0
v2022.11.0
v2022.10.0
v2022.9.1
v2022.9.0
v2022.8.0
v2022.6.2
v2022.6.1
v2022.6.0
v2022.05.0
v2.18.0
v2.17.0
v2.16.4
v2.16.3
v2.16.2
v2.16.1
v2.15.0
v2.14.2
v2.14.1
v2.14.0
v2.13.0
v2.12.0
v2.11.3
v2.11.2
v2.11.1
v2.11.0
v2.10.0
v2.9.1
v2.9.0
v2.8.2
v2.8.1
v2.8.0
v2.7.2
v2.7.0
v2.6.1
v2.6.0
v2.5.6
v.2.5.5
v2.5.5
v2.5.4
v2.5.3
v2.5.2
v2.5.1
v2.5.0
v2.4.3
v2.4.2
v2.4.1
v2.4.0
v2.3.1
v2.3.0
v2.2.8
v2.2.7
v2.2.6
v2.2.2
v2.2.1
v2.2.0
v2.1.2
v2.1.0
v2.0.6
v2.0.5
v2.0.4
v2.0.3
v2.0.2
v2.0.1
v2.0.0
v1.22.1
v1.22.0
v1.21.0
v1.20.0
v1.19.0
v1.18.1
v1.18.0
v1.17.0
v1.16.0
v1.15.2
v1.15.1
v1.15.0
v1.14.4
v1.14.1
v1.14.0
v1.13.0
v1.12.2
v1.12.1
v1.12.0
v1.11.1
v1.11.0
v1.10.0
v1.9.0
v1.8.1
v1.8.0
v1.7.0
v1.6.5
v1.6.1
v1.6.0
v1.5.1
v1.5.0
v1.4.4
v1.4.3
v1.4.0
v1.3.0
v1.2.1
v1.2.0
v1.1.0
v1.0.0
v0.0.6
v0.0.5
v0.0.4
v0.0.3
v0.0.2
v0.0.1
No Label
Milestone
No items
No Milestone
Projects
Clear projects
No project
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/android#1075
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Sincasios on GitHub (Aug 3, 2020).
Describe the Bug
Months ago scan a QR code to add 2FA keys was working great. You can see that the camera is trying to focus the QR. Like other apps (Google Authenticator, for example).
But from the last month (I don't know how many) autofocus is not working, I can add in seconds the code to Google Authenticator, but when I open Bitwarden -> (entry) -> scan code I only see a blury screen and it never focus. I need to do some triks like zomm in the screen to have a bigger QR and move my phone far from the screen (where it has focus)
Steps To Reproduce
Expected Result
In 5. autofocus will try to focus the screen / QR code, like before and like other 2FA apps (Google Authenticator, for example). When the code is in focus BitWarden/QR Lib will decode the image and extract the QR Code
Actual Result
Screenshots or Videos
Environment
Additional Context
@RePacked commented on GitHub (Aug 4, 2020):
I can't reproduce this. Autofocus is working at my phone.
Device: OnePlus 8
Operating system: Android 10 (OxygenOS 10.5.9.IN21BA)
Build Version: 2.5.0 (3093)
Is this a Beta release? No
@Greenderella commented on GitHub (Aug 4, 2020):
Can't reproduce either. App is grabbing the code instantly
Device: Xiaomi MI A1
Operating system: Android 9
Build Version: 2.5.0 (3093)
Is this a Beta release? Yes
@Sincasios commented on GitHub (Aug 4, 2020):
But your autofocus is working? If you move your cellphone it is focusing different things? Maybe your "initial" focus is correct for your screen but if you point to other places you can see that the focus is the same.
I can't take a screnshot, it says something that for security I can't do this at this moment (with the camera on bitwarden), but I see very blurry the screen.
While I was writing this the phone was automatically locked. I unlocked it and autofocus start working! But... I locked it again and unloked and focus was fixed again, I can't restore the autofocus on BitWarden. I saw this very clearly because aI was pointing to my keyboard and I see how is focusing it. I pointed to the screen and focus worked too... until it stopped after lock the screen.
I can activate again autofocus on BitWarden a second time after try to take a screenshot that minimized BitWarden and poped-up a notification "You can't take a screenshot for security policies". After this autofocus on BW was working, I closed BW and opened again and focus is fixed again and I can't reproduce again the autofocus temporal fix.
So there is something that brokes BW autofocus on my phone, but I know that it can wok always because camera app and Google Authenticator doesn't have this problem
Edit: I can recover autofocus a third time moving BW to background and foreground, but I don't know why this happens.
@kekonn commented on GitHub (Oct 11, 2020):
Galaxy S10, Android 10. Also experiencing auto focus issues.
@deanrih commented on GitHub (Dec 10, 2020):
Hi, I'm using Asus Zenfone M2 and I have several issues, including Auto Focus not working and the Camera view is skewed/stretched according to the phone orientation.
For example, if it's Portrait mode, the camera view stretched top and down, making the QR Code tall and probably unreadable for the scanner, in addition with that, the Auto Focus fails and resulting in blurry, stretched image.
Edit:
Device: Asus Zenfone M2
Operating System: Android 9
Bild Version: 2.7.0 (3258)
Is this a Beta release? Yes
@hluaces commented on GitHub (Jan 28, 2021):
I'm affected by the issue, cant really scan any QR at all:
@PseudoResonance commented on GitHub (Jan 31, 2021):
As I was writing this, I thought of something. Perhaps, my phone is somehow unable to connect to Google's image recognition servers in order to read a QR code... That sounds like a stretch, because shouldn't your phone be able to read a QR code on its own and process it? But sure enough, I disconnected from my WiFi (with PiHole) and used mobile data, and Bitwarden immediately recognized the QR code.
If you're running PiHole, or a similar DNS blocking service, please try disconnecting from it and trying again. Although, I wonder, why does my phone need Google? in order to read a simple QR code?
I left the original message below anyways:
I have this same issue with a Samsung Galaxy S8 running Android 9.
Although, what I'm wondering, is if this issue actually has anything to do with Bitwarden. In my case, I've seen this exact same behavior in another app a few months ago. I forgot what it was, but while the view wasn't stretched, it refused to recognize/scan the QR code.
@charukiewicz commented on GitHub (Mar 9, 2021):
Experiencing the same issue.
@felihommen commented on GitHub (Dec 5, 2021):
Same issue.
Device: Xiaomi MI A1
OS Version: Android 9
Bitwarden 2.14.2
@ingalfsan commented on GitHub (Jan 30, 2022):
Same issue.
Device: Samsung Galaxy J3 (SM-J320A)
OS Version: Android 6.0.1
@vvolkgang commented on GitHub (Mar 7, 2022):
@ingalfsan Hi! Can you re-test using the latest released version please?
@demonshreder commented on GitHub (Feb 21, 2023):
Hi folks,
I am facing this issue even now.
Phone: Redmi Note 11
App: 2023.1.0
Android: 12
MIUI: 13.0.4
Let me know if any other info is required to help out
@illagrenan commented on GitHub (Oct 20, 2023):
I have the same problem on a Motorola Edge 30 PRO with pure Android 13.
@Sincasios commented on GitHub (May 31, 2024):
The problem is still present, and now I can't get focus.
I was trying to add a TOTP and it's impossible for this in particular. I opened "Google Authenticator" and it detects the code inmediately, i very very fast, I can't almost see what Google Authenticator sees because it add the code almost inmediatelly.
I opened the samsung Camera and and pointed to the screen and it decodes inmediatelly the Qr (giving to me the text). The Qr is focused.
But if I open Bitwarden app -> TOTP it's imposible. It shows a bigger image (like if it is zoomed compared with Samsung Camera) and some points very blury. I move the phone until I seee the Qr clearly (at least on the screen) but it is not scanned.
Now I'm using a "Galaxy A13" phone.
I'm trying to add OpenAI TOTP.
@vvolkgang commented on GitHub (Jun 20, 2024):
Issue migrated to https://github.com/bitwarden/mobile/issues/1031