Open SchrodingersNeko749 opened 1 year ago
4.i think that the bug has something to do with the introspectable xml in org.freedesktop.DBus.Introspectable not pointing to my NotificationServer struct therefore not finding my methods.
Providing introspection data is, as far I understand, completely optional. A DBus service should work perfectly fine also if it does not provide the org.freedesktop.DBus.Introspectable interface.
In your specific case I suspect the problem is simply that the call signature from your dbus-send
invocation is different from the one provided by NotificationServer.Notify
implementation so that the method lookup fails.
In fact this error is generated whenever the method lookup fails: https://github.com/godbus/dbus/blob/76236955d466b078d82dcb16b7cf1dcf40ac25df/export.go#L182-L186
I am trying to make a notification server with godbus. I am following https://specifications.freedesktop.org/notification-spec/notification-spec-latest.html to implement it. I have also used _example/server.go in godbus repo as you might notice in my server code provided below. Here is the server code:
Now the problem is that eventho the introspect xml is accessible to client:
I cant use org.freedesktop.Notifications methods that i wrote in my server code. forexample Notify is Unknown/Invalid and this is repeated for each method:
in qdbusviewer also it says "Unable to find method Notify on path /org/freedesktop/Notifications in interface org.freedesktop.Notifications" note that: 1.dbus is up and its working fine 2.my server is running 3.i tried restarting dbus service and my computer as well 4.i think that the bug has something to do with the introspectable xml in org.freedesktop.DBus.Introspectable not pointing to my NotificationServer struct therefore not finding my methods. Qdbusviewer output looks like this: