You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WPB-19591 [Android] Crash in 1:1 call when both users enable video at the same time
PR Submission Checklist for internal contributors
The PR Title
conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
contains a reference JIRA issue number like SQPIT-764
answers the question: If merged, this PR will: ... ³
The PR Description
is free of optional paragraphs and you have filled the relevant parts to the best of your ability
What's new in this PR?
Issues
During SFT 1:1 call, when one of participants loses connection and their audio stops being established, the call is dropped.
Causes (Optional)
Some time ago, when having problems with leaving subconversations, we implemented some short-term solution by deleting subconversation instead of leaving it and also checking for the audio established value of another participant to determine whether it's still in the call and close the call otherwise. The original problem was already solved by implementing long-term solution to leaving the subconversation (solved removal key problem) and we applied that changes but only removed first part of the temporary fix from code in kalium, but the other (logic using audio established parameter) remained and it conflicts with recent changes that allow reconnection in the event of a short internet outage - because of that logic, when other person loses connection in SFT 1:1 call then the call is instantly closed. This happens as well when both users enable video at the same time - both then initiate changing the call to a video call and update MLS and there’s a moment for both when the other person doesn’t have audio established and because of this logic the call is closed in that moment.
Solutions
Removed that logic of checking for the other participant's audio established value, we already have the long-term solution implemented and when other participants leave a call then they just leave a subconversation safely so the same logic can be applied to Proteus and MLS regular and SFT 1:1 calls - close the call when participants list changes from 2 to 1. Thanks to that we can have "connecting" state on 1:1 calls as well and be able to reconnect in case of short internet outage and enable videos at the same time.
The whole logic of checking whether the app can use SFT in 1:1 calls and whether the given call is established 1:1 moved inside the CallHelper.shouldEndSFTOneOnOneCall method so that the whole logic is in one place and it's a standalone ready-to-use method that doesn't require any other checks outside of it.
Testing
Test Coverage (Optional)
I have added automated test to this contribution
How to Test
User 1 starts 1:1 SFT call, user 2 answers, user 2 loses internet connection for a couple of seconds and connects back.
User 1 starts 1:1 SFT call, user 2 answers, both enable video at the same time.
PR Post Submission Checklist for internal contributors (Optional)
Wire's Github Workflow has automatically linked the PR to a JIRA issue
PR Post Merge Checklist for internal contributors
If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.
❌ Patch coverage is 93.75000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 59.59%. Comparing base (df99ed0) to head (9d7fc76).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764The PR Description
What's new in this PR?
Issues
During SFT 1:1 call, when one of participants loses connection and their audio stops being established, the call is dropped.
Causes (Optional)
Some time ago, when having problems with leaving subconversations, we implemented some short-term solution by deleting subconversation instead of leaving it and also checking for the audio established value of another participant to determine whether it's still in the call and close the call otherwise. The original problem was already solved by implementing long-term solution to leaving the subconversation (solved removal key problem) and we applied that changes but only removed first part of the temporary fix from code in kalium, but the other (logic using audio established parameter) remained and it conflicts with recent changes that allow reconnection in the event of a short internet outage - because of that logic, when other person loses connection in SFT 1:1 call then the call is instantly closed. This happens as well when both users enable video at the same time - both then initiate changing the call to a video call and update MLS and there’s a moment for both when the other person doesn’t have audio established and because of this logic the call is closed in that moment.
Solutions
Removed that logic of checking for the other participant's audio established value, we already have the long-term solution implemented and when other participants leave a call then they just leave a subconversation safely so the same logic can be applied to Proteus and MLS regular and SFT 1:1 calls - close the call when participants list changes from 2 to 1. Thanks to that we can have "connecting" state on 1:1 calls as well and be able to reconnect in case of short internet outage and enable videos at the same time.
The whole logic of checking whether the app can use SFT in 1:1 calls and whether the given call is established 1:1 moved inside the
CallHelper.shouldEndSFTOneOnOneCallmethod so that the whole logic is in one place and it's a standalone ready-to-use method that doesn't require any other checks outside of it.Testing
Test Coverage (Optional)
How to Test
User 1 starts 1:1 SFT call, user 2 answers, user 2 loses internet connection for a couple of seconds and connects back.
User 1 starts 1:1 SFT call, user 2 answers, both enable video at the same time.
PR Post Submission Checklist for internal contributors (Optional)
PR Post Merge Checklist for internal contributors
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.