I use tmux heavily and have some scripts that use notify-send to give me on-screen notifications. I have found a particular case where notify-send will fail and I haven't found a workaround other than starting a new tmux session (which obviously isn't ideal).
If I create a new tmux session and use notify-send, I'll see the notification pop up without issue. But once I detatch from the tmux session and then re-attach to it later on, notify-send will fail with this message:
$ notify-send test (notify-send:26902): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
I haven't found any solution other than moving my work into a fresh, new tmux session, which isn't ideal as that negates the whole point of using tmux in the first place. I'm not sure what's going on. Perhaps there's some sort of IPC path that's getting destroyed between the terminal and tmux that notify-send uses, or something else? Is there anything that I can do to restore the functionality of notify-send without losing my existing tmux session?