linuxmint / warpinator

Share files across the LAN
GNU General Public License v3.0
1.24k stars 83 forks source link

Warpinator shows dconf error multiple times in normal (Bubblewrap) mode and works fine in Legacy mode. #203

Closed TheBSODAndWSODFan closed 9 months ago

TheBSODAndWSODFan commented 10 months ago

Distribution

Debian 11 (MX Linux 21.3)

Package version

1.8.3 (compiled myself)

Frequency

Always

Bug description

When running warpinator in normal mode (bubblewrap), the app icon shows in taskbar and window is blank, and terminal showing this line multiple times and memory leak

warpinator.py:4361): dconf-WARNING **: 15:05:51.727: failed to commit changes to dconf: Could not connect: No such file or directory

but if running in legacy mode, it launch fine

Steps to reproduce

I open terminal and type warpinator, and showing dconf error Full Log:

lite@Devubox-PC:~$ warpinator --debug > log.txt
2024-01-17 15:05:56,008::warpinator::DEBUG: Migration failed - either migration already happened, or there was nothing to migrate in the first place: g-file-error-quark: No such file or directory (4) -- prefs.py (line 99)
2024-01-17 15:05:56,164::warpinator::DEBUG: Migration failed - either migration already happened, or there was nothing to migrate in the first place: g-file-error-quark: No such file or directory (4) -- prefs.py (line 99)
2024-01-17 15:05:56,285::warpinator: Initializing Warpinator
2024-01-17 15:05:56,286::warpinator::DEBUG: FreeSpaceMonitor new -- util.py (line 456)
2024-01-17 15:05:56,286::warpinator::DEBUG: UI: Creating window and status icon -- warpinator.py (line 1328)
2024-01-17 15:05:56,358::warpinator::DEBUG: Starting network monitor -- networkmonitor.py (line 52)
2024-01-17 15:05:56,358::warpinator::DEBUG: Network state changed: online = True -- networkmonitor.py (line 144)
Landlock support unavailable: [Errno 95] Operation not supported: 'Error calling landlock_create_ruleset: syscall(444, None, 0, 1) = -1'
Note: Landlock has been disabled at boot time. The CONFIG_LSM configuration item should list 'landlock', or, 'lsm=landlock' needs to be added the kernel's command-line arguments (usually via your bootloader).
Using bubblewrap for incoming file isolation. Write access for the application will be limited to the save directory only.

/bin/bwrap 
--ro-bind / / 
--dev /dev 
--bind /run/user/1000/dconf /run/user/1000/dconf 
--bind-try /run/user/1000/gvfsd /run/user/1000/gvfsd 
--tmpfs /tmp 
--bind-try /home/lite/.cache /home/lite/.cache 
--bind-try /home/lite/.config/caja /home/lite/.config/caja 
--bind /home/lite/Downloads/Warpinator /home/lite/Downloads/Warpinator 
--die-with-parent
/bin/python3 /usr/libexec/warpinator/warpinator.py
(warpinator.py:4361): dconf-WARNING **: 15:05:51.727: failed to commit changes to dconf: Could not connect: No such file or directory)
(warpinator.py:4361): dconf-WARNING **: 15:05:51.728: failed to commit changes to dconf: Could not connect: No such file or directory)
(warpinator.py:4361): dconf-WARNING **: 15:05:51.729: failed to commit changes to dconf: Could not connect: No such file or directory)
(warpinator.py:4361): dco^C

Expected behavior

if running in legacy mode, works just fine

Additional information

https://github.com/linuxmint/warpinator/assets/78845241/fdd2b2d7-c906-414e-8824-ef60f54109f3

TheBSODAndWSODFan commented 10 months ago

also, implement fallback mode, if bubblewrap mode doesn't work in older distro, fallback to legacy mode.

mtwebster commented 10 months ago

Those errors/warnings are not something we can detect and workaround. There's something irregular about your installation, this doesn't occur in Debian 11. Are there any folders in your home directory that are not owned by your user:group?

How did you build it? Using dpkg-buildpackage or straight meson/ninja? If the latter, what install prefix did you use when configuring meson?

Fwiw, Debian 12 has Landlock enabled by default, which is superior to (and simpler than) bubblewrap.

TheBSODAndWSODFan commented 10 months ago

Update, installing on my host machine (MX Linux 21.3 Debian 11 with SystemD) works fine using Landlock and Bubblewrap. But, (MX Linux 21.3 Devuan 4 with SysVinit) a.k.a VM that i tested before, doesn't work with bubblewrap and landlock and it seems landlock not available in liquorix kernel. after switching kernel to 6.1 LTS kernel, works fine using landlock.

So. i will close this issue until bubblewrap fallback to legacy.

mtwebster commented 9 months ago

Ok I got mx 21.3 on a virtual machine. This looks like it's happening because MX uses /tmp for their dbus session bus path instead of $XDG_RUNTIME_DIR (/run/user/nnnn). In the bubblewrap script we're setting up a new /tmp so it blocks the host's from being readable.

You can test this by editing /usr/libexec/warpinator/warpinator-launch.py and removing or commenting this line.

I'm not sure yet how I'm going to address it. Maybe just allow access to /tmp.