julienXX / terminal-notifier

Send User Notifications on macOS from the command-line.
Other
6.38k stars 330 forks source link

Notification Center shows only the latest terminal-notifier message after update to High Sierra #242

Closed saltarob closed 5 years ago

saltarob commented 6 years ago

Hi,

I used terminal-notifier on macOS Sierra successfully. I could always find all the notification in the notification centre.

But after updating to High Sierra and updating terminal-notifier from 1.8.0 to 2.0.0 only the latest notification stays in the notification centre all previous notification are gone.

I use terminal-notifier in a simple shell script with Automator: terminal-notifier -message 'Upload 600 $filename'

terminal-notifier is installed via homebrew.

What changed the behaviour in High Sierra or terminal-notifier 2.0.0? Do I have to change the script or some settings in High Sierra? Can't find any answer for this. Thank you so much.

julienXX commented 6 years ago

Hi @AbdulHadiParsdorfer do you still encounter this issue?

saltarob commented 6 years ago

Yes, you are the first one who is answering. Thank you.

On 3 Aug 2018, at 11:13 AM, Julien Blanchard notifications@github.com wrote:

Hi @AbdulHadiParsdorfer https://github.com/AbdulHadiParsdorfer do you still encounter this issue?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/julienXX/terminal-notifier/issues/242#issuecomment-410180004, or mute the thread https://github.com/notifications/unsubscribe-auth/AHGWsK4iltUgTHUDiNsghZs0gAawLTv-ks5uNAYQgaJpZM4SBck-.

julienXX commented 6 years ago

Sorry it took me so long to get back to you. Could you try the solution described here https://github.com/julienXX/terminal-notifier/issues/222#issuecomment-320980802 and let me know if that changes anything for you?

saltarob commented 6 years ago

Thank you, I will try it next week. Busy these days ;-)

On 3 Aug 2018, at 12:30 PM, Julien Blanchard notifications@github.com wrote:

Sorry it took me so long to get back to you. Could you try the solution described here #222 (comment) https://github.com/julienXX/terminal-notifier/issues/222#issuecomment-320980802 and let me know if that changes anything for you?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/julienXX/terminal-notifier/issues/242#issuecomment-410199527, or mute the thread https://github.com/notifications/unsubscribe-auth/AHGWsM-os7zSXsw8LIzl4grvT_-w400Zks5uNBgqgaJpZM4SBck-.

petr-ujezdsky commented 6 years ago

I am affected too. I notify user on application startup and on app errors. Unfortunately the "startup" notification get overwritten by the subsequent "error" one. The Notification center shows only the most recent one.

Now I want to launch 2 apps at once with same functionality and the problem is much worse then. The startup notification (spawned roughly at the same time) is shown only for the latter.

I have found the -group option but that does not work as expected (changes nothing).

I expect this command to spam new and new notifications that would stack up on top right corner and will fill the Notification center. But only one banner is shown (overwritten by subsequent notification) and only the latest notification is beeing shown at notification center:

$ while true; do terminal-notifier -title Test -message "$(date)" -group "$RANDOM"; sleep 1; done

Info: MacOS High Sierra (10.13.6 (17G65))

$ terminal-notifier -version
terminal-notifier 2.0.0.
petr-ujezdsky commented 6 years ago

Tried #222 (comment) and nothing changed. Still having the issue.

petr-ujezdsky commented 5 years ago

Update to Mojave solved the issue.

Versions used:

$ terminal-notifier -version
terminal-notifier 2.0.0.

$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.14
BuildVersion:   18A391

This floods the notification center with notifications (expected)

$ while true; do terminal-notifier -title Test -message "$(date)" -group "$RANDOM"; sleep 1; done

This does not flood the notification center, only updates the last notification (expected "group" behavior)

$ while true; do terminal-notifier -title Test -message "$(date)" -group "ANYTHING_HERE"; sleep 1; done
* Removing previously sent notification, which was sent on: 2018-10-30 12:24:45 +0000
* Removing previously sent notification, which was sent on: 2018-10-30 12:24:46 +0000
* Removing previously sent notification, which was sent on: 2018-10-30 12:24:47 +0000

This issue can be closed IMHO.

julienXX commented 5 years ago

Ok thanks for the report. I’ll close the issue for now.

passaca commented 5 years ago

Hi,

unfortunately I have a problem with this:

This floods the notification center with notifications (expected)

$ while true; do terminal-notifier -title Test -message "$(date)" -group "$RANDOM"; sleep 1; done

It does fill the notification history in the Notification Center with notifications, yes, but on screen (with NC closed), there is always only the most recent notification. It get's immediately replaced by the newer one.

I would like to be able to have several simultaneous notifications on screen. Different group id's definitely do not do the trick for me.

I'm on 2.0.0 and Mac OS 10.14.4

Am I doing anything wrong?

petr-ujezdsky commented 5 years ago

Mmm, @passaca same here, the notification is beeing overwritten even though it has different -group. I do not remember if this was happening too, but I think not. I would leave it as bug otherwise..

$ terminal-notifier -version
terminal-notifier 2.0.0.
$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.14.4
BuildVersion:   18E226

Maybe this needs reopen @julienXX?