Skip to content

fix: crash on logout [WPB-18706] #4147

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
Jul 29, 2025
Merged

Conversation

sbakhtiarov
Copy link
Contributor

@sbakhtiarov sbakhtiarov commented Jul 25, 2025

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

https://wearezeta.atlassian.net/browse/WPB-18706

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 Jul 25, 2025

Codecov Report

Attention: Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 45.88%. Comparing base (a4b4e1d) to head (9f1f50e).

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

❌ Your patch check has failed because the patch coverage (60.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                 @@
##           release/candidate    #4147   +/-   ##
==================================================
  Coverage              45.88%   45.88%           
==================================================
  Files                    492      492           
  Lines                  17213    17217    +4     
  Branches                2870     2872    +2     
==================================================
+ Hits                    7898     7900    +2     
  Misses                  8515     8515           
- Partials                 800      802    +2     
Files with missing lines Coverage Δ
...n/kotlin/com/wire/android/ui/home/HomeViewModel.kt 81.03% <60.00%> (-2.30%) ⬇️

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 a4b4e1d...9f1f50e. Read the comment docs.

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

Copy link
Contributor

Built wire-android-staging-compat-pr-4147.apk is available for download

@sbakhtiarov sbakhtiarov requested a review from saleniuk July 25, 2025 13:05
Copy link

Copy link
Contributor

Built wire-android-staging-compat-pr-4147.apk is available for download

@sbakhtiarov sbakhtiarov added this pull request to the merge queue Jul 29, 2025
Merged via the queue into release/candidate with commit 858baba Jul 29, 2025
13 of 14 checks passed
@sbakhtiarov sbakhtiarov deleted the fix/crash-on-logout branch July 29, 2025 09:10
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.

3 participants