borgbase / vorta

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

0.7.1 bugfix release and RCs #629

Closed lennardv2 closed 3 years ago

lennardv2 commented 3 years ago

Describe the bug On MacOS 10.15.5 Vorta 0.7.0 launches, but when i want to open the GUI it crashes immediately without any error. Removing the settings.db has no effect, so clean install has same bug. 0.6.26 seems to be working fine.

To Reproduce Steps to reproduce the behaviour:

  1. Open Vorta
  2. Open GUI via tray menu
  3. Crash

Desktop (please complete the following information):

Additional context If appropriate include logs. Can be found in Main Window > Misc Tab > Log.

2020-09-08 10:36:01,156 - vorta.i18n - DEBUG - Loading translation failed for ['en-NL'].
2020-09-08 10:36:01,184 - apscheduler.scheduler - INFO - Scheduler started
2020-09-08 10:36:01,185 - apscheduler.scheduler - INFO - Added job "VortaScheduler.create_backup" to job store "default"
2020-09-08 10:36:01,185 - vorta.scheduler - DEBUG - New job for profile Default was added.
2020-09-08 10:36:01,389 - vorta.borg.borg_thread - INFO - Running command /usr/local/bin/borg --version

Btw is there a way to donate to this project?

siu00adg commented 3 years ago

Same issue here except I'm on Manjaro Linux with XFCE. Was working great until the last update to 0.7.0-1.

$ vorta
2020-09-08 13:15:55,913 - vorta.i18n - DEBUG - Loading translation failed for ['en-GB', 'en-Latn-GB'].
2020-09-08 13:15:55,922 - apscheduler.scheduler - INFO - Scheduler started
2020-09-08 13:15:55,924 - apscheduler.scheduler - INFO - Added job "VortaScheduler.create_backup" to job store "default"
2020-09-08 13:15:55,924 - vorta.scheduler - DEBUG - New job for profile Default was added.
2020-09-08 13:15:55,963 - vorta.borg.borg_thread - INFO - Running command /usr/bin/borg --version

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/vorta/application.py", line 90, in open_main_window_action
    self.main_window = MainWindow(self)
  File "/usr/lib/python3.8/site-packages/vorta/views/main_window.py", line 50, in __init__
    self.scheduleTab = ScheduleTab(self.scheduleTabSlot)
  File "/usr/lib/python3.8/site-packages/vorta/views/schedule_tab.py", line 32, in __init__
    self.populate_from_profile()
  File "/usr/lib/python3.8/site-packages/vorta/views/schedule_tab.py", line 68, in populate_from_profile
    self.init_wifi()
  File "/usr/lib/python3.8/site-packages/vorta/views/schedule_tab.py", line 72, in init_wifi
    for wifi in get_sorted_wifis(self.profile()):
  File "/usr/lib/python3.8/site-packages/vorta/utils.py", line 130, in get_sorted_wifis
    system_wifis = network_status_monitor.get_known_wifis()
  File "/usr/lib/python3.8/site-packages/vorta/network_status/network_manager.py", line 37, in get_known_wifis
    settings = self._nm.get_settings(connection_path)
  File "/usr/lib/python3.8/site-packages/vorta/network_status/network_manager.py", line 121, in get_settings
    return get_result(settings.call('GetSettings'))
  File "/usr/lib/python3.8/site-packages/vorta/network_status/network_manager.py", line 145, in get_result
    raise DBusException("DBus call failed: {}".format(msg.arguments()))
vorta.network_status.network_manager.DBusException: DBus call failed: ['uid 1000 has no permission to perform this operation']
Aborted (core dumped)
m3nu commented 3 years ago

@lvoogdt , you are on macOS. So I assume you are encountering https://github.com/borgbase/vorta/issues/624. Can you run

/Applications/Vorta.app/Contents/MacOS/vorta-darwin

in the Terminal and add the output here to verify? Most likely already fixed in the master branch, but not released.

m3nu commented 3 years ago

@siu00adg , you're on Linux and I see you encounter a permission error with a new feature. I think @ktosiek may be able to help here, since he developed the feature. I'm guessing you need to give your user some permissions to access DBus or we should gracefully fail in such a case.

m3nu commented 3 years ago

Regarding donations, you can support the parent project, Borg Backup here: https://www.borgbackup.org/support/fund.html

Vorta is already backed by BorgBase.com and we also forward donations to Borg directly.

m3nu commented 3 years ago

Here a second release candidate for macOS, that may already address your issue, @lvoogdt:

https://files.qmax.us/vorta/Vorta-0.7.1-RC2.dmg

leebut commented 3 years ago

@siu00adg Not ideal, but I have to run Vorta with sudo to get the GUI.

m3nu commented 3 years ago

Wow. We definitely want to run without those permissions. Can we fail more gracefully here, @ktosiek ?

Instead of sudo, have you guys considered adding yourself to some special group (maybe called network-manager?) that has those permissions?

leebut commented 3 years ago

@m3nu, These are the available system groups (no network-manager):

root bin daemon sys adm tty disk lp mem
kmem wheel ftp mail uucp log utmp locate
rfkill smmsp proc http games lock dbus network
video audio optical floppy storage scanner 
input power nobody users systemd-journal
systemd-journal-gateway systemd-timesync
systemd-network systemd-bus-proxy
systemd-resolve systemd-coredump
uuidd systemd-journal-remote
systemd-journal-upload rpc dnsmasq
avahi polkitd nm-openconnect
nm-openvpn ntp rtkit adbusers usbmux
git colord lightdm lee kvm tor nvidia-persistenced
clamav render mongodb cups postgres 
mysql  plugdev lxdm xmms2 vboxusers
sausage sddm spamd searx wireshark
netdata geoclue xampusers xamppusers
vboxsf dhcpcd brlapi libvirt gluster
sndiod named

Member of these groups:

sys lp wheel network video audio
optical storage scanner power
lightdm lee mysql vboxusers
xampusers xamppusers
m3nu commented 3 years ago

Not sure which one is needed. I fear this will be different for each distro.

I added some quick exceptions to the network stuff for now. Though the error didn't happen on Debian 10, where I do my Linux testing. You can try it out by using this branch:

$ pip install -U git+https://github.com/m3nu/vorta.git@issue/629/dbus-perm-errors

m3nu commented 3 years ago

dbus or network look good as groups?

samuel-w commented 3 years ago

Found a similar bug, going to post here as well:

Describe the bug vorta -d no longer works in XFCE, displaying no tray icon, and any further attempts to open don't work

To Reproduce Steps to reproduce the behavior:

  1. Fully close Vorta pkill vorta
  2. Run vorta -d
  3. Observe that there is no tray icon, and attempting to open another window fails.

Occurs in pip and in flatpak, and reproducible in Xubuntu 20.04 live desktop Edit: As well as Ubuntu 20.04 live desktop If you want to reproduce in a live desktop, run this first for dependencies, copied from automated tests:

sudo apt install -y \
          xvfb herbstluftwm libssl-dev openssl libacl1-dev libacl1 build-essential \
          libxkbcommon-x11-0 dbus-x11 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 \
          libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0

Seems to be an XFCE only bug, doesn't happen in KDE. Edit: Does affect GNOME

Desktop (please complete the following information):

Vorta and Borg versions can be found in Main Window > Misc Tab

Additional context I believe the cause is a0e7d50318538c28653a62d8e30afa5fcb715745 I have no idea why it happens, because there is no code that touches the daemonize functionality. When I make get_network_status_monitor always return NullNetworkStatusMonitor daemonize works fine.

Not fixed yet by #631

Hofer-Julian commented 3 years ago

I've also notices that GNOME with Tray extension showed no tray icon, but I wasn't sure if it was just my setup. Did you also test Ubuntu GNOME?

samuel-w commented 3 years ago

I think it occurs on Ubuntu 20.04 live ISO which has GNOME as desktop environment, running with daemon it crashes, without daemon it is fine. example

Whether it exits or not on exception might be related to PyQt5 installed in system or not, but for this I think it's irrelevant.

ktosiek commented 3 years ago

It seems strange to me that a user can't get WiFi settings, but can get a list of connections. But that doesn't mean Vorta should crash :-)

@siu00adg can you try first running:

dbus-send --print-reply --system --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager/Settings org.freedesktop.NetworkManager.Settings.ListConnections

this should show a list of object path "/org/freedesktop/NetworkManager/Settings/N"), and then for each of those paths:

dbus-send --print-reply --system --dest=org.freedesktop.NetworkManager PUT_SETTINGS_PATH_HERE org.freedesktop.NetworkManager.Settings.Connection.GetSettings|head

Just to see if there's an error, or output like array [ dict entry( string "ipv6" .... Do you get errors only for some of those connections, but not for others?

@samuel-w The problem with daemonize seems to be a separate issue, because nothing DBus-based works in that case. It looks like early initialization of DBus doesn't work well with fork - I'll make the network modules initialization lazy, all other DBus users start later.

siu00adg commented 3 years ago
[alex@ThinkPadT14s ~]$ dbus-send --print-reply --system --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager/Settings org.freedesktop.NetworkManager.Settings.ListConnections
method return time=1599591694.315077 sender=:1.13 -> destination=:1.2559 serial=11633 reply_serial=2
   array [
      object path "/org/freedesktop/NetworkManager/Settings/1"
      object path "/org/freedesktop/NetworkManager/Settings/2"
      object path "/org/freedesktop/NetworkManager/Settings/3"
      object path "/org/freedesktop/NetworkManager/Settings/4"
      object path "/org/freedesktop/NetworkManager/Settings/5"
      object path "/org/freedesktop/NetworkManager/Settings/6"
      object path "/org/freedesktop/NetworkManager/Settings/7"
      object path "/org/freedesktop/NetworkManager/Settings/8"
      object path "/org/freedesktop/NetworkManager/Settings/9"
      object path "/org/freedesktop/NetworkManager/Settings/10"
      object path "/org/freedesktop/NetworkManager/Settings/11"
      object path "/org/freedesktop/NetworkManager/Settings/12"
      object path "/org/freedesktop/NetworkManager/Settings/13"
   ]
[alex@ThinkPadT14s ~]$ dbus-send --print-reply --system --dest=org.freedesktop.NetworkManager "/org/freedesktop/NetworkManager/Settings/1" org.freedesktop.NetworkManager.Settings.Connection.GetSettings|head
method return time=1599591704.440238 sender=:1.13 -> destination=:1.2560 serial=11636 reply_serial=2
   array [
      dict entry(
         string "connection"
         array [
            dict entry(
               string "id"
               variant                   string "ODILeeds"
            )
            dict entry(
[alex@ThinkPadT14s ~]$ dbus-send --print-reply --system --dest=org.freedesktop.NetworkManager "/org/freedesktop/NetworkManager/Settings/8" org.freedesktop.NetworkManager.Settings.Connection.GetSettings|head
Error org.freedesktop.NetworkManager.Settings.PermissionDenied: uid 1000 has no permission to perform this operation
[alex@ThinkPadT14s ~]$ 

All but one of the settings worked, but as you can see, setting 8 failed with the permission error.

Looking at my "Network Connections" XFCE applet it only shows 12 WiFi networks, not 13.

Can Vorta just ignore WiFi networks that the user doesn't have permission to interrogate?

ioExpander commented 3 years ago

I was getting the same issue today with Manjaro stable running KDE. I would agree with @siu00adg on Vorta not crashing in such cases. For those who are stuck, here is a temp fix :

  1. Use @ktosiek dbus-send commands to identify which network is not accessible by your current user
  2. find this connection uuid using nmcli : sudo nmcli connection
  3. delete the connection : sudo nmcli connection delete <UUID _TO_DELETE>
  4. Launch Vorta again. Voilà :smile:
siu00adg commented 3 years ago

@ioExpander Worked like a charm, thanks.

m3nu commented 3 years ago

Merged #634 and #636 by @ktosiek. Thanks for the quick fixes! There are always some issues to be found when a major feature hits a larger number of users. 😜

If everyone is happy with the current master branch, we should release 0.7.1 fairly quickly. To test:

Please share your experience with this RC3 here. 🙏🙏

samuel-w commented 3 years ago

Seems stable so far.

lennardv2 commented 3 years ago

https://files.qmax.us/vorta/Vorta-0.7.1-RC2.dmg

Thanks these are both working on osx, great!

ghost commented 3 years ago

When can we expect updated flatpak and AUR (Arch/Manjaro) versions released?

m3nu commented 3 years ago

Myself, I do the release on Github, PyPi and Homebrew. Expect those tomorrow morning. Flatpak is done by @Hofer-Julian. AUR was last maintained by @bjo81.

bjo81 commented 3 years ago

Myself, I do the release on Github, PyPi and Homebrew. Expect those tomorrow morning. Flatpak is done by @Hofer-Julian. AUR was last maintained by @bjo81.

Correct, I will update the AUR version as soon as @m3nu releases it on Github.

huntz commented 3 years ago
* Notarized release for macOS: https://files.qmax.us/vorta/Vorta-0.7.1-RC3.dmg

RC3 works well on my end (macOS 10.14.6)

leebut commented 3 years ago

I followed @ktosiek and @ioExpander 's posts and everything is okay now. Manjaro - XFCE

Thank you.

m3nu commented 3 years ago

Thanks for the feedback and testing everyone! 🙏🤝

New release here: https://github.com/borgbase/vorta/releases/tag/v0.7.1

For any missing links to distributions and maintainers, let us know in the docs repo: https://github.com/borgbase/vorta.borgbase.com/issues

bjo81 commented 3 years ago

@Maula-Jatt AUR updated.