mirror of
https://github.com/bitwarden/android.git
synced 2026-03-11 20:54:58 -05:00
Android app crash when scanning TOTP QR Code #1186
Closed
opened 2025-11-26 22:41:27 -06:00 by GiteaMirror
·
30 comments
No Branch/Tag Specified
main
fix/PM-33394-throwable-extensions
fix/PM-33394-sync-unlock-error
sdlc/sdk-update
PM-24380/flight-recorder-redact-hostname
release/2026.3-rc48
claude/android-implementer-agent
PM-26577-app-links-support
PM-26896-autofill-fix
renovate/lock-file-maintenance
release/2026.2-rc47
PM-32714/fallback-to-web-vault-host
pr-6572
PM-28834/setting-app-layout-horizonos
vvolkgang/process-release-notes-v2
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
claude-skill/creating-feature-flags
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.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#1186
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 @sso-bitwarden on GitHub (Jan 20, 2021).
Describe the Bug
App crash when scanning QR code to add TOTP
Steps To Reproduce
Expected Result
TOTP configured
Actual Result
App crash and back to Android home screen
Screenshots or Videos
Environment
@bchociej commented on GitHub (Jan 20, 2021):
Hi, I am the one who reported the bug via email to support@bitwarden.com, and Sugianto kindly logged this issue for me. Happy to provide more info as needed.
@JOduMonT commented on GitHub (Feb 10, 2021):
Hi @juristat;
I would like effectively more info since it also happen on my new phone and I had previously opened an issue for the same kind of behavior.
My new phone is an Samsung Galaxy S8 (SM-G950F) "dreamlte" with Android Pie (9) I have the same issue with the Bitwarden app version 2.6.1.
Previously I opened this issue but it was for a different phone.
https://github.com/bitwarden/mobile/issues/1157
@isaialcantara commented on GitHub (Feb 17, 2021):
The same happens on a Samsung Galaxy J4 (2018). The camera viewfinder is somewhat narrower and the app crashes when it sees the QR code.
@kendratodd commented on GitHub (Mar 11, 2021):
Similar reports from https://github.com/bitwarden/mobile/issues/1289:
@tverspeelt commented on GitHub (Mar 23, 2021):
I have the same issue. It seems to only happen on 'complex' QR codes.
My workaround is to use Google Lens to get the URL from the QR, and paste the URL in Bitwarden.
@YpsilonOmega commented on GitHub (Apr 2, 2021):
It appears that I've got the same issue:
Device: Galaxy XCover 5 - SM-G525F/DS
OS: Android 11
Build Version: 2.9.1
@sambartle commented on GitHub (Apr 2, 2021):
I've never found one that cant be scanned in my case it just takes multiple attempts.
The complexity doesn't seem to matter in my case, its truly random as far as I can tell.
Device: Google Pixel 3
Operating system: Android 11 RQ1A.210205.004
Build Version (go to "Settings" → "About" in the app): 2.8.0 (3349)
@Matan commented on GitHub (Apr 10, 2021):
Same issue for me:
Device: Samsung A50
OS: Android 11
Build: 2.9.1
@Ksathral commented on GitHub (Jun 6, 2021):
I have never been able to scan a QR code from within the bitwarden app, it crashes on both official and custom roms (Android 7/8/9/10 all basd on Samsung oneui on my Galaxy S7 G930-F. The only time I did got it to work was when I used an AOSP based rom ( Android 9).
I just use a seperate QR code scanning app and copy / paste the url into the Bitwarden apps TOTP field to get it it to work.
@rlipscombe commented on GitHub (Aug 31, 2021):
Pixel 5. Crashes on Facebook TOTP setup; works fine on AWS Virtual MFA setup.
@cwille97 commented on GitHub (Sep 5, 2021):
Same issue:
Google Pixel 3a XL
Android 11
App version 2.12.0
@Akryum commented on GitHub (Sep 7, 2021):
Crashes on any QR code scanning, wasn't able to make it work on Pixel 4a | Android 11 | Bitwarden 2.12.0
@estevanbs commented on GitHub (Sep 21, 2021):
Same here.
Android 11 (Lineage OS 18.1)
SM-M205M
Bitwarden 2.12.0
@webprez commented on GitHub (Oct 2, 2021):
Same here.
@josiah-roberts commented on GitHub (Oct 24, 2021):
+1, only occasionally crashes for me.
@sso-bitwarden commented on GitHub (Nov 10, 2021):
+1
Device: Samsung J6
Operating system: Android 10
Build Version 2.14.2
Is this a Beta release? No
@fmbarina commented on GitHub (Dec 3, 2021):
+1, ocasional crashes.
Device: Asus Zenphone 3 Zoom (ZE553KL)
Operating system: Android 8
Build Version 2.14.2 (4005)
Is this a Beta release? N
I've tried to better understand what causes this, to make adding 2FA less of a hassle and hopefully help whoever looks into this in the future. But even testing different methods in different circumstances many times didn't lead me to any clear conclusion. A previous version of this comment said it did, which recently proved false upon further testing. I apologize for that, this is confusing.
@vvolkgang commented on GitHub (Feb 10, 2022):
Thanks everyone for the info! We weren't able to replicate this in multiple devices but we suspect the linked PR changes will fix it. If you previously had this issue, can you download the .apk from our CI and test it please?
Obligatory disclaimer: This isn't an official release that went through regression testing, there might be other unrelated issues overall, we just want to be sure this TOTP crash is fixed.
Issue was automatically closed due to being linked in the PR but I'm reopening this until we figure it out.
Edit: Updated the CI link
@aouerf commented on GitHub (Feb 14, 2022):
The issue I'm getting happens the second time I try to scan a QR code without restarting the app. The crash message is
java.lang.RuntimeException: Camera is being used after Camera.release() was called.@Larry-Sussman commented on GitHub (Feb 14, 2022):
This has been addressed by https://github.com/bitwarden/mobile/pull/1759 and should be resolved in the mobile app v2.16.2. Please let us know if this crash still occurs after this update. I'm leaving this issue open as @vvolkgang mentioned until we can confirm the fix.
@aouerf commented on GitHub (Feb 14, 2022):
I thought that I installed the update before reporting, but I guess not; this was a mistake on my part. After updating and testing, I can confirm that the latest build fixed the issue for me.
@fmbarina commented on GitHub (Feb 15, 2022):
Happy to see progress on this, but sadly it still occasionally crashes here. Adb logcat also shows
java.lang.RuntimeException: Camera is being used after Camera.release() was called.Device: Asus Zenphone 3 Zoom (ZE553KL)
Operating system: Android 8
Build Version 2.16.2 (4334)
@vvolkgang commented on GitHub (Feb 15, 2022):
@fmbarina can you provide reproduction steps? We believe that's a different issue and we've been unable to replicate it yet.
@fmbarina commented on GitHub (Feb 15, 2022):
I wish I could provide more helpful information - and do tell me if I'm doing this wrong. But I just...
And upon trying to scan, sometimes it crashes.
I'm willing to try to reproduce the issue with other tools if that'd be any help, I just don't know what those would be.
@kosmoz commented on GitHub (Feb 18, 2022):
I am also experiencing this issue.
The camera works fine until it "sees" the QR code, then the app crashes.
(2.16.2 on Xiaomi Mi5s running LineageOS 16, Android 9)
@Greenderella commented on GitHub (May 5, 2022):
This issue appears to still be present on version 2.18.0
@develop7 commented on GitHub (Jun 6, 2022):
I'm affected by the issue as well, version 2022.05.0 on Pixel 5 running Android 12 (security update May 5, 2022). Bitwarden app crashes on first attempt to scan the QR code; scanning the code after reopening the app after crash succeeds though.
@fedemkr commented on GitHub (Jun 6, 2022):
Thanks a lot for all the feedback, this is happening because of a racing issue so it's quite difficult to reproduce consistently, but a fix has been applied in #1942 and will be available in June's release. Please let us know if this keeps happening after the release, thanks.
@develop7 commented on GitHub (Jun 7, 2022):
@fedemkr any beta releases before that?
@fedemkr commented on GitHub (Jun 7, 2022):
Hi, @develop7 you can grab the apk from Github Action Artifacts and try it to see if that solves your issue but beware that the app may not be stable given that it's a development build and it hasn't been tested thoroughly by the test team yet.
Also, we're going to ship it to the beta channel before the final June release so you can wait for that as well to have more things included and better stability (just in case here also applies that it's not the final release so issues may appear during beta testing but much less than development build)