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

Uncaught Exception: TypeError: Path must be a string. Received undefined #241

Open
nukeop opened this issue Aug 20, 2018 · 4 comments
Open

Comments

@nukeop
Copy link

nukeop commented Aug 20, 2018

I'm getting an error when doing the bare minimum:

const dbus = require('dbus-native');
var sessionBus = dbus.sessionBus();

I'm using webpack to bundle everything. It runs under Electron.
This is the entire error message:

Uncaught Exception:
TypeError: Path must be a string. Received undefined
    at assertPath (path.js:28:11)
    at dirname (path.js:1364:5)
    at Function.getRoot (webpack:///./node_modules/bindings/bindings.js?:151:13)
    at bindings (webpack:///./node_modules/bindings/bindings.js?:60:32)
    at eval (webpack:///./node_modules/abstract-socket/lib/abstract_socket.js?:4:91)
    at Object../node_modules/abstract-socket/lib/abstract_socket.js (/nuclear/bundle.electron.js:133:1)
    at __webpack_require__ (/nuclear/bundle.electron.js:20:30)
    at createStream (webpack:///./node_modules/dbus-native/index.js?:44:23)
    at createConnection (webpack:///./node_modules/dbus-native/index.js?:76:31)
    at Object.module.exports.createClient (webpack:///./node_modules/dbus-native/index.js?:136:20)

Any ideas?

@sidorares
Copy link
Owner

what's value of DBUS_SESSION_BUS_ADDRESS env variable?

@nukeop
Copy link
Author

nukeop commented Aug 21, 2018

DBUS_SESSION_BUS_ADDRESS="unix:abstract=/tmp/dbus-i1N45HFWWV"

@sidorares
Copy link
Owner

could you add console.log here

return abs.connect('\u0000' + params.abstract);
and see what's actually passed to abs.connect() ?

@acrisci
Copy link

acrisci commented Oct 28, 2018

I tried to reproduce this with https://github.com/electron-userland/electron-webpack-quick-start and it works fine.

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

3 participants