No introspectable error in 0.2.22
node v: 6 v: 0.2.22
10.02.17 14:31:09 [-0300] { Error: No introspectable
10.02.17 14:31:09 [-0300] at /ap/node_modules/dbus/lib/bus.js:127:15
10.02.17 14:31:09 [-0300] cause:
10.02.17 14:31:09 [-0300] Error: No introspectable
10.02.17 14:31:09 [-0300] at /ap/node_modules/dbus/lib/bus.js:127:15,
Reverted to 0.2.19 and it works.
not sure whether it's related to https://github.com/Shouqun/node-dbus/pull/150 could you post sample code here? thanks!
Alternately, could it be an issue because of the API changes that I introduced?
Hmm, yes we are using the Dbus constructor, which I see is now deprecated. When was that introduced?
The DBus constructor still works in v0.2.22, should be other change related.
From 0.2.19 -> 0.2.22, the major API that changed, that is probably relevant to you, is https://github.com/Shouqun/node-dbus/commit/f6d737049a8fb1f991863533bb3ad98f9f6d0b13
But that doesn't explain why you're getting a "Not Introspectable" error.
The DBus constructor was deprecated in 1.0.0. You can see all of those changes at Migrating. But like Shouqun said, that didn't land until 1.0.0, so is probably not your issue.
Can you narrow it down by trying your code with 0.2.21?
Ah sorry I didn't see you'd bumped to v1 👍 Cool, we'll do some more digging and get back to you guys.
For API compatibility, I just published 0.2.23 from branch https://github.com/Shouqun/node-dbus/tree/0.2.23 which is API compatible with 0.2.19 (without change https://github.com/Shouqun/node-dbus/commit/f6d737049a8fb1f991863533bb3ad98f9f6d0b13 and related code).
and for API 1.x, I'll publish 1.0.0 later. @bryanburgers
@craig-mulligan I can't write CoffeeScript, nor do I have net.connman nor org.freedesktop.NetworkManager services on my virtual machine. So I can't test this against 1.0.0 (once it is released).
However, I tried to rewrite your dbus-promise using the new API, and it seems to work fine against org.freedesktop.DBus without throwing a "No introspectable" error.
Just playing around at this point to see what I can figure out.
Edit: This was trivial. The fi.w1.wpa_supplicant1 service MUST be accessed with root permissions, meaning that node binary must have root permissions. Re-running this code with sudo node wpa_test.js removes the error and returns the expected functionality.
I am also running Node v6.x.x, with node-dbus v1.0.0 and getting the Error: No introspectable error whenever I try to connect to any system interface. Example code:
var DBus = require('../');
var bus = DBus.getBus('system');
bus.getInterface('fi.w1.wpa_supplicant1', '/fi/w1/wpa_supplicant1', 'fi.w1.wpa_supplicant1.Interface', function(err, iface) {
if( err ) {
console.error( err )
}
});
Any ideas?
Hi i have the same error, how can i fix that. here is service code `DBus = require('dbus');
process.env.DISPLAY = ':0';
process.env.DBUS_SESSION_BUS_ADDRESS = 'unix:path=/run/dbus/system_bus_socket';
var dbus = DBus.getBus('system');
// Create a new service, object and interface
var service = DBus.registerService('system', 'nodejs.dbus.PMTABounceManager');
var obj = service.createObject('/nodejs/dbus/PMTABounceManager');
var iface = obj.createInterface('nodejs.dbus.PMTABounceManager.PusherInterface');
iface.addMethod('Hello', { out: DBus.Define(String) }, function(callback) {
callback(null, 'Hello There!');
});
iface.addSignal('message_state_available', {
types: [
DBus.Define(String)
]
});
iface.update();
iface.on('message_state_available', function(messageState) {
console.log('message state : '+messageState);
});
`
and this is the client code `dbus.getInterface('nodejs.dbus.PMTABounceManager', '/nodejs/dbus/PMTABounceManager', 'nodejs.dbus.PMTABounceManager.PusherInterface', function(err, iface) { console.log(err); iface.emit('message_state_available',line);
});`
Hey guys, I found the cause of this. You can only load the system bus once
const bus1 = DBus.getBus("system");
const bus2 = DBus.getBus("system");
bus1.getInterface(); // will work
bus2.getInterface(); // will throw that error
posted this answer here too
https://github.com/Shouqun/node-dbus/issues/183#issuecomment-548242283
Is there an intend to fix this?