-
-
Notifications
You must be signed in to change notification settings - Fork 226
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 establishing of call connection on HPB #3177
Conversation
… on HPB Everytime a second attempt was made to enter a call, the connection failed. How to reproduce: - Enter the ChatActivity -> joins the room (so the new session is in the ApplicationWideCurrentRoomHolder) - Start call -> in the CallActivity we don't join again and instead execute callOrJoinRoomViaWebSocket() - Call connection is successful - Hangup on android -> the ApplicationWideCurrentRoomHolder gets cleared (so also it's session) - Staying in the chat and start the call another time -> When we open CallActivity another time, ApplicationWideCurrentRoomHolder.sessionId is empty.Because of this, in joinRoomAndCall, joinRoom is executed again. But as we are still in the room and have a session, joinRoom is problematic because on serverside in SignalingController - if there is still a session - it's considered as old. So Nextcloud now sends a backend message (disinvite) to the external signaling controller that the session (of the first join) was removed. So the External signaling server removes the session and closes the websocket. (The message for this might be improved, see strukturag/nextcloud-spreed-signaling#512) As the websocket is now closed, it won't be possible for the android app to send any signaling message anymore. There will just be the connecting screen and the call connection fails. Solution for now: ApplicationWideCurrentRoomHolder.getInstance().clear() should not be executed when hanging up, so the session won't be cleared and in the next attempt to start the call the room is not joined again mistakenly. Instead to clear the `ApplicationWideCurrentRoomHolder`, only setInCall(false); setDialing(false); are set so that the method isNotInCall() in ChatActivity remains working correctly. Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
/backport to stable-17.0 |
thanks to @SystemKeeper & @Ivansss !!! |
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/3177-talk.apk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥳
Zry this apk file out. Same behaviour on Samsun Galaxy S21 Ultra. Android 13. Nextcloud AIO 6.2.1 |
fix #1725
fix #1712
Fix establishing of call connection when try to connect a second time on HPB
Everytime a second attempt was made to enter a call, the connection failed.
How to reproduce:
Enter the ChatActivity
-> joins the room (so the new session is in the ApplicationWideCurrentRoomHolder)
Start call
-> in the CallActivity we don't join again and instead execute callOrJoinRoomViaWebSocket()
Call connection is successful
Hangup on android
-> the ApplicationWideCurrentRoomHolder gets cleared (so also it's session)
Staying in the chat and start the call another time
-> When we open CallActivity another time, ApplicationWideCurrentRoomHolder.sessionId is empty.Because of this, in joinRoomAndCall, joinRoom is executed again.
But as we are still in the room and have a session, joinRoom is problematic because on serverside in SignalingController - if there is still a session - it's considered as old.
So Nextcloud now sends a backend message (disinvite) to the external signaling controller that the session (of the first join) was removed.
So the External signaling server removes the session and closes the websocket. (The message for this might be improved, see Improve log message in case of disinvite strukturag/nextcloud-spreed-signaling#512)
As the websocket is now closed, it won't be possible for the android app to send any signaling message anymore. There will just be the connecting screen and the call connection fails.
Solution for now:
ApplicationWideCurrentRoomHolder.getInstance().clear() should not be executed when hanging up, so the session won't be cleared and in the next attempt to start the call the room is not joined again mistakenly.
Instead to clear the
ApplicationWideCurrentRoomHolder
, onlyare set so that the method isNotInCall() in ChatActivity remains working correctly.
Followup TODOs
🏁 Checklist
/backport to stable-xx.x