livekit / client-sdk-flutter

Flutter Client SDK for LiveKit

Home Page:https://docs.livekit.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[bug] Livekit does not work on Firefox browsers anymore

Arthurius opened this issue · comments

Describe the bug
On Firefox, await Room.connect is never finished. It just hangs forever without throwing an exception. On every other browser I've tested it works fine (Chrome, Brave, Safari)
This code was working fine on production before

To Reproduce
Try to call await Room.connect(url, token) running on a Firefox browser (on a Mac M1)

Expected behavior
Room connects and everything works as expected

Platform information
Running on a Macbook Pro, M1 Pro. Firefox 125.0.1 (64-bit)

  • Flutter version: Flutter version 3.19.6 on channel stable
  • Plugin version: livekit_client: ^2.1.3
  • Flutter target OS: Web - Firefox
  • Flutter target OS version: Firefox 125.0.1

After more investigation, it appears the part that is not working on Firefox is mainly the DataReceivedEvent.
The Room.connect started working with proper permissions set in Firefox, but events are not being received. Our implementation relies heavily on that.
I also noticed that these DataEvents became less reliable on Safari

After investigating, it is related to the migration to package:web. This is a fix https://github.com/flutter-webrtc/dart-webrtc/releases/tag/1.4.4. You can try to delete pubspec.lock under your project and re-run flutter pub get to ensure that you have upgraded to dart-webrtc 1.4.4.