node-bluez
node-bluez copied to clipboard
Fresh Debian Install - dbus errors
Just did a new instal on Debian and dbus seems to be throwing errors when using the example start code:
(node:7903) UnhandledPromiseRejectionWarning: Error: No introspectable
at /usr/share/nodejs/test/node_modules/dbus/lib/bus.js:129:15
(node:7903) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:7903) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
This happens during:
bluetooth.init().then(async ()=>{
// listen on first bluetooth adapter
const adapter = await bluetooth.getAdapter('hci0');
await adapter.StartDiscovery();
console.log("Discovering");
});
Is the user a member of the bluetooth
group?
Thanks the user is root, there is no bluetooth group !
I have the same issue. My case seems related to debugging a node process. As I'm running as root
also.
I have the following scripts in my package.json
"start": "node -r ts-node/register ./src/app.ts",
"debug": "node -r ts-node/register --inspect-brk ./src/app.ts",
Using sudo yarn start
works fine
Using sudo yarn debug
results in "No introspectable".
I added the bluetooth
group to the current user, and ran both without sudo
to no avail