Flutter livekit freeze when publishing microphone in snap

Hey there,

I am trying to package a flutter application that uses the flutter livekit SDK: https://github.com/livekit/client-sdk-flutter/

But unfortunately the resulting snap package freezes when enabling the microphone. The same code works perfectly fine when not running inside a snap.

I made a github repository with the minimal setup to reproduce the issue: https://github.com/CharleeSF/flutter_with_depedencies/tree/d945eb065909c6dc4a32a7b3758de02a921732e8 The instructions to install are in the README.md

I have tried to look at logging of the livekit SDK but it is not clear to me what is going wrong. Most importantly, when I log just before and after enabling the microphone (when starting call without microphone and toggling the microphone button), the app seems to be able to pass the line of code of the enabling, and it only crashes just after.

I haven’t defined any plugs because I am still only running in devmode, and as far as I am aware plugs don’t affect devmode installations.

Any tips on things to try?

P.S. I do get some errors from webrtc that I am not sure if they are related. It looks like this:

[ERROR:flutter/shell/common/shell.cc(1015)] The 'FlutterWebRTC/Texture94848182572208' channel sent a message from native to Flutter on a non-platform thread. Platform channel messages must be sent on the platform thread. Failure to do so may result in data loss or crashes, and must be fixed in the plugin or application code creating that channel.
See https://docs.flutter.dev/platform-integration/platform-channels#channels-and-platform-threading for more information.

However, the error occurs all the time, and not when the app freezes. The error also happens when running the linux application without snap.

Edit: I am trying to run the snap on Ubuntu 22.04. Example was taken from main branch of flutter livekit SDK, for which latest release was 1.5.3. Original broken app with same behavior uses flutter livekit SDK 1.5.3. Flutter webRTC version referenced inside the livekit SDK is 0.9.47 (as can be seen here)

Hi ! @Charlee .

Have you the last version of FlutterWebRTC and the one of SDK ?

Can you try running the snappy-debug command alongside the app to see if there are any audio related messages passing by ?

Also, is this on an UbuntuCore system ? You might want/need a sound server or prepare an alsa setup in this case.

Hi @ogra, @Charlee .

I’m not sure, I think there is a trust issue somewhere in the exchanges between programs .

Hey @ogra,

Sorry not to mention, it is on Ubuntu 22.04. It is the same system as where the normal linux application can run successfully.

I tried to run with snappy-debug, I see a lot of suggestions but nothing related to audio. See output at the bottom of the message. Is it a hint that we don’t see audio messages? As the application doesn’t get to the point where it tries to access the audio?

Just to clarify: if you run in --devmode, the system doesn’t actually block access to any device, correct? So the plugs don’t influence how the application runs? Or did I misunderstand this?

= AppArmor =
Time: Dec 15 08:45:17
Log: apparmor="ALLOWED" operation="dbus_method_call"  bus="session" path="/io/livekit/example/example" interface="org.gtk.Actions" member="DescribeAll" name=":1.44" mask="receive" pid=29317 label="snap.flutter-with-dependencies.flutter-with-dependencies" peer_pid=6388 peer_label="unconfined"
DBus access

= AppArmor =
Time: Dec 15 08:45:17
Log: apparmor="ALLOWED" operation="dbus_method_call"  bus="session" path="/io/livekit/example/example" interface="org.freedesktop.DBus.Properties" member="GetAll" name=":1.44" mask="receive" pid=29317 label="snap.flutter-with-dependencies.flutter-with-dependencies" peer_pid=6388 peer_label="unconfined"
DBus access

= AppArmor =
Time: Dec 15 08:45:17
Log: apparmor="ALLOWED" operation="dbus_method_call"  bus="session" path="/io/livekit/example/example/window/1" interface="org.gtk.Actions" member="DescribeAll" name=":1.44" mask="receive" pid=29317 label="snap.flutter-with-dependencies.flutter-with-dependencies" peer_pid=6388 peer_label="unconfined"
DBus access

= AppArmor =
Time: Dec 15 08:45:17
Log: apparmor="ALLOWED" operation="symlink" class="file" profile="snap.flutter-with-dependencies.flutter-with-dependencies" name="/dev/char/195:255" pid=29317 comm="example" requested_mask="c" denied_mask="c" fsuid=1000 ouid=1000
File: /dev/char/195:255 (write)

= AppArmor =
Time: Dec 15 08:45:17
Log: apparmor="ALLOWED" operation="symlink" class="file" profile="snap.flutter-with-dependencies.flutter-with-dependencies" name="/dev/char/195:254" pid=29317 comm="example" requested_mask="c" denied_mask="c" fsuid=1000 ouid=1000
File: /dev/char/195:254 (write)

= AppArmor =
Time: Dec 15 08:45:17
Log: apparmor="ALLOWED" operation="symlink" class="file" profile="snap.flutter-with-dependencies.flutter-with-dependencies" name="/dev/char/195:0" pid=29317 comm="example" requested_mask="c" denied_mask="c" fsuid=1000 ouid=1000
File: /dev/char/195:0 (write)

= AppArmor =
Time: Dec 15 08:45:17
Log: apparmor="ALLOWED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/DBus" interface="org.freedesktop.DBus" member="RequestName" mask="send" name="org.freedesktop.DBus" pid=29317 label="snap.flutter-with-dependencies.flutter-with-dependencies" peer_label="unconfined"
DBus access

= AppArmor =
Time: Dec 15 08:45:17
Log: apparmor="ALLOWED" operation="dbus_bind"  bus="system" name="nvidia.powerd.client" mask="bind" pid=29317 label="snap.flutter-with-dependencies.flutter-with-dependencies"
DBus access
Suggestion:
* use 'dbus' slot (https://forum.snapcraft.io/t/the-dbus-interface/2038)

= AppArmor =
Time: Dec 15 08:45:17
Log: apparmor="ALLOWED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/DBus" interface="org.freedesktop.DBus" member="ListNames" mask="send" name="org.freedesktop.DBus" pid=29317 label="snap.flutter-with-dependencies.flutter-with-dependencies" peer_label="unconfined"
DBus access

= AppArmor =
Time: Dec 15 08:45:17
Log: apparmor="ALLOWED" operation="open" class="file" profile="snap.flutter-with-dependencies.flutter-with-dependencies" name="/proc/sys/vm/max_map_count" pid=29317 comm="example" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
File: /proc/sys/vm/max_map_count (read)
Suggestions:
* adjust program to not access '@{PROC}/sys/vm/max_map_count'
* add 'system-observe' to 'plugs'

= AppArmor =
Time: Dec 15 08:52:54
Log: apparmor="ALLOWED" operation="open" class="file" profile="snap.flutter-with-dependencies.flutter-with-dependencies" name="/dev/video0" pid=29317 comm="example" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
File: /dev/video0 (read)
Suggestion:
* add 'camera' to 'plugs'

= AppArmor =
Time: Dec 15 08:52:54
Log: apparmor="ALLOWED" operation="open" class="file" profile="snap.flutter-with-dependencies.flutter-with-dependencies" name="/dev/video1" pid=29317 comm="example" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
File: /dev/video1 (read)
Suggestion:
* add 'camera' to 'plugs'

= AppArmor =
Time: Dec 15 08:52:54
Log: apparmor="ALLOWED" operation="open" class="file" profile="snap.flutter-with-dependencies.flutter-with-dependencies" name="/dev/video0" pid=29317 comm="example" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
File: /dev/video0 (read)
Suggestion:
* add 'camera' to 'plugs'

= AppArmor =
Time: Dec 15 08:52:54
Log: apparmor="ALLOWED" operation="open" class="file" profile="snap.flutter-with-dependencies.flutter-with-dependencies" name="/dev/video1" pid=29317 comm="example" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
File: /dev/video1 (read)
Suggestion:
* add 'camera' to 'plugs'

= AppArmor =
Time: Dec 15 08:52:54
Log: apparmor="ALLOWED" operation="open" class="file" profile="snap.flutter-with-dependencies.flutter-with-dependencies" name="/dev/video0" pid=29317 comm="example" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
File: /dev/video0 (read)
Suggestion:
* add 'camera' to 'plugs'

= AppArmor =
Time: Dec 15 08:52:54
Log: apparmor="ALLOWED" operation="open" class="file" profile="snap.flutter-with-dependencies.flutter-with-dependencies" name="/dev/video1" pid=29317 comm="example" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
File: /dev/video1 (read)
Suggestion:
* add 'camera' to 'plugs'

= AppArmor =
Time: Dec 15 08:52:54
Log: apparmor="ALLOWED" operation="open" class="file" profile="snap.flutter-with-dependencies.flutter-with-dependencies" name="/dev/video0" pid=29317 comm="example" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
File: /dev/video0 (read)
Suggestion:
* add 'camera' to 'plugs'

Hey there,

The versions can be seen in the pubspec.yaml in the repository.

The example code was copied from the main branch of the livekit_client and it depends also on the main branch. I checked the flutter websdk version that the livekit_client depends on and its 0.9.47, which is the latest as far as I can tell.

FYI. I am trying to debug a different application with the same behavior which is dependent on livekit client SDK 1.5.3 (so its not just an issue on the main branch).

I will update the original post with all versions.

Running in devmode will indeed make sure that no accesses to any resources are blocked, but otherwise it is still a snap running in its own namespace/cgroup etc, devmode only switches apparmor to complain mode and snappy-debug will still act on the complain messages and try to make suggestions… so it can still provide useful info…

I see the app accessing /dev/video but no audio stuff seems to be touched… my guess would be the app normally uses some lib or framework that is not available in the snap (gstreamer, ffmpeg, pulseaudio, etc), so the actual access does not happen… what is a bit weird is that you do not get an error from the app itself, i would expect this to happen somehow…

Hi ! @Charlee .

I threw a glance on your pubspec.yaml .

In your log file(in this chat), there are suggestions about components to define in the plugs section .

I suggest you to define these components in your *yaml file (audio included ) in the section plugs , and try again(of course after building your program) .

In this Github link there is a kind of template → https://github.com/videolan/vlc/blob/75bca603749d8bfb7048a84ea811cbdb19447596/extras/package/snap/snapcraft.yaml#L36

Dear @baldeuniversel,

I am confused, so plugs do matter when running the snap with --devmode?

Regards, Charlee

Yea, I would indeed expect it to complain about not being able to find some lib…

What strategy would you suggest to find out the library dependencies? I did ldd on the flutter binary (the ‘normal linux’ one) and got a whole list:

charlee:~/myapps/flutter_with_depedencies$ ldd build/linux/x64/debug/bundle/example 
	linux-vdso.so.1 (0x00007ffed41fc000)
	libflutter_webrtc_plugin.so => /home/charlee/myapps/flutter_with_depedencies/build/linux/x64/debug/bundle/lib/libflutter_webrtc_plugin.so (0x00007fbce24ef000)
	libflutter_window_close_plugin.so => /home/charlee/myapps/flutter_with_depedencies/build/linux/x64/debug/bundle/lib/libflutter_window_close_plugin.so (0x00007fbce24e9000)
	libflutter_linux_gtk.so => /home/charlee/myapps/flutter_with_depedencies/build/linux/x64/debug/bundle/lib/libflutter_linux_gtk.so (0x00007fbcdfa00000)
	libgtk-3.so.0 => /lib/x86_64-linux-gnu/libgtk-3.so.0 (0x00007fbcdf000000)
	libgdk-3.so.0 => /lib/x86_64-linux-gnu/libgdk-3.so.0 (0x00007fbce23c7000)
	libpangocairo-1.0.so.0 => /lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 (0x00007fbce23b3000)
	libpango-1.0.so.0 => /lib/x86_64-linux-gnu/libpango-1.0.so.0 (0x00007fbce234c000)
	libharfbuzz.so.0 => /lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007fbcdf931000)
	libatk-1.0.so.0 => /lib/x86_64-linux-gnu/libatk-1.0.so.0 (0x00007fbce2322000)
	libcairo-gobject.so.2 => /lib/x86_64-linux-gnu/libcairo-gobject.so.2 (0x00007fbce2316000)
	libcairo.so.2 => /lib/x86_64-linux-gnu/libcairo.so.2 (0x00007fbcdeed8000)
	libgdk_pixbuf-2.0.so.0 => /lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 (0x00007fbcdf901000)
	libgio-2.0.so.0 => /lib/x86_64-linux-gnu/libgio-2.0.so.0 (0x00007fbcdecff000)
	libgobject-2.0.so.0 => /lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007fbcdf8a1000)
	libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fbcdebc5000)
	libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fbcde800000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fbcdeade000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fbcdf881000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fbcde400000)
	libwebrtc.so => /home/charlee/myapps/flutter_with_depedencies/build/linux/x64/debug/bundle/lib/libwebrtc.so (0x00007fbcdce00000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fbce230d000)
	libepoxy.so.0 => /lib/x86_64-linux-gnu/libepoxy.so.0 (0x00007fbcde6cb000)
	libfontconfig.so.1 => /lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007fbcdf835000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fbcdf830000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fbce2664000)
	libgmodule-2.0.so.0 => /lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007fbcdf829000)
	libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007fbcde2c0000)
	libXi.so.6 => /lib/x86_64-linux-gnu/libXi.so.6 (0x00007fbcdeaca000)
	libXfixes.so.3 => /lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007fbcdeac0000)
	libatk-bridge-2.0.so.0 => /lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0 (0x00007fbcdea88000)
	libfribidi.so.0 => /lib/x86_64-linux-gnu/libfribidi.so.0 (0x00007fbcdea6c000)
	libpangoft2-1.0.so.0 => /lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 (0x00007fbcdea51000)
	libXinerama.so.1 => /lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007fbcdea4c000)
	libXrandr.so.2 => /lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007fbcdea3d000)
	libXcursor.so.1 => /lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007fbcdea31000)
	libXcomposite.so.1 => /lib/x86_64-linux-gnu/libXcomposite.so.1 (0x00007fbcdea2c000)
	libXdamage.so.1 => /lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007fbcde6c6000)
	libxkbcommon.so.0 => /lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007fbcde67f000)
	libwayland-cursor.so.0 => /lib/x86_64-linux-gnu/libwayland-cursor.so.0 (0x00007fbcde675000)
	libwayland-egl.so.1 => /lib/x86_64-linux-gnu/libwayland-egl.so.1 (0x00007fbcde670000)
	libwayland-client.so.0 => /lib/x86_64-linux-gnu/libwayland-client.so.0 (0x00007fbcde65d000)
	libXext.so.6 => /lib/x86_64-linux-gnu/libXext.so.6 (0x00007fbcde648000)
	libthai.so.0 => /lib/x86_64-linux-gnu/libthai.so.0 (0x00007fbcde63d000)
	libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007fbcdcd38000)
	libgraphite2.so.3 => /lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007fbcde299000)
	libpixman-1.so.0 => /lib/x86_64-linux-gnu/libpixman-1.so.0 (0x00007fbcdcc8d000)
	libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007fbcde25e000)
	libxcb-shm.so.0 => /lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007fbcde636000)
	libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fbcde234000)
	libxcb-render.so.0 => /lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007fbcde225000)
	libXrender.so.1 => /lib/x86_64-linux-gnu/libXrender.so.1 (0x00007fbcde629000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fbcde207000)
	libjpeg.so.8 => /lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007fbcdcc0c000)
	libmount.so.1 => /lib/x86_64-linux-gnu/libmount.so.1 (0x00007fbcdcbc8000)
	libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007fbcdcb9c000)
	libffi.so.8 => /lib/x86_64-linux-gnu/libffi.so.8 (0x00007fbcdcb8f000)
	libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fbcdcb17000)
	libgbm.so.1 => /lib/x86_64-linux-gnu/libgbm.so.1 (0x00007fbcdcb06000)
	libdrm.so.2 => /lib/x86_64-linux-gnu/libdrm.so.2 (0x00007fbcdcaf0000)
	libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007fbcdcabf000)
	libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fbcdcab6000)
	libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007fbcdca66000)
	libatspi.so.0 => /lib/x86_64-linux-gnu/libatspi.so.0 (0x00007fbcdca2c000)
	libdatrie.so.1 => /lib/x86_64-linux-gnu/libdatrie.so.1 (0x00007fbcdca23000)
	libbrotlidec.so.1 => /lib/x86_64-linux-gnu/libbrotlidec.so.1 (0x00007fbcdca15000)
	libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007fbcdca0f000)
	libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fbcdca05000)
	libblkid.so.1 => /lib/x86_64-linux-gnu/libblkid.so.1 (0x00007fbcdc9ce000)
	libpcre2-8.so.0 => /lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x00007fbcdc937000)
	libwayland-server.so.0 => /lib/x86_64-linux-gnu/libwayland-server.so.0 (0x00007fbcdc921000)
	libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007fbcdc85a000)
	libbrotlicommon.so.1 => /lib/x86_64-linux-gnu/libbrotlicommon.so.1 (0x00007fbcdc835000)
	libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007fbcdc81d000)
	liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fbcdc7f2000)
	libzstd.so.1 => /lib/x86_64-linux-gnu/libzstd.so.1 (0x00007fbcdc723000)
	liblz4.so.1 => /lib/x86_64-linux-gnu/liblz4.so.1 (0x00007fbcdc703000)
	libcap.so.2 => /lib/x86_64-linux-gnu/libcap.so.2 (0x00007fbcdc6f8000)
	libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007fbcdc5b8000)
	libmd.so.0 => /lib/x86_64-linux-gnu/libmd.so.0 (0x00007fbcdc5ab000)
	libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007fbcdc585000)

I wanted to do the same for my snap binary. I tried both ldd /snap/bin/flutter-with-dependencies and got very little:

charlee:~/myapps/flutter_with_depedencies$ ldd /snap/bin/flutter-with-dependencies 
	linux-vdso.so.1 (0x00007fffb417d000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f39bd800000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f39bdb95000)

I also did it on the binary inside the snap… And got the same list as the ‘normal linux’ binary, with some libraries being listed inside my snap and some system libraries. Is this expected?

charlee@LPKS0013:/snap/flutter-with-dependencies$ ldd /snap/flutter-with-dependencies/current/bin/example 
	linux-vdso.so.1 (0x00007ffe2370c000)
	libflutter_webrtc_plugin.so => /snap/flutter-with-dependencies/current/bin/lib/libflutter_webrtc_plugin.so (0x00007f11f858d000)
	libflutter_window_close_plugin.so => /snap/flutter-with-dependencies/current/bin/lib/libflutter_window_close_plugin.so (0x00007f11f8587000)
	libflutter_linux_gtk.so => /snap/flutter-with-dependencies/current/bin/lib/libflutter_linux_gtk.so (0x00007f11f5c9d000)
	libgtk-3.so.0 => /lib/x86_64-linux-gnu/libgtk-3.so.0 (0x00007f11f5400000)
	libgdk-3.so.0 => /lib/x86_64-linux-gnu/libgdk-3.so.0 (0x00007f11f52f9000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f11f5c64000)
	libpangocairo-1.0.so.0 => /lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 (0x00007f11f5c52000)
	libpango-1.0.so.0 => /lib/x86_64-linux-gnu/libpango-1.0.so.0 (0x00007f11f5292000)
	libharfbuzz.so.0 => /lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007f11f51c3000)
	libatk-1.0.so.0 => /lib/x86_64-linux-gnu/libatk-1.0.so.0 (0x00007f11f5199000)
	libcairo-gobject.so.2 => /lib/x86_64-linux-gnu/libcairo-gobject.so.2 (0x00007f11f5c46000)
	libcairo.so.2 => /lib/x86_64-linux-gnu/libcairo.so.2 (0x00007f11f5071000)
	libgdk_pixbuf-2.0.so.0 => /lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 (0x00007f11f5041000)
	libgio-2.0.so.0 => /lib/x86_64-linux-gnu/libgio-2.0.so.0 (0x00007f11f4e68000)
	libgobject-2.0.so.0 => /lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007f11f4e08000)
	libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f11f4cce000)
	libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f11f4a00000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f11f4919000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f11f4cae000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f11f4600000)
	libwebrtc.so => /snap/flutter-with-dependencies/current/bin/lib/libwebrtc.so (0x00007f11f31f9000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f11f5c3b000)
	libepoxy.so.0 => /lib/x86_64-linux-gnu/libepoxy.so.0 (0x00007f11f30c4000)
	libfontconfig.so.1 => /lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f11f4c64000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f11f5c36000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f11f86fe000)
	libgmodule-2.0.so.0 => /lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007f11f5c2f000)
	libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007f11f2f84000)
	libXi.so.6 => /lib/x86_64-linux-gnu/libXi.so.6 (0x00007f11f4c50000)
	libXfixes.so.3 => /lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007f11f4c48000)
	libatk-bridge-2.0.so.0 => /lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0 (0x00007f11f48e1000)
	libfribidi.so.0 => /lib/x86_64-linux-gnu/libfribidi.so.0 (0x00007f11f4c2c000)
	libpangoft2-1.0.so.0 => /lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 (0x00007f11f48c6000)
	libXinerama.so.1 => /lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007f11f48c1000)
	libXrandr.so.2 => /lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007f11f48b4000)
	libXcursor.so.1 => /lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007f11f48a8000)
	libXcomposite.so.1 => /lib/x86_64-linux-gnu/libXcomposite.so.1 (0x00007f11f48a3000)
	libXdamage.so.1 => /lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007f11f489e000)
	libxkbcommon.so.0 => /lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007f11f4857000)
	libwayland-cursor.so.0 => /lib/x86_64-linux-gnu/libwayland-cursor.so.0 (0x00007f11f484d000)
	libwayland-egl.so.1 => /lib/x86_64-linux-gnu/libwayland-egl.so.1 (0x00007f11f4848000)
	libwayland-client.so.0 => /lib/x86_64-linux-gnu/libwayland-client.so.0 (0x00007f11f4837000)
	libXext.so.6 => /lib/x86_64-linux-gnu/libXext.so.6 (0x00007f11f2f6f000)
	libthai.so.0 => /lib/x86_64-linux-gnu/libthai.so.0 (0x00007f11f482c000)
	libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f11f2ea7000)
	libgraphite2.so.3 => /lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007f11f2e80000)
	libpixman-1.so.0 => /lib/x86_64-linux-gnu/libpixman-1.so.0 (0x00007f11f2dd5000)
	libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f11f2d9a000)
	libxcb-shm.so.0 => /lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007f11f2d95000)
	libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f11f2d6b000)
	libxcb-render.so.0 => /lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007f11f2d5c000)
	libXrender.so.1 => /lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f11f2d4f000)
	libjpeg.so.8 => /lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007f11f2cce000)
	libmount.so.1 => /lib/x86_64-linux-gnu/libmount.so.1 (0x00007f11f2c8a000)
	libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007f11f2c5e000)
	libffi.so.8 => /lib/x86_64-linux-gnu/libffi.so.8 (0x00007f11f2c51000)
	libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f11f2bd9000)
	libgbm.so.1 => /lib/x86_64-linux-gnu/libgbm.so.1 (0x00007f11f2bc8000)
	libdrm.so.2 => /lib/x86_64-linux-gnu/libdrm.so.2 (0x00007f11f2bb2000)
	libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f11f2b81000)
	libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f11f2b78000)
	libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007f11f2b28000)
	libatspi.so.0 => /lib/x86_64-linux-gnu/libatspi.so.0 (0x00007f11f2aee000)
	libdatrie.so.1 => /lib/x86_64-linux-gnu/libdatrie.so.1 (0x00007f11f2ae5000)
	libbrotlidec.so.1 => /lib/x86_64-linux-gnu/libbrotlidec.so.1 (0x00007f11f2ad7000)
	libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007f11f2ad1000)
	libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f11f2ac7000)
	libblkid.so.1 => /lib/x86_64-linux-gnu/libblkid.so.1 (0x00007f11f2a90000)
	libpcre2-8.so.0 => /lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x00007f11f29f9000)
	libwayland-server.so.0 => /lib/x86_64-linux-gnu/libwayland-server.so.0 (0x00007f11f29e3000)
	libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007f11f291c000)
	libbrotlicommon.so.1 => /lib/x86_64-linux-gnu/libbrotlicommon.so.1 (0x00007f11f28f7000)
	libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f11f28df000)
	liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f11f28b4000)
	libzstd.so.1 => /lib/x86_64-linux-gnu/libzstd.so.1 (0x00007f11f27e5000)
	liblz4.so.1 => /lib/x86_64-linux-gnu/liblz4.so.1 (0x00007f11f27c5000)
	libcap.so.2 => /lib/x86_64-linux-gnu/libcap.so.2 (0x00007f11f27ba000)
	libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007f11f267a000)
	libmd.so.0 => /lib/x86_64-linux-gnu/libmd.so.0 (0x00007f11f266d000)
	libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f11f2647000)

When trying to find libs inside a snap you should actually run the ldd call inside the snap environment as well :wink:

Try using snap run --shell <snapname>.<appname>

That will drop you into a shell inside the snap env. Seeing that your use the gnome extension, a lot of these library paths should actually point to the mounted extension instead of the systems /lib… (to exit the shell use ctrl+d or the exit command)

1 Like

Hi ! @Charlee .

According the snapcraft documentation (findable via this link https://snapcraft.io/docs/snap-confinement ).

“A devmode snap runs as a strictly confined snap with full access to system resources, and produces debug output to identify unspecified interfaces” .

I added the audio-record plug and connected it and that makes the program run properly. However, I have 0 messages about this in snappy-debug.

Now, how would I debug this if I didn’t know the program crashed on enabling the microphone?

And why does the program not crash when camera is not added/connected, but it does crash when microphone is not? What is the difference here?