livekit / client-sdk-flutter

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

[bug] build fails on WSL2 Ubuntu 24.04 with flutter example after `pub add livekit_client` #548

Open ryuujo1573 opened 4 months ago

ryuujo1573 commented 4 months ago

Describe the bug

Add the livekit_client package, then the flutter build fails.

To Reproduce

flutter create -t app --platforms windows,linux,macos --project-name livekit_example livekit_example
cd livekit_example
flutter run   # this works
flutter pub add livekit_client
flutter run   # fails

Expected behavior

Platform information

(livekit_screen_control:83525): Gtk-WARNING **: 00:11:46.693: Locale not supported by C library. Using the fallback 'C' locale. MESA: error: ZINK: failed to choose pdev glx: failed to create drisw screen

#

Fatal error in: ../../media/engine/adm_helpers.cc, line 39

last system error: 0

Check failed: 0 == adm->Init() (0 vs. -1)

Failed to initialize the ADM.

Error waiting for a debug connection: The log reader stopped unexpectedly, or never started. Error launching application on Linux.

ryuujo1573 commented 4 months ago
% locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
ryuujo1573 commented 4 months ago

After configured locale, the flutter run outputs:

Launching lib/main.dart on Linux in debug mode...
Building Linux application...                                           
✓ Built build/linux/x64/debug/bundle/livekit_example
-
-(livekit_screen_control:83525): Gtk-WARNING **: 00:11:46.693: Locale not supported by C library.
-        Using the fallback 'C' locale.
MESA: error: ZINK: failed to choose pdev
glx: failed to create drisw screen

#
# Fatal error in: ../../media/engine/adm_helpers.cc, line 39
# last system error: 0
# Check failed: 0 == adm->Init() (0 vs. -1)
# Failed to initialize the ADM.
Error waiting for a debug connection: The log reader stopped unexpectedly, or never started.
Error launching application on Linux.
ryuujo1573 commented 4 months ago

Possible related:

MESA and glx errors when running glxinfo Ubuntu 24.04

Does WSL support openGL? microsoft/WSL#2855 (comment)

I may guess it's just another WSL specific problem. I may have a try on bare metal after then!