-
Notifications
You must be signed in to change notification settings - Fork 177
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
Room gets a participantDidConnect for already existing participant with same identity #255
Comments
Do you have any Room Sids that you can share for when you are receiving this issue? Also, are you experiencing any sort of network handover that would be causing a participant to rejoin the room with the same identity? If you join the room with the same identity, you will get a new participant sid. I would expect to see the track unsubscriptions and disconnect events for the R2's first sid, not the second, as you are reporting here. Let me know if you can send a Room SID where this has occurred. Thank you, Ryan |
Hey @dineshflock,
Do you have any plans to upgrade to 2.0.0-beta4? We've fixed at least two bugs that you've reported against 2.0.0-preview9. In general this release is more stable and has much better support for bluetooth audio. Best, |
I have participant sid's here
Not sure about this. @paynerc In the sheet, participant_guid is the identity. |
@ceaglest Thanks for the support Chris. We are planning to move on to the new update maybe in next two weeks or so. |
Looking at the room in question, you have three "distinct" participants, however I see that each one of them reconnects at some point:
Looking at the logs for this room, I see that I also see that Lastly, The questions I have are what triggered the second connect for Another possibility is if you are managing room connection logic in your app? If so, you should defer to allowing the SDK to reconnect to the room for you. We do have a pretty long SIP timeout at present (known issue) which makes the reconnection take a little bit. We are also working on adding a reconnecting state (currently being worked on in the Javascript SDK) to the SDK which will let you know that the SDK is attempting to reconnect a participant. Lastly, as @ceaglest mentioned, you are running on a bit out of date version of the iOS SDK. There are many improvements in Looking forward to hearing back from you on this, Ryan |
Yes you are right, for 882v88m99neuu2o2 we got participantDidConnect again after ~15 seconds.
The events might have been fired but the order was not correct. I did not got a disconnect for P3 before connect of P4, thus this allowed two participants with same identity.
I am 100% sure we don't fire participantDidConnect event twice. Also in current case these two events were different, as the SID's we different.
We show users a reconnect button, once we get a roomDidDisconnect with non nil error. Thanks @paynerc Dinesh |
I ran a test using
The participant's identity is
The delegates are being fired in the proper order and there is never more than one participant with the same identity in the room at any given time. Every time you connect to the same room with the same identity, the server will generate a new sid for you, as shown above. Have you tested this scenario with Ryan |
Thanks for the analysis Ryan. Is it possible that the Participant disconnected vs connected events are racey? I know we have tests that cover this scenario but I'm not 100% sure the we strictly validate the callback ordering as seen on the Client. |
Thanks @paynerc
We have moved to beta4 and now I have added events tracks as the first line in the delegate of TVIRoom and TVIRemoteParticipant. With this I will share the accurate logs/events once we get this again. |
Just as a side note, we did GA Ryan |
Hey @dineshflock, We are discussing this issue internally and have cut CSDK-2289 for tracking. At this point, I don't believe it's possible to ensure that the disconnection of a duplicate Participant is seen by all Clients before the connection of its replacement Participant. This issue is also exacerbated by long Participant timeouts, something else we are hoping to improve in future releases. Best, |
Hi @dineshflock, After discussing with our team members, we believe that it would be possible to resolve this API inconsistency with a combination of Client and Server side changes. Right now we don't guarantee the ordering of individual signaling messages (but we do guarantee delivery), so there may be a small window where two Participants with the same identity (but a different Participant SID) can coexist. How important is this issue to you? Is there a Client side workaround you could use? I think our efforts may be better served improving other aspects of the product, but if this is critical to your use case we will of course consider it further. Regards, |
I am closing this issue as there has been no further activity. Please feel free to reopen if you have further information or questions. Thank you, Ryan |
Description
Scenario (Based on our analytics here):
After 15 seconds following events happen
Update:
10. Our app crashed due to due to our internal assertion failure in event subscribedToAudioTrack for a participant with identity R2ID
Update : I am not sure about the sid's in step 7 8 and 9, those could be of R2SID as we keep only one participant with a given identity.
My understanding :
Seems like the SDK tries to refresh the R2 participant.
If thats the case then I think, SDK should first unsubscribe audio video followed by disconnect on R2(sid : R2SID identity: R2ID). Then it should call didConnected followed by subscribe audio/video tracks for R2(sid : R3SID identity: R2ID).
[Description of the issue]
Expected Behavior
Seems like the SDK tries to refresh the R2 participant.
If thats the case then I think, SDK should first unsubscribe audio video followed by disconnect on R2(sid : R2SID identity: R2ID). Then it should call didConnected followed by subscribe audio/video tracks for R2(sid : R3SID identity: R2ID).
Reproduces How Often
10%
Versions
All relevant version information for the issue.
Video iOS SDK
2.0.0-preview9 via CocoaPods
Xcode
9.2
iOS Version
11.3
The text was updated successfully, but these errors were encountered: