Skip to content

Failed to encode dictionary when trying to show notification #239

Description

@daffamumtaz2361

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);
    }
);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions