It seems like a recent system update in openSUSE Tumbleweed has caused the built-in Qt web view to not like working with the default seccomp filter in Anki.
No doubt this is some kind of upstream library bug, but give that it renders Anki completely unusable (pretty much every screen is blank and doesn’t render at all) maybe it would be a good idea to disable the seccomp filter sandbox within Anki if starting on Linux? It technically will reduce the security hardening of the built-in web viewer but finding out that you had to set QTWEBENGINE_CHROMIUM_FLAGS="--disable-seccomp-filter-sandbox" in order to work around this problem was a bit tricky, and it means that I cannot start Anki from my normal launcher (instead I have to launch it from the terminal each time). However the fact that there were other Anki bugs with similar symptoms seems to suggest to me it wouldn’t be a bad idea to make this a bit easier to work around when it happens.
Are other QtWebengine apps still working, or have OpenSUSE broken WebEngine across the board? While I want things to “just work”, I’m not sure we can justify turning off a security feature for all Linux users just to work around issues with one distro.
And it works without needing any special flags. So it seems the issue is with the packaged version of QtWebEngine used by Anki? I suspect the issue is the openSUSE updated to glibc 2.34 quite early, meaning that whatever seccomp profile Qt uses probably doesn’t include all of the syscalls necessary for glibc to function (bit strange that this doesn’t cause Anki to crash but ).
in the meantime the anki version from flathub should work - internally it seems to use glibc version 2.31 and I just tested on Fedora 35 that also uses glibc 2.34: When running the anki binary directly all my webviews are empty whereas running the flatpak version works.
The anki flatpak isn’t built from source instead it just bundles/wraps the binary from apps.ankiweb.net. If you want a newer Anki version (or an Anki version that was never uploadd to flathub) as a flatpak you can build it yourself basically by changing the app-id and source in this template. You can also export your custom built flatpaks and share them without relying on flathub. You need one command to build the new local flatpak, one command to export it as a shareable file and one command to install this on the other computer.
Would disabling the sandbox for new Anki versions really help much? Hopefully the next Anki will be based on qt6.2 which should have a fix for this (?). The real problem seems to be that older and popular Anki releases like 2.1.44 or 2.1.35 no longer just work on these newer distro releases. The only way to make the older anki versions run out of the box should be an alternate re-release for these old versions?
The solution suggested in the original topic was before I figured out what was going on. Updating Qt is a better solution, and assuming that is coming for the next release, I’m happy to continue disabling seccomp manually until the next release.