Error notifications - 'Show' button doesn't do anything

Thanks @Airy that's a useful tip! I can also call up the logs - it just seems like the 'show' button would call them up automatically. A bit odd that the button is there if it doesn't do anything :man_shrugging:

Well, hopefully @peternlewis knows the answer to that :). My guess is that maybe it's a button from a default notification, and what it would "show" is the full notification, which you're seeing already? The help page for Notifications doesn't include any details about the Show button.

-rob.

Unfortunately, notifications are under your control (for better or worse, worse in this case), not Keyboard Maestro’s control. You choose the style in your system settings, Notification settings. And it cannot vary for different notifications within the same application (unless you're Apple of course). As such, Keyboard Maestro cannot assume the button will even be there so it doesn't do anything cuz it isn't normally there.

Worse, if you turn off the notifications (which is very easy to do when you first start using Keyboard Maestro), then the errors wont even show up.

It's almost time to resurrect Growl and write my own notification system.

1 Like

:+1: :+1: :+1:

Thanks Peter. Are you saying I should have my notifications set differently for Keyboard Maestro? I can't see any option that would turn on and off the 'show' button.

1 Like

Yes, they should be set to Banner, not Alert.

Hmmm, it was already set to banner... I'll try turning notifications off and on again for KM and KM Engine.

I take it this doesn't matter much - the error message would still be truncated if the Show button wasn't there?

1 Like

Correct. The Engine.log file will show the whole error.

1 Like

For those who want more information from their error messages, here's a simple macro that fully displays the last ten lines in the Engine.log file that contain the word "failed" or "error".

Execute a Shell Script Action (v11.0.2)

Execute a Shell Script.kmactions (1.0 KB)

1 Like

That's amazing @Airy - thanks! I've put it in the status menu for quick access.

Thanks. I've just spent the last couple of hours coming up with an even more interesting utility for examining any log files. But I may test it for a few days before posting it, probably in its own thread.

At one point, @_jims had the same thought, and he created a comprehensive engine log analysis macro. Here's how Jim describes its main feature:

You can also use it to trim entries from your log based on a number of conditions. If you write complicated macros, I highly recommend it to make debugging a bit easier.

-rob.

1 Like

Me too.

It's my go to quick diagnostic tool. Many thanks @_jims !

I just reviewed that post. I hadn't seen it before. His solution is very powerful. Mine has only a subset of those features. Still, I may post my solution since it uses some interesting techniques. Also, sometimes it's just interesting seeing other people's solutions to the same problems.

I would encourage you to post it—more is never enough when it comes to ways to use Keyboard Maestro :).

-rob.

1 Like

Thanks for the positive feedback. I think I will post it, but in its own thread.

I still consider myself a pretty new user to KM, and I have to ask, is there nothing that can be done to improve the error reporting experience? Here are some ideas:

  1. Make clicking the notification open KM, potentially suggesting the user look at the log file, or reveal the log file, or open the log file either natively or in Console
    • If none of those is possible, omit the functionless and deceptive "Show" button
  2. Within the error message, name the macro associated with the failure:
    • In the notification
    • In the log
  3. Mention the existence of the log file in the Troubleshooting page of the manual

For (1) I've been able to make notifications that open apps using terminal-notifier, and have seen plenty of apps that not only open, but select the relevant item when you click a notification. Surely, something more than a no-op is possible for KM? (For all its problems, I have to give Shortcuts credit on this — its notifications take you not just to the shortcut that failed, but to the step that failed, and the full error is displayed atop the step.)

For (2), it isn't currently possible to know which macro failed. You can make a guess based on line proximity and timestamps, but the Action lines do not name it, so if you have multiple similar macros running at the same time, you can't be sure.

For (3), I think experienced users may have forgotten that new users don't already know their way around all the facets of KM. I only learned of the log thanks to this thread.

Hope this all can be improved :crossed_fingers:

These things are controlled by your Notifications settings.

It should generally be set to Banners, not Alerts so that it does not have the functionless and deceptive "Show" button which isn't meant to be there, but Apple does not let the application control how the notification is displayed.

It is if the macro is canceled.

It is, in the Troubleshooting [Keyboard Maestro Wiki], but not in the User Manual which is a much more abridged version so it is not appropriate there.

Unfortunately, Apple control the display of Notifications, and only one style of notification can be selected per application (unless you are Apple of course). And Apple only allow the user to select the style. So for a lot of people it's worse than the functionless and deceptive "Show" button - the system has helpfully turned off notifications so they don't even see the error at all.

1 Like

I have to respectfully disagree with this. The OS has provided the user with major settings to control their experience, which all apps can or should be aware are possible configurations the user might select. I don't think it's appropriate for an app to decide that a user's preference is "wrong," but rather, that the app should accommodate the user's preference. In my case, I don't actively check Notification Center frequently, so if one of my macros fails, I'd prefer to have a notification left on screen for me to see (Alert style), rather than discover that failure (potentially) days later (Banner style).

I don't think this is correct. For example, right now I have four macros configured to run at system wake. One of them is emitting this message: Numeric condition failed to get text from source. However, I don't know which macro it is (much less which action within that macro), as there's no contextual information provided.

It's perfectly fair to want to keep the manual succinct. My encouragement here is that in general, I think the app could do more to make the user aware of the existence of the log files.

Hi, @homerow. The Engine.log is indeed a useful tool when troubleshooting. I've created a related macro that you might find useful: Engine.log Tool

1 Like