stewartadam / fwbackups

A feature-rich, user-friendly backup program [bugfixes only]
http://www.diffingo.com/oss/fwbackups/
GNU General Public License v2.0
86 stars 20 forks source link

Errors: Can't find bus #17

Closed didier33170 closed 1 year ago

didier33170 commented 1 year ago

System Details

Issue description

fwback installed using the flatpack regular installed of Mint. I did successfully a 'One-Time Backup'. Then I configured a backup set for my usual every day backup.

Bug details

Steps to Reproduce:

  1. I configured a backup set for my usual every day backup.
  2. The Log Viewer report an error (see below).

Observed results: No backup recorded.

If the fwbackups log has any relevant information, include a snippet below:

"ERROR : Process exited with status 1. Errors: Can't find bus: Impossible de lancer automatiquement D-Bus sans $DISPLAY X11"

I case it can help, here is the result of $DISPLAY in the terminal: :0 : commande introuvable

stewartadam commented 1 year ago

Hm, interesting - I can't reproduce on Fedora. Let me install Ubuntu tonight and test this week.

didier33170 commented 1 year ago

Hello. Did you succeed to reproduce this error ?

stewartadam commented 1 year ago

Not yet - I couldn't get it to repro on Ubuntu either, so I need to install Mint on another x86_64 machine later to experiment (my laptop is ARM and Mint doesn't provide an image for that).

MidnightJava commented 1 year ago

I'm having the same problem on ubuntu 22.04 (Pop!_Os), which also uses jammy/jellyfish. I think the D-Bus and/or DISPLAY is not being set in the environment in which the backup task is running. I suspect it's a problem with the flatpak installation. I built it from source, but I can't figure out to get a GTK environment installed that it's happy with, so I'm unable to test that approach.

stewartadam commented 1 year ago

A few follow up-questions on this -

  1. When the backup is scheduled to run (and fails), is your user logged in at that time?
  2. If not, I'm assuming the machine is on the graphical login screen (GDM)?
  3. Was your user prior logged in, or it happened after a fresh boot and nobody had logged in yet?
theTrekman commented 1 year ago

Same problem here like didier33170 describes above. Iam also on Linux Mint 21.1 Iam using mint as a server and it happens when my user is logged in as far as I can tell ....

didier33170 commented 1 year ago

To answer your questions:

  1. yes, the user (me only) is logged in.
MidnightJava commented 1 year ago

Same answer for me about user login. I stay logged in always, and the user has existed for years. I launch the GUI as that user, set the schedule, and then closethe GUI or leave it open, and the problem is seen in the log when the scheduled task kicks off.

meanbeanmachine commented 1 year ago

Same issue on PopOS 22.04: Process exited with status 1. Errors: Can't find bus: Cannot autolaunch D-Bus without X11 $DISPLAY

I am logged in, idling doing absolutely nothing, and the automated backup fails. Manually backups work though.

stewartadam commented 1 year ago

I was able to reproduce with PopOS and I think I've narrowed it down. Cron does not launch processes with an environment, so DBUS_SESSION_BUS_ADDRESS is not available.

The solution is to wrap flatpak with dbus-run-session. I'll be releasing rc2 shortly.

stewartadam commented 1 year ago

Pushed 1.43.8-rc2 to flathub which should have a fix for this issue. Thanks for your patience! Looks like my primary Linux OS (Fedora) is not similarly affected, but some Ubuntu variants are.

MidnightJava commented 1 year ago

Thanks for maintaining this and esp for the rc2 fix. It was working for me, and then today for reasons I don't understand it was unable to launch the GUI. No UI would appear, and I found these entries in syslog:

Jul 1 21:25:04 darp com.diffingo.fwbackups.desktop[7614]: Traceback (most recent call last): Jul 1 21:25:04 darp com.diffingo.fwbackups.desktop[7614]: File "/app/lib/python3.10/site-packages/fwbackups/ui/init.py", line 368, in runSetup Jul 1 21:25:04 darp com.diffingo.fwbackups.desktop[7614]: self._checkLogSize() Jul 1 21:25:04 darp com.diffingo.fwbackups.desktop[7614]: File "/app/lib/python3.10/site-packages/fwbackups/ui/init.py", line 430, in checkLogSize Jul 1 21:25:04 darp com.diffingo.fwbackups.desktop[7614]: response = self.displayConfirm(self.ui.splash, ("Would you like to clean up the log file?"), _("The log file is becoming large (%s). Would you like to clear it? This will permanently remove all entries from the log.") % size) Jul 1 21:25:04 darp com.diffingo.fwbackups.desktop[7614]: AttributeError: 'UILoader' object has no attribute 'splash' Jul 1 21:25:04 darp com.diffingo.fwbackups.desktop[7614]: During handling of the above exception, another exception occurred: Jul 1 21:25:04 darp com.diffingo.fwbackups.desktop[7614]: Traceback (most recent call last): Jul 1 21:25:04 darp com.diffingo.fwbackups.desktop[7614]: File "/app/lib/python3.10/site-packages/fwbackups/ui/init.py", line 144, in do_command_line Jul 1 21:25:04 darp com.diffingo.fwbackups.desktop[7614]: self.do_activate() Jul 1 21:25:04 darp com.diffingo.fwbackups.desktop[7614]: File "/app/lib/python3.10/site-packages/fwbackups/ui/init.py", line 209, in do_activate Jul 1 21:25:04 darp com.diffingo.fwbackups.desktop[7614]: self.runSetup() Jul 1 21:25:04 darp com.diffingo.fwbackups.desktop[7614]: File "/app/lib/python3.10/site-packages/fwbackups/ui/init.py", line 371, in runSetup Jul 1 21:25:04 darp com.diffingo.fwbackups.desktop[7614]: self.displayInfo(self.ui.splash, Jul 1 21:25:04 darp com.diffingo.fwbackups.desktop[7614]: AttributeError: 'UILoader' object has no attribute 'splash'

I decided to uninstall and re-install, but then when I ran it I got this error:

File "/usr/share/fwbackups/fwbackups-runapp.pyw", line 41 print _("An error occurred while importing gtk/gobject.") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

I noticed that /usr/share/fwbackups hung around after I uninstalled fwbackups, so I deleted it, thinking it would be re-created on install. BUt it's not, and now I get this error when I try to run fwbackups

python: can't open file '/usr/share/fwbackups/fwbackups-runapp.pyw': [Errno 2] No such file or directory

Any suggestions?

MidnightJava commented 1 year ago

Did a little troubleshooting and discovered the following.

I think this explains why the app all of a sudden broke for me. The log file grew above the warning threshold, and only then does the error manifest.

I assume this is a bug, and not something in my configuration? Also, is it expected behavior that the app would launch successfully via flatpak run... and throw the error about the missing file when running the command fwbackups? I suspect you changed the way the app launches, and the latter is trying to launch it the old way, with files that are no longer used.

stewartadam commented 1 year ago

Thanks for this report! let me move that to a new issue and get a fix for that in for rc3