Closed goranmoomin closed 4 years ago
Same here.
I need to look at the updated doc for NotificationCenter. Thanks for the offer I’ll ask you if I need testing as I don’t install beta-OSes on my machine.
UI seems to be different, too… found this on the web.
@JayBrown Yes, it is. The UI is rewritten in SwiftUI, and I’m guessing that the notification subsystem itself also got rewritten?
It's just that the Notification Center bundle identifier has changed (to "com.apple.notificationcenterui2" :) ). Let me see if I can get a clean PR with a reasonable conditional. It works in BigSur if I just change that value but obviously that's not ok on its own. You do still need to allow terminal-notifier to make notifications of course but that's easy clicking and you're prompted to do so.
There may be a further Big Sur issue with running this via symlink -- if I don't run this directly from the built binary, it hangs :(
That's a problem with many apps, whose executables have command-line support on paper. The best thing would be to export the bundle's executable directory in $PATH
.
export PATH=$PATH:/Applications/terminal-notifier.app/Contents/MacOS
In shell scripts I always use mdfind
to search for the terminal-notifier Bundle ID, giving me variable $tn_loc
, and then execute terminal-notifier as "$tn_loc"/Contents/MacOS/terminal-notifier
. If there's no terminal-notifier on the system, I revert to osascript
for notifications.
EDIT: but a developer can make it happen… for example ProcessMonitor by @objective-see runs fine when symlinked.
Note that in Big Sur Beta 3 the Notification Center bundle identifier has changed back to "com.apple.notificationcenterui", so functionally should be restored to everyone.
I'm guessing this can be closed.
Hmm I'm on macOS 12.5 and this happens again.
Error
2022-07-28 11:36:23.394 terminal-notifier[77241:604046] [!] Unable to post a notification for the current user (jin), as it has no running NotificationCenter instance.
Info:
$ defaults domains | grep notification
com.apple.notificationcenterui
$ defaults read com.apple.notificationcenterui
{
"last-analytics-stamp" = "680547569.399271";
widgets = {
vers = 1;
widgets = (
{length = 4018, bytes = 0x62706c69 73743030 d6010203 04050607 ... 00000000 00000f78 },
{length = 9808, bytes = 0x62706c69 73743030 d6010203 04050607 ... 00000000 00002616 },
{length = 920, bytes = 0x62706c69 73743030 d5010203 04050607 ... 00000000 00000362 },
{length = 16416, bytes = 0x62706c69 73743030 d6010203 04050607 ... 00000000 00003fe6 },
{length = 16409, bytes = 0x62706c69 73743030 d6010203 04050607 ... 00000000 00003fdf },
{length = 9129, bytes = 0x62706c69 73743030 d6010203 04050607 ... 00000000 0000236f },
{length = 9842, bytes = 0x62706c69 73743030 d6010203 04050607 ... 00000000 00002638 },
{length = 918, bytes = 0x62706c69 73743030 d5010203 04050607 ... 00000000 00000360 },
{length = 9825, bytes = 0x62706c69 73743030 d6010203 04050607 ... 00000000 00002627 },
{length = 83230, bytes = 0x62706c69 73743030 d6010203 04050607 ... 00000000 000144ca },
{length = 7780, bytes = 0x62706c69 73743030 d6010203 04050607 ... 00000000 00001e2a },
{length = 4581, bytes = 0x62706c69 73743030 d6010203 04050607 ... 00000000 000011ab },
{length = 990, bytes = 0x62706c69 73743030 d5010203 04050607 ... 00000000 000003a8 },
{length = 12276, bytes = 0x62706c69 73743030 d6010203 04050607 ... 00000000 00002fba },
{length = 960, bytes = 0x62706c69 73743030 d5010203 04050607 ... 00000000 0000038a },
{length = 8304, bytes = 0x62706c69 73743030 d6010203 04050607 ... 00000000 00002036 },
{length = 8611, bytes = 0x62706c69 73743030 d6010203 04050607 ... 00000000 00002169 },
{length = 8275, bytes = 0x62706c69 73743030 d6010203 04050607 ... 00000000 00002019 },
{length = 9594, bytes = 0x62706c69 73743030 d6010203 04050607 ... 00000000 00002540 }
);
};
}
Please check everything that applies to your issue:
To help us debug your issue please include:
Execute
terminal-notifier
in shell, and see it error.I'm more than happy to help debugging this issue as I have macOS Big Sur installed on my main machine.