Flatpak on Ubuntu 20.04 cannot access the camera or take screenshots.
Similar to issue 284 but I don't get a crash. I can't tell if it's related since that user did not post logs or troubleshooting attempts. I will tell you everything I know.
My goal is to add an account using a QR code. When I go to use the camera, it reports that none was detected. If I press the option for screenshot, nothing happens, even if I have a QR code visible on my desktop.
Output of flatpak info com.belmoussaoui.Authenticator
:
Authenticator - Generate Two-Factor Codes
ID: com.belmoussaoui.Authenticator
Ref: app/com.belmoussaoui.Authenticator/x86_64/stable
Arch: x86_64
Branch: stable
Version: 4.0.3
License: GPL-3.0+
Origin: flathub
Collection: org.flathub.Stable
Installation: system
Installed: 61.8 MB
Runtime: org.gnome.Platform/x86_64/41
Sdk: org.gnome.Sdk/x86_64/41
Commit: e8fb9f2b9703c8c2dd531ea6a63da25f3e5d6b07d6efb88cd5fece58d836bd4e
Parent: a9c5a9a3434c2bf26244b7bf48f37382bb4dc10b8fcac2d7c4e3a86648961416
Subject: Update GNOME runtime to 41 (#4) (4e18bf0c)
Date: 2021-10-30 17:25:13 +0000
Output of lsb_release -a
:
LSB Version: core-11.1.0ubuntu2-noarch:printing-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
Output of flatpak --version
:
Flatpak 1.6.5
Output of flatpak info --show-permissions com.belmoussaoui.Authenticator
:
[Context]
shared=network;ipc;
sockets=x11;wayland;pulseaudio;fallback-x11;
devices=all;
[Session Bus Policy]
org.a11y.Bus=talk
org.freedesktop.secrets=talk
[Environment]
G_MESSAGES_DEBUG=none
GST_PLUGIN_SYSTEM_PATH=/app/lib/gstreamer-1.0
RUST_LOG=authenticator=debug
Output of the application during runtime. To document my actions, I launch the application the command line, I press the button to add an account, and then I try to use the camera to scan a QR code. It fails to detect any of my cameras.
Note that the directories
'/var/lib/flatpak/exports/share'
'/home/james/.local/share/flatpak/exports/share'
are not in the search path set by the XDG_DATA_DIRS environment variable, so
applications installed by Flatpak may not appear on your desktop until the
session is restarted.
ERROR: ld.so: object '/usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
0:00:00.056323387 7 0x55d128e33670 ERROR vadisplay gstvadisplay.c:287:gst_va_display_initialize:<vadisplaydrm0> vaInitialize: unknown libva error
INFO authenticator::application > Authenticator (com.belmoussaoui.Authenticator)
INFO authenticator::application > Version: 4.0.3 ()
INFO authenticator::application > Datadir: /app/share/authenticator
INFO authenticator::models::database > Running DB Migrations...
INFO authenticator::models::database > Database pool initialized.
INFO authenticator::widgets::camera > The camera state changed to NotFound
That libva related error looks very suspicious to me.
I installed Cheese Photobooth as an experiment to see if my webcams work in a flatpak. Both of them worked correctly with Cheese. Please let me know if there's any additional useful information I can provide.