rafatosta / zapzap

WhatsApp desktop application written in Pyqt6 + PyQt6-WebEngine.
GNU General Public License v3.0
55 stars 2 forks source link

Not working on Wayland (Not running on flatpak) #144

Closed Vistaus closed 1 year ago

Vistaus commented 1 year ago

I installed ZapZap manually from the latest git master, but it doesn't even start:

qt.core.plugin.factoryloader: checking directory path "/usr/lib64/python3.10/site-packages/PyQt6/Qt6/plugins/platforms" ...
qt.core.plugin.factoryloader: looking at "/usr/lib64/python3.10/site-packages/PyQt6/Qt6/plugins/platforms/libqeglfs.so"
qt.core.plugin.loader: Found metadata in lib /usr/lib64/python3.10/site-packages/PyQt6/Qt6/plugins/platforms/libqeglfs.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "eglfs"
        ]
    },
    "archlevel": 1,
    "className": "QEglFSIntegrationPlugin",
    "debug": false,
    "version": 394240
}

qt.core.plugin.factoryloader: Got keys from plugin meta data QList("eglfs")
qt.core.plugin.factoryloader: looking at "/usr/lib64/python3.10/site-packages/PyQt6/Qt6/plugins/platforms/libqlinuxfb.so"
qt.core.plugin.loader: Found metadata in lib /usr/lib64/python3.10/site-packages/PyQt6/Qt6/plugins/platforms/libqlinuxfb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "linuxfb"
        ]
    },
    "archlevel": 1,
    "className": "QLinuxFbIntegrationPlugin",
    "debug": false,
    "version": 394240
}

qt.core.plugin.factoryloader: Got keys from plugin meta data QList("linuxfb")
qt.core.plugin.factoryloader: looking at "/usr/lib64/python3.10/site-packages/PyQt6/Qt6/plugins/platforms/libqminimal.so"
qt.core.plugin.loader: Found metadata in lib /usr/lib64/python3.10/site-packages/PyQt6/Qt6/plugins/platforms/libqminimal.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimal"
        ]
    },
    "archlevel": 1,
    "className": "QMinimalIntegrationPlugin",
    "debug": false,
    "version": 394240
}

qt.core.plugin.factoryloader: Got keys from plugin meta data QList("minimal")
qt.core.plugin.factoryloader: looking at "/usr/lib64/python3.10/site-packages/PyQt6/Qt6/plugins/platforms/libqminimalegl.so"
qt.core.plugin.loader: Found metadata in lib /usr/lib64/python3.10/site-packages/PyQt6/Qt6/plugins/platforms/libqminimalegl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimalegl"
        ]
    },
    "archlevel": 1,
    "className": "QMinimalEglIntegrationPlugin",
    "debug": false,
    "version": 394240
}

qt.core.plugin.factoryloader: Got keys from plugin meta data QList("minimalegl")
qt.core.plugin.factoryloader: looking at "/usr/lib64/python3.10/site-packages/PyQt6/Qt6/plugins/platforms/libqoffscreen.so"
qt.core.plugin.loader: Found metadata in lib /usr/lib64/python3.10/site-packages/PyQt6/Qt6/plugins/platforms/libqoffscreen.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "offscreen"
        ]
    },
    "archlevel": 1,
    "className": "QOffscreenIntegrationPlugin",
    "debug": false,
    "version": 394240
}

qt.core.plugin.factoryloader: Got keys from plugin meta data QList("offscreen")
qt.core.plugin.factoryloader: looking at "/usr/lib64/python3.10/site-packages/PyQt6/Qt6/plugins/platforms/libqvkkhrdisplay.so"
qt.core.plugin.loader: Found metadata in lib /usr/lib64/python3.10/site-packages/PyQt6/Qt6/plugins/platforms/libqvkkhrdisplay.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "vkkhrdisplay"
        ]
    },
    "archlevel": 1,
    "className": "QVkKhrDisplayIntegrationPlugin",
    "debug": false,
    "version": 394240
}

qt.core.plugin.factoryloader: Got keys from plugin meta data QList("vkkhrdisplay")
qt.core.plugin.factoryloader: looking at "/usr/lib64/python3.10/site-packages/PyQt6/Qt6/plugins/platforms/libqvnc.so"
qt.core.plugin.loader: Found metadata in lib /usr/lib64/python3.10/site-packages/PyQt6/Qt6/plugins/platforms/libqvnc.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "vnc"
        ]
    },
    "archlevel": 1,
    "className": "QVncIntegrationPlugin",
    "debug": false,
    "version": 394240
}

qt.core.plugin.factoryloader: Got keys from plugin meta data QList("vnc")
qt.core.plugin.factoryloader: looking at "/usr/lib64/python3.10/site-packages/PyQt6/Qt6/plugins/platforms/libqwayland-egl.so"
qt.core.plugin.loader: Found metadata in lib /usr/lib64/python3.10/site-packages/PyQt6/Qt6/plugins/platforms/libqwayland-egl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland-egl"
        ]
    },
    "archlevel": 1,
    "className": "QWaylandEglPlatformIntegrationPlugin",
    "debug": false,
    "version": 394240
}

qt.core.plugin.factoryloader: Got keys from plugin meta data QList("wayland-egl")
qt.core.plugin.factoryloader: looking at "/usr/lib64/python3.10/site-packages/PyQt6/Qt6/plugins/platforms/libqwayland-generic.so"
qt.core.plugin.loader: Found metadata in lib /usr/lib64/python3.10/site-packages/PyQt6/Qt6/plugins/platforms/libqwayland-generic.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland"
        ]
    },
    "archlevel": 1,
    "className": "QWaylandIntegrationPlugin",
    "debug": false,
    "version": 394240
}

qt.core.plugin.factoryloader: Got keys from plugin meta data QList("wayland")
qt.core.plugin.factoryloader: looking at "/usr/lib64/python3.10/site-packages/PyQt6/Qt6/plugins/platforms/libqxcb.so"
qt.core.plugin.loader: Found metadata in lib /usr/lib64/python3.10/site-packages/PyQt6/Qt6/plugins/platforms/libqxcb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "xcb"
        ]
    },
    "archlevel": 1,
    "className": "QXcbIntegrationPlugin",
    "debug": false,
    "version": 394240
}

qt.core.plugin.factoryloader: Got keys from plugin meta data QList("xcb")
qt.core.plugin.factoryloader: checking directory path "/usr/bin/platforms" ...
qt.core.library: "/usr/lib64/python3.10/site-packages/PyQt6/Qt6/plugins/platforms/libqwayland-generic.so" cannot load: Cannot load library /usr/lib64/python3.10/site-packages/PyQt6/Qt6/plugins/platforms/libqwayland-generic.so: (/lib64/libQt6Gui.so.6: version `Qt_6_PRIVATE_API' not found (required by /usr/lib64/python3.10/site-packages/PyQt6/Qt6/plugins/platforms/libqwayland-generic.so))
qt.core.plugin.loader: QLibraryPrivate::loadPlugin failed on "/usr/lib64/python3.10/site-packages/PyQt6/Qt6/plugins/platforms/libqwayland-generic.so" : "Cannot load library /usr/lib64/python3.10/site-packages/PyQt6/Qt6/plugins/platforms/libqwayland-generic.so: (/lib64/libQt6Gui.so.6: version `Qt_6_PRIVATE_API' not found (required by /usr/lib64/python3.10/site-packages/PyQt6/Qt6/plugins/platforms/libqwayland-generic.so))"
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, vkkhrdisplay, vnc, wayland-egl, wayland, xcb.

fish: Job 1, 'zapzap' terminated by signal SIGABRT (Abort)

OS: openSUSE Tumbleweed DE: KDE Plasma 5.27.2 Qt version: latest Qt6 from the Qt 6 Tumbleweed repo

How do I fix this? I have no issues with other Wayland apps.

rafatosta commented 1 year ago

I can't support it outside the flatpak. Please use in flatpak to avoid unnecessary trouble.

Vistaus commented 1 year ago

Why can't you support it outside of Flatpak? It's a Qt app, and you provide a setup.py for installation anyway.

rafatosta commented 1 year ago

Why can't you support it outside of Flatpak? It's a Qt app, and you provide a setup.py for installation anyway.

Yes it's a Qt app, but unfortunately each distro handles the required dependencies differently. The correct thing would be to package it for the specific distro instead of installing it manually. The spell check feature may not work for example.

Vistaus commented 1 year ago

I don't care about minor things like spell check, I just want the basic features to work.

rafatosta commented 1 year ago

Just installing and running should not be causing this error. Surely you changed something!! It is difficult to help you without even knowing what and how it is being executed

Vistaus commented 1 year ago

I did not change anything. I simply checked out the latest git master and ran sudo python3 setup.py install

rafatosta commented 1 year ago

The most I can help you is to ask you to remove this stretch of code and run again

image

https://github.com/rafatosta/zapzap/blob/main/zapzap/__main__.py#:~:text=if%20not%20zapzap,%3D%20%27xcb%27

Vistaus commented 1 year ago

Sorry for my late reply! I just tried that but it still fails:

~ zapzap
qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found.
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, vkkhrdisplay, vnc, wayland-egl, wayland, xcb.

fish: Job 1, 'zapzap' terminated by signal SIGABRT (Abort)

I also just tried python3 run.py from the zapzap folder, but that fails too:

Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 163, in _run_module_as_main
    mod_name, _Error)
  File "/usr/lib64/python2.7/runpy.py", line 111, in _get_module_details
    __import__(mod_name)  # Do not catch exceptions initializing package
  File "zapzap/__init__.py", line 2, in <module>
    from PyQt6.QtCore import QStandardPaths
ImportError: No module named PyQt6.QtCore

And I have no idea why, as PyQt6 is installed:

sudo pip3 install PyQt6 PyQt6-WebEngine dbus-python
Requirement already satisfied: PyQt6 in /usr/lib64/python3.10/site-packages (6.4.2)