rootkiwi / an2linuxserver

Sync Android notifications encrypted to a Linux desktop
Other
401 stars 43 forks source link

Pybluez-0.23 breaks bluetooth support #67

Open cyberpunkrocker-zero opened 3 years ago

cyberpunkrocker-zero commented 3 years ago

I hadn't used an2linuxserver for some time, so I noticed just recently that it had stopped working with bluetooth connection on Arch Linux. After some investigation I found out that the culprit was the recent python-pybluez-0.23-1 update. I get this error when trying to start it with pybluez-0.23:

(an2linuxserver.py:826)
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/bluetooth/bluez.py", line 271, in advertise_service
    _bt.sdp_advertise_service (sock._sock, name, service_id, \
_bluetooth.error: no advertisable device

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/an2linuxserver.py", line 874, in <module>
    bluetooth_server = ThreadingBluetoothServer()
  File "/usr/bin/an2linuxserver.py", line 284, in __init__
    advertise_service(self.bluetooth_server_sock, "AN2Linux_bluetooth_server",
  File "/usr/lib/python3.9/site-packages/bluetooth/bluez.py", line 275, in advertise_service
    raise BluetoothError (*e.args)
bluetooth.btcommon.BluetoothError: no advertisable device

Downgrading python-pybluez to version 0.22-6 allow an2linuxserver to work again.

cyberpunkrocker-zero commented 2 years ago

I still get the same error on Arch Linux when trying to use python-pybluez-0.23, with freshly-built-from-git an2linuxserver. I understood that you too are using Arch Linux. How did you manage to make it work? Or are you masking 0.23 and using 0.22 like me?