Uncaught Exception: TypeError: Path must be a string. Received undefined
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?
what's value of DBUS_SESSION_BUS_ADDRESS env variable?
DBUS_SESSION_BUS_ADDRESS="unix:abstract=/tmp/dbus-i1N45HFWWV"
could you add console.log here https://github.com/sidorares/dbus-native/blob/35318c23bde92cc2cd877ade89a9bbf1a958217f/index.js#L45 and see what's actually passed to abs.connect() ?
I tried to reproduce this with https://github.com/electron-userland/electron-webpack-quick-start and it works fine.