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

MatrixRTC leaveRoomSession bug #4500

Open
Kimblis opened this issue Nov 6, 2024 · 0 comments
Open

MatrixRTC leaveRoomSession bug #4500

Kimblis opened this issue Nov 6, 2024 · 0 comments
Labels
A-VoIP O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect

Comments

@Kimblis
Copy link

Kimblis commented Nov 6, 2024

There is a multiple problems with this method, which could be solved with one or more solutions, however everything stems from the fact that currently we're only checking for isJoined() which checks if user is in RTC session, however we don't check user membership - if he is still in matrix room. Therefore if matrix room membership is leave we can still call this method and it goes to the point where it makes an authorized http request to the matrix server to inform about a state change. The server responds with 403, since user is not in the room anymore, which would be absolutely fine. However there is a logic where on try/catch block if there is an error from this request- it retries after some delay - which in this situation causes an infinite error loop.

Possible fixes and improvements for this:

  1. We should check user membership to make sure we're able to send the request to the matrix server before actually sending it.
  2. In try/catch block if we want to keep the retry logic- check for the type of error, if it's an error that states that server is down - then it is very good idea to have this retry logic, however if it's something like 403 or 400 - it will never succeed with same data- right? Then why retry this non stop?
  3. There is timeout logic for leaveRoomSession logic, which works fine if request just takes to long and doesn't error out, however if it goes into that catch retry logic- the timeout doesn't work anymore, and we still get into that infinite loop.

matrix-js-sdk version that I'm using is ^34.7.0

Let me know if there is something else you would like me to add to an issue and let me know which solution sounds the best, I might make a PR for it :)

@dosubot dosubot bot added the T-Defect label Nov 6, 2024
@florianduros florianduros added A-VoIP S-Minor Impairs non-critical functionality or suitable workarounds exist O-Uncommon Most users are unlikely to come across this or unexpected workflow labels Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-VoIP O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect
Projects
None yet
Development

No branches or pull requests

2 participants