Bug 464929 - "Process org.bluez.obex exited with status 1" Obex exits whenever attempting to send a file, bonking file transfer
Summary: "Process org.bluez.obex exited with status 1" Obex exits whenever attempting ...
Status: RESOLVED FIXED
Alias: None
Product: Bluedevil
Classification: Plasma
Component: general (show other bugs)
Version: 5.27.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: David Rosca
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-28 05:03 UTC by hurricanepootis
Modified: 2023-10-28 21:02 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hurricanepootis 2023-01-28 05:03:18 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

Whenever I have my phone connected to bluetooth and I attempt to send a file, I get the following error: `The connection to <Bluetooth device> has failed: ObexManager not operational!`

So, I then proceeded to open dolphin from a terminal and see what console error I get, and I get the following: 
```
kf.bluezqt: PendingCall Error: "Process org.bluez.obex exited with status 1"
org.kde.plasma.bluedevil.sendfile: Error creating session "ObexManager not operational!"```

I have bluetooth.service enabled, and I have obex.service (which has a soft link to org.bluez.obex) enable for my user.

STEPS TO REPRODUCE
1.  Have a bluetooth enabled system
2.  # systemctl enable bluetooth
3.  $ systemctl --user enable obex
4. Connect phone to computer using Bluedevil 
5. Open up dolphin, and go to networks, bluetooth, and phone, and send file
6. Send file

OBSERVED RESULT
kf.bluezqt: PendingCall Error: "Process org.bluez.obex exited with status 1"

EXPECTED RESULT
For the file to be sent

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  Linux 6.1.7
(available in About System)
KDE Plasma Version:  5.26.5
KDE Frameworks Version:  5.102.0
Qt Version:  5.18.8+kde+r177

ADDITIONAL INFORMATION
I have been able to use obex before with bluedevil in the past using this setup in the previous year, but now it just doesn't work anymore. I even tried it on another device with my laptop. 

Also, sending a file from my phone to my pc doesn't work either
Comment 1 Nicolas Fella 2023-01-28 11:43:20 UTC
I remember debugging this, and it seems to be some kind of weird interaction between bluez, obex, systemd, and dbus. Not really something related to/caused by Plasma.

See also https://bugs.archlinux.org/task/37773. I'm not sure why it manifests sometimes and works fine other times
Comment 2 hurricanepootis 2023-01-28 16:44:50 UTC
I have already seen the archlinux bug you have sent me, and is for a different problem. That bug reporting is describing that previously, on Arch Linux, whenever bluez would go to start obex, it would look for org.bluez.obex.service (which was just a template service unit), and not the actual service unit, obex.service. So, they sysmlineked dbus-org.bluez.obex.service to point towards obex.service, and that solved the issue for them.

My problem doesn't seem to be the fact that bluez can't find the service for obex and start, it seems to be whenever it spawns obex through bluez-qt, obex crashes.
Comment 3 hurricanepootis 2023-02-28 22:54:14 UTC
Hey, I don't know if you're still keeping up with this, but with KDE 5.27.2, and bluez 5.66 on Arch, the bug error has updated. Now, whenver dolphin or anything else goes to start obex, I get this error: 'Failed to start org.bluez.obex service: Process org.bluez.obex exite`

In the Arch's PKGBUILD, /usr/lib/systemd/user/dbus-org.bluez.obex.service is systemlinked to /usr/lib/systemd/user/obex.service, and org.bluez.obex.service lives at /usr/share/dbus-1/services/org.bluez.org.service

So, like, is this even a KDE issue at this point, or an Arch issue?
Comment 4 hurricanepootis 2023-03-01 00:04:45 UTC
I made an Arch Issue, and a breakthrough: https://bugs.archlinux.org/task/77681

Bluez's dbus service uses the systemd service to start obex, and it doesn't work. I discovered that changing Blue'z dbus service to call obex directly solves all my woes, and I have submitted an Arch bug report. I don't know how to work with git-email since I'm a bit on the younger side, so I don't know if bluez upstream will see this. 

I hope you find my findings useful!
Comment 5 hurricanepootis 2023-10-28 21:02:21 UTC
Fixed itself after nuking and reinstalling KDE