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

Livekit sends ParticipantLeft webhook event without ParticipantJoined webhook event if RTC connection wasn't successfull #1130

Closed
blombosi opened this issue Oct 27, 2022 · 2 comments · Fixed by #1234

Comments

@blombosi
Copy link

Describe the bug
If there was some error in the RTCConnection and the participant couldn't join to the session livekit still sends ParticipantLeft but didn't send ParticipantJoined webhook event.

I tried to debug the issue and found these:

r.telemetry.ParticipantActive(context.Background(), r.ToProto(), p.ToProto(), &livekit.AnalyticsClientMeta{

ParticipantJoined webhook event will be sent only if the participant state will be changed to ACTIVE, but ParticipantLeft webhook event will be sent even when the state will be changed to DISCONNECTED.
https://github.com/livekit/protocol/blob/main/livekit/livekit_models.pb.go#L345
So if the ICE connection won't be established the state will change in the following order: JOINING -> JOINED -> DISCONNECTED and joined event won't be sent but left will be.

Server

  • Version: 1.2.5
  • Environment: local dev, EKS

Expected behavior
I expect to always have a Join webhook event before a Left.

@blombosi blombosi changed the title Livekit sends ParticipantLeft wevhook event without ParticipantJoined webhook event if RTC connection wasn't successfull Livekit sends ParticipantLeft webhook event without ParticipantJoined webhook event if RTC connection wasn't successfull Oct 27, 2022
@jibon57
Copy link

jibon57 commented Oct 28, 2022

I'm experiencing same issue too. This typically occurs when a user has a poor connection. When a person joins plugNmeet, we increase the count, and when they leave, we decrease it, but because of this issue, the total number count turned negative sometime :-D

@davidzhao
Copy link
Member

Good point.. if it hasn't successfully joined, it makes sense that it shouldn't send a LEAVE event either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants