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 crash in the room list after a forced log out in background #3180

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

jmartinesp
Copy link
Member

Content

Take into account IllegalStateException too when trying to retrieve a room from RoomListService.

Motivation and context

Fixes #3173, although it doesn't fix the logout that caused the crash.

Tests

I don't see an easy way to test this.

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • Changes have been tested on an Android device or Android emulator with API 23
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • Pull request includes a sign off
  • You've made a self review of your PR

@jmartinesp jmartinesp added the PR-Bugfix For bug fix label Jul 12, 2024
@jmartinesp jmartinesp requested a review from a team as a code owner July 12, 2024 08:30
@jmartinesp jmartinesp requested review from ganfra and removed request for a team July 12, 2024 08:30
Copy link
Contributor

github-actions bot commented Jul 12, 2024

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/zN6MY5

Copy link

codecov bot commented Jul 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.15%. Comparing base (2ff5fa6) to head (865de02).
Report is 6 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3180   +/-   ##
========================================
  Coverage    76.15%   76.15%           
========================================
  Files         1645     1645           
  Lines        38738    38738           
  Branches      7496     7496           
========================================
  Hits         29501    29501           
  Misses        5343     5343           
  Partials      3894     3894           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

return try {
room(roomId)
} catch (exception: RoomListException) {
Timber.d(exception, "Failed finding room with id=$roomId.")
return null
} catch (exception: IllegalStateException) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we just catch any exception then?

@jmartinesp jmartinesp force-pushed the fix/jme/room-list-service-crash-in-bg branch from 089320d to 115f51b Compare July 16, 2024 06:26
@jmartinesp jmartinesp requested a review from ganfra July 16, 2024 06:26
@jmartinesp jmartinesp force-pushed the fix/jme/room-list-service-crash-in-bg branch from 115f51b to 865de02 Compare July 16, 2024 07:34
Copy link

sonarcloud bot commented Jul 16, 2024

@jmartinesp jmartinesp added the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jul 16, 2024
@jmartinesp jmartinesp enabled auto-merge (squash) July 16, 2024 11:01
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Jul 16, 2024
@jmartinesp jmartinesp merged commit d626660 into develop Jul 16, 2024
30 checks passed
@jmartinesp jmartinesp deleted the fix/jme/room-list-service-crash-in-bg branch July 16, 2024 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Bugfix For bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash in background
2 participants