Rapid Photo Downloader Error on Wayland on Arch
If you try to run rapid-photo-downloader on Arch on Wayland, you get this error message:
qt.qpa.plugin: Could not find the Qt platform plugin "wayland-egl" in "" 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, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
Fatal Python error: Aborted
Current thread 0x00007fa0cd669740 (most recent call first): File "/usr/lib/python3.11/site-packages/raphodo/ui/viewutils.py", line 975 in any_screen_scaled_qt File "/usr/lib/python3.11/site-packages/raphodo/ui/viewutils.py", line 991 in any_screen_scaled File "/usr/lib/python3.11/site-packages/raphodo/rapid.py", line 7489 in main File "/usr/bin/rapid-photo-downloader", line 33 in <module>
Extension modules: PyQt5.QtCore, gi._gi, zmq.backend.cython.context, zmq.backend.cython.message, zmq.backend.cython.socket, zmq.backend.cython._device, zmq.backend.cython._poll, zmq.backend.cython._proxy_steerable, zmq.backend.cython._version, zmq.backend.cython.error, zmq.backend.cython.utils, psutil._psutil_linux, psutil._psutil_posix, gphoto2._widget, gphoto2._version, gphoto2._result, gphoto2._port_log, gphoto2._port_info_list, gphoto2._list, gphoto2._filesys, gphoto2._file, gphoto2._context, gphoto2._camera, gphoto2._abilities_list, PyQt5.QtGui, PyQt5.QtWidgets, PyQt5.QtNetwork, tornado.speedups, PyQt5.QtXml, PyQt5.QtX11Extras, PyQt5.QtWebChannel, PyQt5.QtTest, PyQt5.QtSvg, PyQt5.QtSql, PyQt5.QtQml, PyQt5.QtQuick, PyQt5.QtQuickWidgets, PyQt5.QtPrintSupport, PyQt5.QtPositioning, PyQt5.QtLocation, PyQt5.QtOpenGL, PyQt5.QtDBus (total: 42) Avbrutt (SIGABRT) (kjerne lagret i fil)
Reinstalling the program does nothing. It turns out that there is a missing dependency. I have spent a lot of time trying to figure this out, but finding the information is hard, so I thought I would help my future self and maybe some others by supplying the fix I have found. It is not, as many suggest online, enough to install Python-PyQt5. It is already a dependency and installed. You need to install qt5-wayland to get it to work. On some distros, you also need to install egl-wayland, while on others, it comes as a dependency of qt5-wayland.
This is not just a problem with rapid-photo-downloader. There is a lot of discussion online about this error message with other Qt5 and Qt6 packages from different distros like Debian, Ubuntu and Arch. qt5-wayland is a dependency only if you run Wayland, so maybe that is why it does not come with the package as a dependency even if I think it should. Now that the larger desktop environments are all Wayland by default, I would guess X11 users are the minority of GNU/Linux users. Therefore, Wayland dependencies should come with all packages that need them. Legacy X11 users would probably not worry too much if a small extra package they do not need is installed. If they really worried about bloat, they would not have used X11 in the first place since it is a baroque collection of legacy cruft.
Update August 6th, 2023: I have experienced the same issue with Kdenlive on GNU Guix as well. It turns out that both Qt5-wayland (qtwayland@5.15.8 on Guix) and egl-wayland are missing dependencies for Kdenlive for Wayland users.