sidorares / node-pidgin

Pidgin node.js client using pidgin dbus api
7 stars 2 forks source link

unknown bus address error when starting the program. #2

Open vijaybritto opened 9 years ago

vijaybritto commented 9 years ago

Hi this is what I get when I type in node REPL,

var pidgin = require('pidgin').createClient();
Error: unknown bus address
    at createStream (/root/node_modules/pidgin/node_modules/dbus-native/index.js:24:26)
    at Module.module.exports (/root/node_modules/pidgin/node_modules/dbus-native/index.js:54:32)
    at Function.module.exports.createClient (/root/node_modules/pidgin/node_modules/dbus-native/index.js:112:23)
    at Function.module.exports.sessionBus (/root/node_modules/pidgin/node_modules/dbus-native/index.js:121:27)
    at Object.module.exports.createClient (/root/node_modules/pidgin/index.js:23:34)
    at repl:1:32
    at REPLServer.self.eval (repl.js:110:21)
    at repl.js:249:20
    at REPLServer.self.eval (repl.js:122:7)
    at Interface.<anonymous> (repl.js:239:12)

Does this mean that I have something else to install as a dependency or something?

sidorares commented 9 years ago

how do you launch it? session bus address is in DBUS_SESSION_BUS_ADDRESS, check that you have it in your system: screen shot 2015-06-05 at 10 57 51 pm

vijaybritto commented 9 years ago

Its not there! But I just did some googling and started the dbus-launch command. And the response was

DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-PHGuFCHAqA,guid=8b6e916d0b5b896d2a07415255719f3f
DBUS_SESSION_BUS_PID=234

But still it doesnt work even after running this command The same unknown bus address error comes up

sidorares commented 9 years ago

do you have same error even if DBUS_SESSION_BUS_ADDRESS is set?

vijaybritto commented 9 years ago

yeah

Should I copy that DBUS_SESSION_BUS_ADDRESS and set in the system path manually?

vijaybritto commented 9 years ago

Its working now. But I get an other error like

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: write EPIPE
    at errnoException (net.js:905:11)
    at Object.afterWrite (net.js:721:19)
twolfson commented 8 years ago

For the reference of others (e.g. people who might be running into the same issue in Travis CI), the man doc recommends using dbus-launch and eval:

http://linux.die.net/man/1/dbus-launch

eval "$(dbus-launch --sh-syntax)"