[PR #6623] PM-33266: Allow the VaultUnlockViewModel and VaultViewModel to safely initialize without a UserState #12871

Closed
opened 2026-04-11 03:52:37 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/bitwarden/android/pull/6623

State: closed
Merged: Yes


🎟️ Tracking

PM-33266

📔 Objective

This PR addresses a race-condition that I believe occurs when a user is logged-out and the app switches to the next available user but the next user is also about to be logged-out automatically (possibly an expired refresh token). During this time we attempt to display the VaultScreen or VaultUnlockScreen which will crash if the ViewModel constructor is called and the UserState is not present.

**Original Pull Request:** https://github.com/bitwarden/android/pull/6623 **State:** closed **Merged:** Yes --- ## 🎟️ Tracking [PM-33266](https://bitwarden.atlassian.net/browse/PM-33266) ## 📔 Objective This PR addresses a race-condition that I believe occurs when a user is logged-out and the app switches to the next available user but the next user is also about to be logged-out automatically (possibly an expired refresh token). During this time we attempt to display the VaultScreen or VaultUnlockScreen which will crash if the ViewModel constructor is called and the UserState is not present. [PM-33266]: https://bitwarden.atlassian.net/browse/PM-33266?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
GiteaMirror added the pull-request label 2026-04-11 03:52:37 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#12871