client-sdk-flutter icon indicating copy to clipboard operation
client-sdk-flutter copied to clipboard

[bug] Can not take RoomMetadataChangedEvent sometimes

Open FantaZZ opened this issue 2 years ago • 2 comments

Describe the bug

Can not take RoomMetadataChangedEvent sometimes.

I add some print in signal_client.dart.

  Future<void> _onSocketData(dynamic message) async {

    print('livekit ws got msg');

    if (message is! List<int>) return;
    final msg = lk_rtc.SignalResponse.fromBuffer(message);

    print('livekit ws msg type = ${msg.whichMessage().name}');

    switch (msg.whichMessage()) {
    ...

Then I send update room meta message by cli.

livekit-cli update-room-metadata --room room1 --metadata "test"
livekit-cli update-room-metadata --room room1 --metadata ""

When I send a "test" message print nothing. When I send a "" message print :

I/flutter (22447): livekit ws got msg
I/flutter (22447): livekit ws msg type = roomUpdate

Repeat send "test" message or "" message also print nothing.
Alternate send , after "" message will got print.

May be the bug is hidden in server-end ?

Platform information

  • Flutter version: Flutter 3.13.9 • channel stable
  • Plugin version: 1.5.3
  • Flutter target OS: Android simulator API 33 and real device Xiaomi Mi 9 Android 11
  • livekit-server version: 1.5.1
  • livekit-cli version: 1.3.0

FantaZZ avatar Nov 15 '23 12:11 FantaZZ

When I run example app. This still happens.

FantaZZ avatar Nov 15 '23 13:11 FantaZZ

https://github.com/livekit/livekit/blob/bcce9c26ebcc5b89e8cb307a9f1870f631cf1879/pkg/rtc/room_test.go#L684-L686

"updates are sent when participant joined"

I can not read go language. Is that mean room meta update notify only when participant join or leave ?

FantaZZ avatar Nov 15 '23 14:11 FantaZZ