flathub / com.valvesoftware.SteamLink

Stream games from another computer with Steam
https://flathub.org/apps/details/com.valvesoftware.SteamLink
Other
58 stars 5 forks source link

application failed to start because no Qt platform plugin could be initialized #25

Open Duxon opened 2 years ago

Duxon commented 2 years ago

Since I have updated to 1.1.82.200, the application no longer launches. Instead, it closes with the following error:

(base) duxon@penguin:~$ flatpak run com.valvesoftware.SteamLink 
qt.qpa.xcb: could not connect to display 
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

This happens on a Debian (buster) on Crostini where I had no issues before. Any ideas why that happens?

smcv commented 2 years ago

This is probably a regression caused by #16.

Do you have an environment variable like QT_QPA_PLATFORM set, forcing Qt to use its xcb plugin?

Please try each of these possible workarounds:

If the first one works, we can put the equivalent of that in the metadata and it should solve this.

If the first one doesn't work, the second one basically reverts #16, which weakens the sandboxing (and will display scary warnings in GNOME Software) but should make the app work again.

smcv commented 2 years ago

It would also be interesting to know whether you have the same problem with other Qt Flatpak apps that use fallback-x11, like https://github.com/flathub/org.kde.kid3, https://github.com/flathub/org.kde.kontrast or https://github.com/flathub/org.qelectrotech.QElectroTech.

Duxon commented 2 years ago

Thanks for your quick reply! The workarounds didn't work for me:

I'm starting to believe that Crostini (the Linux sandbox under Chrome OS) might be the root of the issue.

smcv commented 2 years ago

flatpak run --socket=x11 --nosocket=fallback-x11 com.valvesoftware.SteamLink

Sorry, the socket arguments get a bit confusing around fallback-x11. Perhaps try: flatpak run --nosocket=wayland com.valvesoftware.SteamLink

I'm starting to believe that Crostini (the Linux sandbox under Chrome OS) might be the root of the issue.

Outside the sandbox, what are $XDG_RUNTIME_DIR, $DISPLAY and $WAYLAND_DISPLAY?

Outside the sandbox, where is your X11 socket?

Outside the sandbox, where is your Wayland socket?

Does running flatpak run -vv ... shed any more light on the situation?

error: Unknown option --unset-env=QT_QPA_PLATFORM

Which version of Flatpak is this?

In older versions you'd have to use --env=QT_QPA_PLATFORM= instead of that - but if QT_QPA_PLATFORM wasn't set anyway, then that can't be the problem.

Duxon commented 2 years ago

Perhaps try: flatpak run --nosocket=wayland com.valvesoftware.SteamLink

That works!

Outside the sandbox, what are $XDG_RUNTIME_DIR, $DISPLAY and $WAYLAND_DISPLAY?

echo $XDG_RUNTIME_DIR $DISPLAY $WAYLAND_DISPLAY returns /run/user/1000 :0 wayland-0.

Outside the sandbox, where is your X11 socket/where is your Wayland socket?

I have no idea how to figure that out, sorry.

Which version of Flatpak is this?

Flatpak 1.2.5

smcv commented 2 years ago

Does running flatpak run -vv ... shed any more light on the situation?

You didn't answer this. What messages do you get when you run in the mode that is not working (without using the --nosocket=wayland workaround), but with -vv to make Flatpak more verbose?

Outside the sandbox, where is your X11 socket/where is your Wayland socket?

I have no idea how to figure that out, sorry.

With the additional information you already provided, I can be more specific. Does /run/user/1000/wayland-0 exist and is it owned by your uid 1000?

It should look something like this:

$ ls -l /run/user/1000/wayland-0
srwxr-xr-x 1 smcv smcv 0 Nov 16 16:41 /run/user/1000/wayland-0

Flatpak 1.2.5

That's a few years old. Would you be able to try Flatpak 1.10.x from buster-backports, or alternatively, upgrading from Debian 10 'buster' to Debian 11 'bullseye'?

Yariazen commented 2 years ago

I have I believe the same issue in flatpak 1.10.5 also on crostini. Wayland-0 is owned by uid 1000, and here's the verbose: https://paste-bin.xyz/18016 Don't know if it helps but I solved it for myself by installing flatseal and disabling fallback to x11 windowing system

Duxon commented 2 years ago

I have I believe the same issue in flatpak 1.10.5 also on crostini. Wayland-0 is owned by uid 1000, and here's the verbose: https://paste-bin.xyz/18016

Yes, the verbose output is the exactly same for me. Unfortunately, installing Flatpak 1.10.x from buster-backports does not work using this guide (due to broken dependencies). Upgrading the crostini container to buster could be possible, but could also break Crostini which I can't afford to test right now. I am glad there is a nosocket=wayland workaround. That wasn't necessary about 1.5 months ago, however.

smcv commented 2 years ago

The problem here appears to be:

smcv commented 2 years ago

Unfortunately, installing Flatpak 1.10.x from buster-backports does not work using this guide (due to broken dependencies)

What you need is the same instructions that are described there for bullseye-backports, except replace every occurrence of bullseye-backports with buster-backports because you are still running on buster. Does that work? If not, please report it to Debian as a bug in the flatpak package (I am also the maintainer of that package), because installing buster-backports packages on buster should succeed.

smcv commented 2 years ago

Running this app with flatpak run --socket=wayland --env=QT_DEBUG_PLUGINS=1 com.valvesoftware.SteamLink might help to figure out why it isn't using the Wayland socket?

Duxon commented 2 years ago

Using buster-backports instead of bullseye-backports works. I am now running Flatpak 1.10.5.

However, the verbose error stays the same as before. Running Steam Link with --socket=wayland --env=QT_DEBUG_PLUGINS=1 yields this: https://paste-bin.xyz/18071