Skip to content

Inconsistent Webhooks #4227

@alan-willard-simplisafe

Description

@alan-willard-simplisafe

Describe the bug
To start, I am not quite sure this is a bug per se, but there is appears to be at a minimum some inconsistencies between webhook events, and events received through the Livekit SDK

In short, I am looking at migrating some parts of my system from relying on events received through the Go Livekit SDK (participant joined, participant left, namely) over to using webhooks. This seems to be reliable in majority of cases, but with some outliers.

  1. I've noticed that in the case of participant_joined events, the webhook is notably faster than the same event being received by the application using the Go SDK. In some cases up to 2 seconds faster. This in and of itself is not necessarily a problem, but indicates to me that the conditions that lead to sending the the event through the webhook and sending the same event over the room connection / SDK differ. This could play into the second issue.

  2. There's a discrepancy between events. Notably, I will receive participant_joined events through the SDK but not from the webhook. Investigation of the logs seems to indicate that participant_connection_aborted hook does fire. Livekit logs show something like removing participant without connection. This seems to tell me that

  • The SDK indicates a participant has joined the room.

  • The webhook tells me a participant FAILED to join the room.

    Which is correct? My system has been operating to this point purely on the SDK, which makes me feel that it is more reliable. But in either case the semantics between the two events are clearly different. This could be a bug, or just a documentation issue or SDK API problem, not sure.


Server

  • Version: 1.9.4
  • Environment: EKS

Client

  • SDK: Go
  • Version: v2.12.6

To Reproduce

  1. Go app joins a room
  2. Other client joins the room
  3. Go app sees participant_connected over the SDK callback onParticipantConnected
  4. Webhook received for participant_connected (often before the SDK callback) OR not received at all

Expected behavior
Webhooks and SDK events match 1:1 in a timely manner

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions