Closed mallej closed 3 years ago
I can confirm that on both Intel and M1 hardware, in macOS 11.6, neither the --messageaction
nor --messagebuttonaction
are working. Also can confirm they work fine in macOS 11.5.2 (intel) and 11.5.1 (m1). Almost certainly is a problem/change in 11.6
I can confirm this is an issue on M1, macOS Big Sur (20G165)
Confirmed on Intel macOS 11.6
So.. indeed there has been a change.. we're supposed to post a notification.. the apps don't need to be running.. then when the notification is clicked.. the app is notified..
If we amend notifier not to quit, then things work.. but this causes other issues..
$ /Users/ben/Library/Developer/Xcode/DerivedData/Notifier-fyrvpxvalveblfealonfwgaitjtj/Build/Products/Debug/Notifier\ -\ Notifications.app/Contents/MacOS/Notifier\ -\ Notifications --message "TEST" --messageaction "/Applications/Safari.app/" --verbose
2021-09-28 22:44:12.984 Notifier - Notifications[25407:783487] Notifier Log: banner - verbose enabled
2021-09-28 22:44:12.985 Notifier - Notifications[25407:783487] Notifier Log: banner - running on 10.15+
2021-09-28 22:44:12.985 Notifier - Notifications[25407:783487] Notifier Log: banner - ncMessage
2021-09-28 22:44:12.985 Notifier - Notifications[25407:783487] Notifier Log: banner - notificationString - TEST
2021-09-28 22:44:12.985 Notifier - Notifications[25407:783487] Notifier Log: banner - ncMessageAction
2021-09-28 22:44:12.985 Notifier - Notifications[25407:783487] Notifier Log: banner - notificationString - TESTOptional("/Applications/Safari.app/")
2021-09-28 22:44:12.985 Notifier - Notifications[25407:783487] Notifier Log: banner - ncContentbase64 - VEVTVE9wdGlvbmFsKCIvQXBwbGljYXRpb25zL1NhZmFyaS5hcHAvIik=
2021-09-28 22:44:12.985 Notifier - Notifications[25407:783487] Notifier Log: banner - notification request
2021-09-28 22:44:13.986 Notifier - Notifications[25407:783487] Notifier Log: banner - notification delivered
2021-09-28 22:44:16.040 Notifier - Notifications[25407:783487] Notifier Log: banner - message - interacted
2021-09-28 22:44:16.040 Notifier - Notifications[25407:783487] Notifier Log: banner - message - clicked
2021-09-28 22:44:16.040 Notifier - Notifications[25407:783487] Notifier Log: banner - message - userInfo [AnyHashable("messageAction"): /Applications/Safari.app/, AnyHashable("verboseMode"): enabled]
2021-09-28 22:44:16.041 Notifier - Notifications[25407:783487] Notifier Log: banner - message - Optional(/Applications/Safari.app/)
2021-09-28 22:44:16.041 Notifier - Notifications[25407:783487] Notifier Log: banner - opening Optional(["/Applications/Safari.app/"])
2021-09-28 22:44:16.042 Notifier - Notifications[25407:783487] Notifier Log: banner - opened Optional(["/Applications/Safari.app/"])
2021-09-28 22:44:16.042 Notifier - Notifications[25407:783487] Notifier Log: banner - message - removing notification
2021-09-28 22:44:17.042 Notifier - Notifications[25407:783487] Notifier Log: banner - message - removing notification - done
As a note, this issue does not occur on macOS Monterey beta 7 nor beta 8. I did not test earlier beta versions.
The issue appears limited only to macOS 11.6.
Yesterday Apple released developer beta version of macOS 11.6.1. Decided to give it a go today and it seems Notifier is working as intended - I was able to launch an application directly from the notification using the following command:
/Applications/Utilities/Notifier.app/Contents/MacOS/Notifier --type alert --message "TEST" --messagebutton "Open Firefox" --messagebuttonaction "/Applications/Firefox.app/"
Awesome, thanks @niloque.
🤞 this stays fixed in 11.6.1's release.
This was working in 11.6.1 RC1 build 20G211 but is now broken again in RC2 build 20G214.
@haircut Negative. I have 20G214 on a VM and just run the above command with success - the button on the Notifier's notification opened Firefox.
Also tried --messageaction "/Applications/Firefox.app/"
and it worked as well.
@niloque Apologies, I was insufficiently clear.
On 20G214 I'm seeing the --messageaction
flag work correctly, but --message
still returns what I believe is placeholder text of "Notification."
The exact command of this original issue, /Applications/Utilities/Notifier.app/Contents/MacOS/Notifier --type alert --message "TEST" --messageaction "/Applications/Safari.app/"
, results in a notification where the "TEST" message is absent but the action works to open Safari.
Can you confirm whether or not you are also seeing --message
text fail to display?
This is the command I ran: /Applications/Utilities/Notifier.app/Contents/MacOS/Notifier --type alert --message "Test message here" --messageaction "/Applications/Firefox.app"
Previously I also put in "TEST" to the --message
flag and it was displayed correctly.
I reinstalled 11.6.1 RC2 from recovery and it fixed the problem. This is working for me now.
It also continues to work in the 20G219 build of 11.6.1. ✅
Thanks, folks.. working in 11.6.1 release too!
under macOS 11.6. using
/Applications/Utilities/Notifier.app/Contents/MacOS/Notifier --type alert --message "TEST" --messageaction "/Applications/Safari.app/"
does not open the app when clicking the notification. no problem with 11.5.2 i have noticed the same misbehavior with https://github.com/sheagcraig/yo , so it is probably a general problem with 11.6 ?