Project

General

Profile

Bug #2870

[qutebrowser] Unable to start, using wayland (no Qt platform plugin could be initialized)

sseneca - about 1 year ago - . Updated about 1 year ago.

Status:
not-a-bug
Priority:
bug
Assignee:
-
% Done:

0%


Description

First, there seems to be an issue running under Wayland:


~ 
❯ qutebrowser 
11:30:10 INFO: Could not load the Qt platform plugin "wayland" in "" even though it was found.
11:30:10 CRITICAL: 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, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

Fatal Python error: Aborted

Current thread 0x00007fdc55915740 (most recent call first):
  File "/usr/lib/python3.8/site-packages/qutebrowser/app.py", line 508 in __init__
  File "/usr/lib/python3.8/site-packages/qutebrowser/app.py", line 92 in run
  File "/usr/lib/python3.8/site-packages/qutebrowser/qutebrowser.py", line 202 in main
  File "/usr/bin/qutebrowser", line 33 in <module>
zsh: abort (core dumped)  qutebrowser

But forcing it to run under X also doesn't work:


~
❮ QT_QPA_PLATFORM=xcb qutebrowser
11:36:18 INFO: Run :adblock-update to get adblock lists.

This outputs the following error:


Files

1597833427.png (26.6 KB) 1597833427.png sseneca, 2020-08-19 10:37 AM

History

#1

Updated by bill-auger about 1 year ago

  • Subject changed from [qutebrowser] Unable to start to [qutebrowser] Unable to start, using wayland

firstly, i beleive that should be 'QT_QPA_PLATFORMTHEME' - but secondly, setting QT_QPA_PLATFORMTHEME is only changing the programs visual appearence - that is not "running under X" - you would need to install X and start X to do that - off-hand, i know that wayland can not run all programs - wayland requires the xwayland extension to run some programs - do you have it installed?

$ pacman -Ss xorg-server-xwayland
extra/xorg-server-xwayland 1.20.8-3 (xorg)
    run X clients under wayland
#2

Updated by sseneca about 1 year ago

QT_QPA_PLATFORMTHEME sets the theme, QT_QPA_PLATFORM can be used in the way I described as detailed here: https://wiki.archlinux.org/index.php/Wayland#Qt_5

yeah, I have xwayland installed and it works fine (I use emacs all the time which still needs xwayland)

#3

Updated by bill-auger about 1 year ago

there is a bug report upstream that look similar - try running this command:

$ python3 -c "from PyQt5.QtWidgets import QApplication; app = QApplication([])" 

if that gives the same error as qutebrowser, the upstream bug report suggests that it was caused by PyQt5 being installed by `sudo pip`

#4

Updated by sseneca about 1 year ago

Wayland remains broken:


❯ python3 -c "from PyQt5.QtWidgets import QApplication; app = QApplication([])" 
qt.qpa.plugin: Could not load the Qt platform plugin "wayland" 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, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

zsh: abort (core dumped)  python3 -c "from PyQt5.QtWidgets import QApplication; app = QApplication([])" 

But under X doesn't give me an error message and seems to work fine. Also I have PyQt5 installed from pacman (python-pyqt5), not from pip

#5

Updated by bill-auger about 1 year ago

you could try reinstalling 'python-pyqt5' to be sure you have the arch files

# pacman -S python-pyqt5

that error suggests that the problem is not with qutebrowser; but related to pyqt5

i would try some other programs which use pyqt5 - agordejo, frescobaldi, openshot, tribler, or any others listed by:

$ pacman -Sii python-pyqt5 | grep Required
#6

Updated by bill-auger about 1 year ago

i found several discussions about this - all of them indicate that there is some version mismatch of pytqt5 with the system QT - these maybe the most relevant - both have solutions which satisfied the OP - see if any of the advice in these help your situation

https://bbs.archlinux.org/viewtopic.php?id=247030

https://forum.qt.io/topic/111553/solved-qt-qpa-plugin-could-not-find-the-qt-platform-plugin-xcb-in/9

#7

Updated by sseneca about 1 year ago

yeah you're right on the pyqt5, trying picard and vico gave me the same error. thanks for those links, when I set QT_DEBUG_PLUGINS to 1 I get a more interesting error message:

22:18:06 WARNING: QLibraryPrivate::loadPlugin failed on "/home/sseneca/.local/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqwayland-generic.so" :

"Cannot load library /home/sseneca/.local/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqwayland-generic.so: (/home/sseneca/.local/lib/python3.8/site-packages/PyQt5/Qt/lib/libQt5Core.so.5: version `Qt_5.15' not found (required by /usr/lib/libQt5WaylandClient.so.5))"

so yeah it looks like a version mismatch I guess? which I don't understand, since I have everything installed from the repos, and there is no mismatch there

#8

Updated by bill-auger about 1 year ago

this is almost certainly the problem:

"Cannot load library /home/sseneca/.local/lib/python3.8/site-packages/PyQt5/..." 

that is suggesting that pip is installed is is over-riding the system files

do you have PyQt5 installed in your HOME dir?

$ ls /home/sseneca/.local/lib/python3.8/site-packages/PyQt5/

if it does, i would use pip to uninstall pyqt5; - or forcefully delete that PyQt5 dir if necessary

im not sure why it would be looking there in the first place though - does your $PATH or $PYTHON_HOME include anything under $HOME/.local/lib/ ? - if it does, i would remove those references; and use pip only to install packaging into a virtual_env

#9

Updated by sseneca about 1 year ago

I don't have $PYTHON_HOME, nor do I have any reference to $HOME/.local/lib, but I do have $HOME/.local/bin on my PATH before anything else. that shouldn't be causing this issue though, right?

as for the rest you're completely correct -- I had pip installed for whatever reason with a few packages installed. I have no use for pip and can't remember why I had it installed so I've uninstalled everything it installed and removed it, and things seems to be working again now.

thanks for the help!

#10

Updated by bill-auger about 1 year ago

  • Status changed from unconfirmed to not-a-bug
  • Subject changed from [qutebrowser] Unable to start, using wayland to [qutebrowser] Unable to start, using wayland (no Qt platform plugin could be initialized)

Also available in: Atom PDF