node-dbus icon indicating copy to clipboard operation
node-dbus copied to clipboard

Failed to encode dictionary when trying to show notification

Open daffamumtaz2361 opened this issue 3 years ago • 0 comments

I'm trying to show notification using dbus following the spec, but it's not working and I got Failed to encode dictionary in the console

const bus = DBus.getBus('session');
bus.getInterface(
    'org.freedesktop.Notifications',
    '/org/freedesktop/Notifications',
    'org.freedesktop.Notifications',
    (err, iface) => {
        if(err) {
            console.log('Error when initializing D-Bus interface', err);
            return;
        }

        iface.Notify('APP', 0, '', 'Title', 'Body', '[]', '{"urgency": 1}', 5000);
    }
);

daffamumtaz2361 avatar Apr 19 '22 08:04 daffamumtaz2361