I’m trying to get started with GNOME extension development. I have the following DBus interface definition:
const DBUS_IFACE = `
<node>
<interface name="io.github.pieterdd.StretchBreak">
<method name="GetIdleInfo">
<arg type="s" direction="out" />
</method>
</interface>
</node>`;
Here’s the proxy:
const Proxy = Gio.DBusProxy.makeProxyWrapper(DBUS_IFACE);
const proxy = Proxy(
Gio.DBus.session,
'io.github.pieterdd.StretchBreak',
'/io/github/pieterdd/StretchBreak',
);
What I don’t quite understand is that no methods are detected. console.log('methods', proxy.get_interface_info().methods)
produces the following output:
GNOME Shell-Message: 11:12:45.116: methods Array [
{}
]
Here’s what the DBus call I’m trying to do programmatically looks like on the command line:
$ dbus-send --print-reply --dest=io.github.pieterdd.StretchBreak /io/github/pieterdd/StretchBreak io.github.pieterdd.StretchBreak.GetIdleInfo
method return time=1746263834.143574 sender=:1.4671 -> destination=:1.4708 serial=12 reply_serial=2
string "{"idle_since_seconds":0,"last_checked":"2025-05-03T09:17:13.977912405Z","last_mode_state":{"state":"Normal","muted_until":null,"progress_towards_break":[7,535264056],"progress_towards_reset":[0,0],"idle_state":{"state":"Active","active_since":"2025-05-03T09:17:06.442648349Z"}}}"
What might I be doing wrong?