Skip to content

fix: crash when client removed (cherrypick from rc) (#WPB-18706) #4193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 15, 2025

Conversation

sbakhtiarov
Copy link
Contributor

@sbakhtiarov sbakhtiarov commented Aug 15, 2025

BugWPB-18706 [Android] Crash when account was deleted or device was removed

This PR was manually cherry-picked based on the following PR:


What's new in this PR?

Issues

Application crash when current client is deleted from other device.

Causes (Optional)

  1. Current client removal triggers logout and clears data.
  2. Data clear resets the "initialSyncCompleted" flag and HomeViewModel navigates to InitialSyncScreen.
  3. This screen is not supposed to be called with no session and crashes on dependencies setup.

Solutions

Check current session availability in HomeViewModel before navigating to InitialSyncScreen.

Copy link

codecov bot commented Aug 15, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.70%. Comparing base (69fc6c9) to head (6c3cffe).

Files with missing lines Patch % Lines
...n/kotlin/com/wire/android/ui/home/HomeViewModel.kt 50.00% 0 Missing and 2 partials ⚠️

❌ Your patch check has failed because the patch coverage (50.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4193   +/-   ##
========================================
  Coverage    47.70%   47.70%           
========================================
  Files          509      509           
  Lines        17418    17422    +4     
  Branches      2860     2862    +2     
========================================
+ Hits          8309     8311    +2     
  Misses        8251     8251           
- Partials       858      860    +2     
Files with missing lines Coverage Δ
...n/kotlin/com/wire/android/ui/home/HomeViewModel.kt 83.33% <50.00%> (-3.04%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 69fc6c9...6c3cffe. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@yamilmedina yamilmedina changed the title fix: crash when client removed (cherrypick from bund) (#WPB-18706) fix: crash when client removed (cherrypick from rc) (#WPB-18706) Aug 15, 2025
Copy link

@yamilmedina yamilmedina merged commit 3ba91b4 into develop Aug 15, 2025
14 of 15 checks passed
@yamilmedina yamilmedina deleted the fix/crash-on-logout-merge branch August 15, 2025 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants