dbusjs / node-dbus-next

🚌 The next great dbus library for node
https://www.npmjs.com/package/dbus-next
156 stars 52 forks source link

Trouble with initializing on Trisquel #49

Open nukeop opened 4 years ago

nukeop commented 4 years ago

This is a screenshot from a Trisquel VM, I noticed that something fails on this platform when initializing dbus-next. Dbus is installed as a service and running.

ArchLabs-24-815x256

I'm trying to debug this myself. We're using mpris-service to access dbus.

If you need to see how we're using it, the relevant code is here: https://github.com/nukeop/nuclear/blob/b1e972b0827c512d0feba29cd1cdd8700869285b/packages/main/src/services/%40linux/system-api.ts

acrisci commented 4 years ago

Using node v13.8.0, my test suites pass for both mpris-service and node-dbus-next on a Trisquel 8 vm. I think this is a webpack issue.

The issue is the bindings for abstract-socket which are admittedly hard to bundle, but necessary for connecting to DBus on most Linux systems. I wish I could get rid of it, but Node doesn't support a null byte at the beginning of strings which is required to connect to an abstract socket. At one point I was looking into if it was possible to do this with WASM.

I can try to look into it a bit further.

nukeop commented 4 years ago

As a workaround, I think we will temporarily ship a version without mpris support until we debug this properly. I wonder what is done differently on Trisquel as opposed to other distros that makes this fail.

nukeop commented 3 years ago

This comes up on Gentoo as well: https://github.com/nukeop/nuclear/issues/746