talk-android icon indicating copy to clipboard operation
talk-android copied to clipboard

video/audio connection can't be esablished (reproducible 🎉)

Open jakobroehrl opened this issue 4 years ago • 5 comments

This bug concerns all android talk versions and it occours on 1:1 Calls and groupcalls The bug is shown with only android devices and in mixed (iOS, Browser, Android) calls

Example with 2 Androids

  1. Kill Talk app on both devices or wait overnight
  2. Start a call (audio or video) with user A
  3. do one of this possibilties: a) Join with user B (audio or video) and leave the call with both users (order does not matter) afterwards OR b) declide the call with User B and hang up with User A afterwards OR c) Miss the call with User B and hang up with User A afterwards
  4. Now you can follow the steps 2 - 4 how often you want, every time it's woking TILL
  5. user B starts the call. No connection will be established. And now the app is in a "error" state. No call can be established, no matter whether user A oder user B starts the call, the only solution is User A kills the App (User B don't have to kill the App)

The error state is room related. If e.g. User C calls user A, it's working till User A do a callback to User C, than this room is in the error state, too.

In this error state all kinds of interessting errors are shown: double ringing, ... It seams the 2 devices talk at cross purposes, maybe related with https://github.com/nextcloud/talk-android/issues/1633

EDIT: @mahibi @nickvergessen Tested a lot more to clarfy, maybe this could help. The Caller (User A) creates a kind of "connection" which is not reseted.

jakobroehrl avatar Nov 18 '21 07:11 jakobroehrl

@jakobroehrl how did you join the calls that are started? by notification or by manually clicking the phone button in the chat?

mahibi avatar Nov 20 '21 23:11 mahibi

@jakobroehrl how did you join the calls that are started? by notification or by manually clicking the phone button in the chat?

@mahibi by notification (the notification hides the phone button)

Could you find a problem in the code?

jakobroehrl avatar Nov 21 '21 08:11 jakobroehrl

couldn't find it yet but i'm on it everytime i find a free minute..

mahibi avatar Nov 23 '21 21:11 mahibi

ok got it.

whenever you leave the chatview and you are NOT dialing, it's triggered to leave the room. see https://github.com/nextcloud/talk-android/blob/master/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt#L1582 But leaving the room fails because of https://github.com/nextcloud/talk-android/issues/1725 So after this error the connection is not successful.

whenever you leave the chatview and you ARE dialing, leaving the room is not triggered but the same session is used. so the connection is successful.

So as long userA started the call (he was always dialing), the connection was successful. When userB starts the call, userA gets a notification while he is in the chatview. Because userA is not dialing, inside the chatview onDetach triggers that the room is left. And this fails because of https://github.com/nextcloud/talk-android/issues/1725

I first tried to fix this with https://github.com/nextcloud/talk-android/pull/1723 but this would have been only a workaround. The main error to fix is https://github.com/nextcloud/talk-android/issues/1725

mahibi avatar Nov 24 '21 07:11 mahibi

@mahibi Would this also be related the following ?

  1. Join the call via WIFI Disconnect from Wi-Fi
  2. Mobile Data activates
  3. Talk app never reestablish the connection via mobile data

AndyXheli avatar Jul 08 '22 17:07 AndyXheli