Skip to content
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

fix: Wrap persistent connection service in try [WPB-11113] #3532

Merged
merged 3 commits into from
Oct 23, 2024

Conversation

borichellow
Copy link
Contributor

@borichellow borichellow commented Oct 21, 2024

BugWPB-11113 [Android] crash on starting foreground service

What's new in this PR?

Issues

crashes in PlayStore https://play.google.com/console/u/0/developers/7098984309886892484/app/4973241010395499500/vitals/crashes/76ed8eaea06144fa56bcc122f39cd8a0/details?days=28&versionCode=100020981

Causes (Optional)

this happens when PersistentConnection Service is killed by some reason and restarted by OS from background.

Solutions

Basically the issue is on Android side, for now google suggests try-catch workaround only
https://issuetracker.google.com/issues/307329994#comment86

Also I've updated StartPersistentWebsocketIfNecessaryUseCase to use ServicesManager for starting Service instead of doing it directly. So we have 1 place where all the Services started from.

@borichellow borichellow self-assigned this Oct 21, 2024
@echoes-hq echoes-hq bot added the echoes: unplanned Any work item that isn’t part of the product or technical roadmap. label Oct 21, 2024
Copy link

@borichellow borichellow changed the title Fix: Wrap persistent connection service in try [WPB-11113] Ffix: Wrap persistent connection service in try [WPB-11113] Oct 21, 2024
@borichellow borichellow changed the title Ffix: Wrap persistent connection service in try [WPB-11113] fix: Wrap persistent connection service in try [WPB-11113] Oct 21, 2024
@codecov-commenter
Copy link

codecov-commenter commented Oct 21, 2024

Codecov Report

Attention: Patch coverage is 16.00000% with 21 lines in your changes missing coverage. Please review.

Project coverage is 45.27%. Comparing base (935f807) to head (d65cbc6).
Report is 7 commits behind head on develop.

Files with missing lines Patch % Lines
...ire/android/services/PersistentWebSocketService.kt 0.00% 15 Missing ⚠️
...otlin/com/wire/android/services/ServicesManager.kt 0.00% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3532      +/-   ##
===========================================
- Coverage    45.32%   45.27%   -0.06%     
===========================================
  Files          470      470              
  Lines        15692    15699       +7     
  Branches      2626     2626              
===========================================
- Hits          7112     7107       -5     
- Misses        7836     7849      +13     
+ Partials       744      743       -1     
Files with missing lines Coverage Δ
...ture/StartPersistentWebsocketIfNecessaryUseCase.kt 80.00% <100.00%> (+8.57%) ⬆️
...otlin/com/wire/android/services/ServicesManager.kt 71.79% <0.00%> (-5.99%) ⬇️
...ire/android/services/PersistentWebSocketService.kt 0.00% <0.00%> (-3.78%) ⬇️

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 935f807...d65cbc6. Read the comment docs.

Copy link
Contributor

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

Copy link
Contributor

Built wire-android-dev-debug-pr-3532.apk is available for download

@MohamadJaara
Copy link
Member

the fix version for this one is 4.9 can you please do the cherry pick to RC

@borichellow borichellow added this pull request to the merge queue Oct 23, 2024
Merged via the queue into develop with commit 44292c7 Oct 23, 2024
16 of 17 checks passed
@borichellow borichellow deleted the fix/wrap_persistant_connection_service_in_try branch October 23, 2024 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
echoes: unplanned Any work item that isn’t part of the product or technical roadmap. size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants