julienXX / terminal-notifier

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

-open: Click terminal-notification then brings another notification #288

Open charlottehu111 opened 2 years ago

charlottehu111 commented 2 years ago

Please check everything that applies to your issue:

To help us debug your issue please include:

  1. open 'terminal' in macos
  2. enter "terminal-notifier -message 'hello'"
  3. It will show: 14B303D3-A3AC-42F2-8CF3-E050D13079D8
  4. If you click the notification box, it will bring another same notification box again! F6BC5C8E-7604-4CA5-A6B7-4628C347F67F
  5. If you click any of the box, you will get more boxes. This will result in that '-open' can't be used, because when you click the box, it will bring the box, not open url in browser.

Hope someone help me with this issue...

Common issues and solution:

Thanks!

nano9g commented 2 years ago

I'm seeing this too, and it appears to have started after the Big Sur 11.6 update. I know it was working correctly before that.

garyrob commented 2 years ago

I am seeing it too, and like charlottehu111, it only started with Big Sur 11.6.

johnlee999 commented 2 years ago

I'm having the same issue too, and it was right after I installed Big Sur 11.6.

synconclick commented 2 years ago

I am also having the same issue and I am on Big Sur 11.6. Please fix this soon!

nicolasff commented 2 years ago

I'd like to note that in addition to -open no longer working, -execute is also broken now. So you can't replace -open https://google.com' with -execute '/usr/bin/open https://google.com', for example.

I haven't tried the fix linked above since it's not merged yet, but for anyone hitting this you might want to try replacing terminal-notifier with alerter, linked in the first post on this page (direct GitHub link). That's what I did in my scripts and I have restored the features that were broken by this bug.

alerter works slightly differently, but can be used to do the same thing. For example if you had:

terminal-notifier -title 'my title' -message 'my message' -open 'https://google.com'

Then you can replace it with:

outcome=$(alerter -title 'my title' -message 'my message')
if [[ $outcome == '@CONTENTCLICKED' ]]; then
    open 'https://google.com'
fi
warmup72 commented 2 years ago

Hi, is there a posibility/plan to fix this issue?

garyrob commented 2 years ago

Maybe this project should be forked? If I depended on it more, I'd consider doing so myself. But I switched to Alerter when this problem started.

julienXX commented 2 years ago

Sorry I don't own a Mac at the moment (mine died and not sure I'll have the funds for a new one soon). I guess Apple changed their APIs I'll need to look into this but time is an issue for me these days.

dejuknow commented 2 years ago

johnlee999's pull request above fixed the issue for me.

https://github.com/julienXX/terminal-notifier/pull/289

warmup72 commented 2 years ago

Thx for your replys! Didn´t know how to use such a pull request

mpolden commented 2 years ago

Clicking the notification works again for me after upgrading to macOS Monterey.

vszakats commented 2 years ago

It also works correctly again with Big Sur 11.6.1.