Anki Forums

Anki UI appears broken with newer versions of Qt


Anki version is current latest:

$ Anki --version
Anki 2.1.46

I recently updated my openSUSE tumbleweed to the latest and Anki lost main UI elements:

I can open the browser using b but I can’t edit cards:

Additionally, I can’t close the windows normally once browser is opened (I need to $ killall -9 Anki).

For information:

$ zypper info libQt5Core5
Loading repository data...
Reading installed packages...

Information for package libQt5Core5:
Repository     : Main Repository (OSS)
Name           : libQt5Core5
Version        : 5.15.2+kde222-1.3
Arch           : x86_64
Vendor         : openSUSE
Installed Size : 5.9 MiB
Installed      : Yes (automatically)
Status         : up-to-date
Source package : libqt5-qtbase-5.15.2+kde222-1.3.src
Summary        : Qt 5 Core Library
Description    : […]

I have the same problem and I’m also on openSUSE TW too, I’ve tried Anki 2.1.44 and 2.1.48 and they both have a blank deck screen. I’ve also tried deleting the user profile folder, and I don’t have any extensions so it can’t be that. Weirdly enough the broken version of Anki on the official openSUSE repo works, but it still can’t sync so I can’t use it.
Also I was gonna ask this question since it’s been bugging me for like the last 5 days, but turns out someone asked it 30 minutes earlier.

1 Like

Please try anki/ at main · ankitects/anki · GitHub

Thanks for replying, but I tried compiling 2.1.48 from source and it doesn’t change anything. I tried ./run and the ./scripts/runopt one. The 2.1.48 beta is older than the one on Github, and 2.1.48+rc2 doesn’t work anyway. Also when I start the one compiled from source it tells me to download 2.1.44, the “newest” one, is that supposed to happen?

Thank you for replying!
Python wheel is not working either.

I have met some kind of similar bug in the past, and all it took to me was to resize the window once to make it work. Does it work for you?

@BlackBeans Alas, that does not solve it for me

When I press F1, the terminal shows this message:

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, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

This happened both before and after reinstalling.

I’m afraid we’ll have to wait for this to be fixed upstream. I suspect the issue is coming from a breaking change caused in one of the latest updates of Qt, and re-installing Anki will not help. For those who can’t wait, the only way to work around this without code change is to rollback prior to the Qt update. Personally, I will just wait because my Firefox profile is rendered incompatible with the previous Firefox version and I’m not eager to spend time re-configuring everything. Mobile version will be enough for the time being!

In another thread Fedora 35 and Anki 2.1.47 updates with blank Anki window - #7 by boydkelly someone found Anki to run with:
anki --no-sandbox
which works for me now.
Further down below that thread he reports exporting QTWEBENGINE_CHROMIUM_FLAGS as well

Try running QT_DEBUG_PLUGINS=1 anki, and see if it contains useful information.

Nice, this is working for me as well.

I didn’t found any useful information with QT_DEBUG_PLUGINS=1 anki on my side though.