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 Cherry-pick [WPB-11113] #3547

Conversation

borichellow
Copy link
Contributor

@borichellow borichellow commented Oct 23, 2024

BugWPB-11113 [Android] crash on starting foreground service

Cherry-pick for RC from develop PR

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 changed the title fix: Wrap persistent connection service in try Cherry-pick fix: Wrap persistent connection service in try Cherry-pick [WPB-11113] Oct 23, 2024
@echoes-hq echoes-hq bot added the echoes: bugs Technical or functional defects in the product label Oct 23, 2024
@codecov-commenter
Copy link

codecov-commenter commented Oct 23, 2024

Codecov Report

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

Project coverage is 45.24%. Comparing base (f3f6c1c) to head (1f4055a).
Report is 1 commits behind head on release/candidate.

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                  @@
##           release/candidate    #3547      +/-   ##
=====================================================
- Coverage              45.29%   45.24%   -0.06%     
=====================================================
  Files                    470      470              
  Lines                  15701    15708       +7     
  Branches                2627     2627              
=====================================================
- Hits                    7112     7107       -5     
- Misses                  7843     7856      +13     
+ Partials                 746      745       -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 f3f6c1c...1f4055a. Read the comment docs.

Copy link
Contributor

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

Copy link

sonarcloud bot commented Oct 23, 2024

@ohassine ohassine added this pull request to the merge queue Oct 23, 2024
Copy link
Contributor

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

Merged via the queue into release/candidate with commit 7552d7f Oct 23, 2024
12 of 13 checks passed
@ohassine ohassine deleted the fix/wrap_persistant_connection_service_in_try_cherry_pick branch October 23, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DO NOT CHERRY PICK echoes: bugs Technical or functional defects in the product size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants