chrvadala / node-ble

Bluetooth Low Energy (BLE) library written with pure Node.js (no bindings) - baked by Bluez via DBus
https://www.npmjs.com/package/node-ble
MIT License
320 stars 47 forks source link

Error: interface not found in proxy object: org.bluez.GattService1 #38

Closed lmarschall closed 2 years ago

lmarschall commented 2 years ago

So I'm currently trying to get some characteristic values from a device, but unfortunately I can't fix this error. Using bluetoothctl I can easily extract the characteristic values, but with the package things fail.

const { bluetooth, destroy } = createBluetooth()
const adapter = await bluetooth.defaultAdapter()

const device = await adapter.waitDevice(uuid);

if(! await device.isConnected()) {

  await device.connect();
}

console.log(await device.isConnected());
await device.gatt();
throw new Error(`interface not found in proxy object: ${name}`);
            ^

Error: interface not found in proxy object: org.bluez.GattService1
chrvadala commented 2 years ago

Can you provide your operating system name and version?

lmarschall commented 2 years ago

I'm using Ubuntu 22.04. as OS.

chrvadala commented 2 years ago

Thanks for the feedback. I added this ubuntu version on the CI pipeline, but I don't see any issue https://github.com/chrvadala/node-ble/pull/39. Have you tested it on a fresh Ubuntu 2204 installation?

lmarschall commented 2 years ago

I'll investigate further in the upcoming days and give some additional information.

DhlDeliveryMan commented 1 year ago

I have run into this problem on Ubuntu 22.04 too. Was any resolution found for this issue ?

ErfanBahramali commented 2 months ago

any update ?πŸ‘€ This problem still exists πŸšΆβ€β™‚οΈ

Error:

/home/erfan/Desktop/bluetooth/node_modules/dbus-next/lib/client/proxy-object.js:81
      throw new Error(`interface not found in proxy object: ${name}`);
            ^

Error: interface not found in proxy object: org.bluez.GattService1
    at ProxyObject.getInterface (/home/erfan/Desktop/bluetooth/node_modules/dbus-next/lib/client/proxy-object.js:81:13)
    at BusHelper._prepare (/home/erfan/Desktop/bluetooth/node_modules/node-ble/src/BusHelper.js:32:42)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async BusHelper.prop (/home/erfan/Desktop/bluetooth/node_modules/node-ble/src/BusHelper.js:62:5)
    at async GattServer.init (/home/erfan/Desktop/bluetooth/node_modules/node-ble/src/GattServer.js:31:20)
    at async Device.gatt (/home/erfan/Desktop/bluetooth/node_modules/node-ble/src/Device.js:156:5)
    at async /home/erfan/Desktop/bluetooth/main.js:31:24

Node.js v20.9.0
chrvadala commented 2 months ago

Do you have a way to reproduce it? A test case would be great

ErfanBahramali commented 2 months ago

Do you have a way to reproduce it? A test case would be great

test it on ubuntu 24.04