Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No introspectable error in 0.2.22 #159

Open
craigmulligan opened this issue Feb 10, 2017 · 12 comments
Open

No introspectable error in 0.2.22 #159

craigmulligan opened this issue Feb 10, 2017 · 12 comments

Comments

@craigmulligan
Copy link

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.

@Shouqun
Copy link
Owner

Shouqun commented Feb 13, 2017

not sure whether it's related to #150 could you post sample code here? thanks!

@bryanburgers
Copy link
Contributor

Alternately, could it be an issue because of the API changes that I introduced?

@craigmulligan
Copy link
Author

Hmm, yes we are using the Dbus constructor, which I see is now deprecated. When was that introduced?

@Shouqun
Copy link
Owner

Shouqun commented Feb 13, 2017

The DBus constructor still works in v0.2.22, should be other change related.

@bryanburgers
Copy link
Contributor

bryanburgers commented Feb 13, 2017

From 0.2.19 -> 0.2.22, the major API that changed, that is probably relevant to you, is f6d7370

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?

@craigmulligan
Copy link
Author

Ah sorry I didn't see you'd bumped to v1 👍 Cool, we'll do some more digging and get back to you guys.

@Shouqun
Copy link
Owner

Shouqun commented Feb 13, 2017

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 f6d7370 and related code).

and for API 1.x, I'll publish 1.0.0 later. @bryanburgers

@bryanburgers
Copy link
Contributor

@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.

@msolters
Copy link

msolters commented Jun 30, 2017

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?

@blackxMan
Copy link

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);

});`

@LukasBombach
Copy link

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

#183 (comment)

@vanthome
Copy link

Is there an intend to fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants