livekit / client-sdk-flutter

Flutter Client SDK for LiveKit
https://docs.livekit.io
Apache License 2.0
229 stars 108 forks source link

[bug] Livekit does not work on Firefox browsers anymore #507

Closed Arthurius closed 2 months ago

Arthurius commented 2 months ago

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)

Arthurius commented 2 months ago

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

cloudwebrtc commented 2 months ago

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.