[PR #1869] [MERGED] Crash fixes #3192

Closed
opened 2025-11-26 23:29:29 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/1869
Author: @mpbw2
Created: 4/1/2022
Status: Merged
Merged: 4/1/2022
Merged by: @mpbw2

Base: masterHead: bugfixes


📝 Commits (2)

  • 9205a86 Crash fixes
  • c717383 added HasAutofillService to DeviceActionService

📊 Changes

7 files changed (+29 additions, -18 deletions)

View changed files

📝 src/Android/Services/BiometricService.cs (+9 -10)
📝 src/Android/Services/DeviceActionService.cs (+6 -1)
📝 src/App/Abstractions/IDeviceActionService.cs (+1 -0)
📝 src/App/Pages/Settings/AutofillServicesPageViewModel.cs (+2 -1)
📝 src/App/Pages/Vault/AutofillCiphersPageViewModel.cs (+2 -2)
📝 src/Core/Services/TokenService.cs (+4 -4)
📝 src/iOS.Core/Services/DeviceActionService.cs (+5 -0)

📄 Description

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

Fixes for several crashes reported in AppCenter

Code changes

  • BiometricService.cs: Extended try scope around keystore calls (_keyStore.GetKey(..) was throwing UnrecoverableKeyException which we catch, but only when calling cipher.Init(..))
  • DeviceActionService.cs: Null check cipher in addition to cipher.Login
  • AutofillServicesPageViewModel.cs Platform check Android before calling deviceActionService.AutofillServiceEnabled() which throws unsupported on iOS
  • AutofillCiphersPageViewModel.cs null check appOptions before getting appOptions.Uri
  • TokenService.cs move second _accessTokenForDecoding null check inside initial null check block as recommended in #1861

Testing requirements

N/A as these crashes haven't been reproduced in house

Before you submit

  • I have added unit tests where it makes sense to do so (encouraged but not required)
  • This change requires a documentation update (notify the documentation team)
  • This change has particular deployment requirements (notify the DevOps team)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/1869 **Author:** [@mpbw2](https://github.com/mpbw2) **Created:** 4/1/2022 **Status:** ✅ Merged **Merged:** 4/1/2022 **Merged by:** [@mpbw2](https://github.com/mpbw2) **Base:** `master` ← **Head:** `bugfixes` --- ### 📝 Commits (2) - [`9205a86`](https://github.com/bitwarden/android/commit/9205a868d27ac597334724f13a7e91116cc795a3) Crash fixes - [`c717383`](https://github.com/bitwarden/android/commit/c71738397addc956ab7fe22edf3e938acef36031) added HasAutofillService to DeviceActionService ### 📊 Changes **7 files changed** (+29 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `src/Android/Services/BiometricService.cs` (+9 -10) 📝 `src/Android/Services/DeviceActionService.cs` (+6 -1) 📝 `src/App/Abstractions/IDeviceActionService.cs` (+1 -0) 📝 `src/App/Pages/Settings/AutofillServicesPageViewModel.cs` (+2 -1) 📝 `src/App/Pages/Vault/AutofillCiphersPageViewModel.cs` (+2 -2) 📝 `src/Core/Services/TokenService.cs` (+4 -4) 📝 `src/iOS.Core/Services/DeviceActionService.cs` (+5 -0) </details> ### 📄 Description ## Type of change - [X] Bug fix - [ ] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective <!--Describe what the purpose of this PR is. For example: what bug you're fixing or what new feature you're adding--> Fixes for several crashes reported in AppCenter ## Code changes <!--Explain the changes you've made to each file or major component. This should help the reviewer understand your changes--> <!--Also refer to any related changes or PRs in other repositories--> * **BiometricService.cs:** Extended `try` scope around keystore calls (`_keyStore.GetKey(..)` was throwing `UnrecoverableKeyException` which we catch, but only when calling `cipher.Init(..)`) * **DeviceActionService.cs:** Null check `cipher` in addition to `cipher.Login` * **AutofillServicesPageViewModel.cs** Platform check Android before calling `deviceActionService.AutofillServiceEnabled()` which throws unsupported on iOS * **AutofillCiphersPageViewModel.cs** null check `appOptions` before getting `appOptions.Uri` * **TokenService.cs** move second `_accessTokenForDecoding` null check inside initial null check block as recommended in #1861 ## Testing requirements <!--What functionality requires testing by QA? This includes testing new behavior and regression testing--> N/A as these crashes haven't been reproduced in house ## Before you submit - [ ] I have added **unit tests** where it makes sense to do so (encouraged but not required) - [ ] This change requires a **documentation update** (notify the documentation team) - [ ] This change has particular **deployment requirements** (notify the DevOps team) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-26 23:29:29 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#3192