twilio / twilio-video-ios

Programmable Video SDK by Twilio
http://twilio.com/video
Other
67 stars 22 forks source link

After network resume, We are unable to reconnect room #170

Open Adilsheikh1 opened 3 years ago

Adilsheikh1 commented 3 years ago

Description

After network resume, Twilio we are not getting for room reconnected instead of that we are getting signaling timeout

Steps to Reproduce

  1. Make a call iOS to iOS
  2. After successful call connection, assume anyone participants network is not available for 11 to 15 sec ( Turn off the internet for 15 sec & turn it on again)
  3. We get a call back from Twilio network-level 0 even we are in the best network

RMcf002b83bdf77d38ac65f15fd3d655d4

room id for your reference I can provide more room id if you need

Code

func roomIsReconnecting(room: Room, error: Error) {}

we are getting this method after disconnecting the network but we should get the below method after resuming the network but we aren't getting

func roomDidReconnect(room: Room) {}

instead, we are getting the below method

func roomDidDisconnect(room: TwilioVideo.Room, error: Error?) {}

Expected Behavior

It should reconnect if either of the participants was disconnected due to network for 15sec

Actual Behavior

we are getting the below method

func roomDidDisconnect(room: TwilioVideo.Room, error: Error?) {}

Reproduces How Often

We are able to reproduce 80% of the time

Logs

Don't have any right now



### Versions

SDK

#### Video iOS SDK

4.0.0

https://user-images.githubusercontent.com/45380383/108325585-35e11d00-71ef-11eb-89ef-c56c65660269.mp4

#### Xcode

12.3

#### iOS Version

all version video shared is 14.3

#### iOS Device

XS max & IPHONE 7PLUS
other iPhone devices as well we are able to reproduce
PshrivastavaMoreYeahs commented 3 years ago

I am also facing same issue.

Adilsheikh1 commented 3 years ago

waiting for the response

ceaglest commented 3 years ago

Hi @Adilsheikh1,

Sorry for the slow response.

I am investigating the Room SID that you provided. It does seem like the server may not be sending a message that was required to reconnect your iOS participant. I will reach out if we need more info like client side logs to diagnose.

Thanks, Chris

ceaglest commented 3 years ago

Hi @PshrivastavaMoreYeahs,

Sorry I did not reach out sooner.

I am also facing same issue.

Which kind of Rooms are you using, could you provide a Room SID? The issue we are tracking internally impacts reconnection to a Group or Small Group Room.

Thanks, Chris

PshrivastavaMoreYeahs commented 3 years ago

Hi Chris thanks for replying,

we are using Room Type: Group-Small with max 2 Participant.

Thanks, Prashant

ceaglest commented 3 years ago

Hi @PshrivastavaMoreYeahs,

we are using Room Type: Group-Small with max 2 Participant.

It does sound like the same issue with a delayed server response. Could you share a recent Room SID by any chance?

Best, Chris

PshrivastavaMoreYeahs commented 3 years ago

please have a look into: room sid: RM12e4ebf3750826dc6dd8d5c585756f74 As per our internal logs for this call, showing internet level was above 4 (very good internet level) but we got signalling disconnection.

ceaglest commented 3 years ago

Hi @PshrivastavaMoreYeahs,

In the Room SID that you provided the ios 12.5.1 device was losing signaling connectivity about once a minute and reconnecting to the server. Eventually the reconnection failed, but I don't think that this is the same root cause as the original poster of this issue.

I am pretty sure you are experiencing this issue (https://github.com/twilio/twilio-video-ios/issues/113). If possible, could we get a look at the logs from the iOS 12.5.1 device?

Also, I noticed that you are using version 4.0.0 of our Video SDK. I would suggest using the latest release, which is 4.3.0 if possible.

Best, Chris

PshrivastavaMoreYeahs commented 3 years ago

Hi @ceaglest thanks for reply, I have updated SDK to 4.3.0 and released build to our production. if user will get the same on latest sdk, I will post for similar issues in future. Thanks, Prashant

mcorner commented 3 years ago

@ceaglest We are on p2p rooms (I posted #113). Do you have any suggestions about getting more information about signalling disconnections and failures to connect? We have users whose calls failed midstream, or failed to connect in the first place. The errors are a variety of:

ios user: roomDidFailToConnect {"error":"Signaling connection error","roomName":"production-76t0qKd"}

ios user: roomReconnecting {"error":"com.twilio.video.TwilioException: Signaling connection disconnected","roomName":"production-Nvtwra4"}

JS user: Reconnecting your signaling connection! Signaling connection disconnected In console.log: '2': '[TwilioConnection #2: wss://global.vss.twilio.com/signaling]', '3': 'Closed: 3007 - Failed to open in 15000 ms' }

In these cases there is at least some network connection, though it could be flaky. Is there more information we can get from ios devices in the field on signalling connection problems? Our users have a variety of connections, but at least want to try and isolate root causes on these failures. The feedback from the SDK isn't very granular.

We do our own preflight checks (wrote something similar to yours) and can switch to Twilio's, but that isn't going to tell the whole story with mobile users with intermittent connection issues.

Thanks for any advice you can offer.