borgbase / vorta

Desktop Backup Client for Borg Backup
https://vorta.borgbase.com
GNU General Public License v3.0
2.01k stars 134 forks source link

Vorta doesn't work when installed from source #1699

Closed ratchek closed 1 year ago

ratchek commented 1 year ago

Description

After installing vorta from source according to the Contributing Guidelines , when I try to run vorta from the terminal in the python virtual environment, I get the following error:

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: wayland, wayland-egl, xcb, offscreen, vnc, linuxfb, eglfs, minimalegl, vkkhrdisplay, minimal.

Aborted (core dumped)

When I try to run the tests, I get the following:

=========================================================================================== test session starts ===========================================================================================
platform linux -- Python 3.10.6, pytest-7.3.1, pluggy-1.0.0 -- /home/thomas/Desktop/opensource/vorta_new/vorta/env/bin/python3
cachedir: .pytest_cache
PyQt6 6.5.0 -- Qt runtime 6.5.0 -- Qt compiled 6.5.0
rootdir: /home/thomas/Desktop/opensource/vorta_new/vorta
configfile: setup.cfg
testpaths: tests
plugins: cov-4.0.0, mock-3.10.0, qt-4.2.0
collected 126 items                                                                                                                                                                                       

tests/test_archives.py::test_prune_intervals 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: wayland, wayland-egl, xcb, offscreen, vnc, linuxfb, eglfs, minimalegl, vkkhrdisplay, minimal.

Fatal Python error: Aborted

Current thread 0x00007f7f3394b000 (most recent call first):
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/src/vorta/qt_single_application.py", line 44 in __init__
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/src/vorta/application.py", line 45 in __init__
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/tests/conftest.py", line 60 in qapp
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/_pytest/fixtures.py", line 902 in call_fixture_func
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/_pytest/fixtures.py", line 1130 in pytest_fixture_setup
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/pluggy/_callers.py", line 39 in _multicall
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/pluggy/_manager.py", line 80 in _hookexec
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/pluggy/_hooks.py", line 265 in __call__
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/_pytest/fixtures.py", line 1076 in execute
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/_pytest/fixtures.py", line 678 in _compute_fixture_value
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/_pytest/fixtures.py", line 592 in _get_active_fixturedef
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/_pytest/fixtures.py", line 570 in getfixturevalue
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/_pytest/fixtures.py", line 551 in _fillfixtures
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/_pytest/python.py", line 1802 in setup
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/_pytest/runner.py", line 494 in setup
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/_pytest/runner.py", line 157 in pytest_runtest_setup
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/pluggy/_callers.py", line 39 in _multicall
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/pluggy/_manager.py", line 80 in _hookexec
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/pluggy/_hooks.py", line 265 in __call__
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/_pytest/runner.py", line 262 in <lambda>
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/_pytest/runner.py", line 341 in from_call
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/_pytest/runner.py", line 261 in call_runtest_hook
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/_pytest/runner.py", line 222 in call_and_report
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/_pytest/runner.py", line 127 in runtestprotocol
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/_pytest/runner.py", line 114 in pytest_runtest_protocol
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/pluggy/_callers.py", line 39 in _multicall
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/pluggy/_manager.py", line 80 in _hookexec
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/pluggy/_hooks.py", line 265 in __call__
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/_pytest/main.py", line 348 in pytest_runtestloop
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/pluggy/_callers.py", line 39 in _multicall
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/pluggy/_manager.py", line 80 in _hookexec
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/pluggy/_hooks.py", line 265 in __call__
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/_pytest/main.py", line 323 in _main
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/_pytest/main.py", line 269 in wrap_session
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/_pytest/main.py", line 316 in pytest_cmdline_main
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/pluggy/_callers.py", line 39 in _multicall
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/pluggy/_manager.py", line 80 in _hookexec
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/pluggy/_hooks.py", line 265 in __call__
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/_pytest/config/__init__.py", line 166 in main
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/lib/python3.10/site-packages/_pytest/config/__init__.py", line 189 in console_main
  File "/home/thomas/Desktop/opensource/vorta_new/vorta/env/bin/pytest", line 8 in <module>

Extension modules: PyQt6.QtCore, PyQt6.QtGui, PyQt6.QtWidgets, psutil._psutil_linux, psutil._psutil_posix, PyQt6.QtDBus, PyQt6.QtNetwork, PyQt6.QtTest (total: 8)
Aborted (core dumped)

Reproduction

OS

Ubuntu 22.04.2 LTS, GNOME 42.5

Version of Vorta

Not yet released. Cloned from github repo.

What did you install Vorta with?

Other

Version of Borg

No response

Logs

No response

diivi commented 1 year ago

https://forum.qt.io/topic/93247/qt-qpa-plugin-could-not-load-the-qt-platform-plugin-xcb-in-even-though-it-was-found/21

People here installed libxcb and were able to fix this error, have you tried this?

Similar - https://github.com/NVlabs/instant-ngp/discussions/300#discussioncomment-3985753

ratchek commented 1 year ago

Yeah, I tried that and it didn't work.

m3nu commented 1 year ago

Have you tried installing libegl1

I just fixed the same thing for our Github Actions process. https://github.com/borgbase/vorta/pull/1685/commits/50d2db30d1f6afae8964682ef5b53f7819ff951f

m3nu commented 1 year ago

Else you can copy the dependencies from GH Actions. They will definitely work on Ubuntu. https://github.com/borgbase/vorta/blob/master/.github/workflows/test.yml#L65

Might be worth adding this in the docs. I wonder if PyQt has some docs on this.

ratchek commented 1 year ago

Installing libegl1 didn't work, but installing the dependencies from GH Actions did. Thanks!