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

If there is an error running a macro, the first part of the error message is shown in a macOS notification. That notification has a 'Show' button which looks like it should show the rest of the error message - but when I click it nothing happens. Should it do something?

Screenshot 2024-05-02 at 10.46.37

I never thought to ask myself that question, I just presumed there's a reason, probably a macOS limitation. No doubt someone here will give you the correct answer.

But if you want to know how to fix the programming error you are having, it would help a lot if you surrounded the Search action (the one that caused this error) inside a Try statement, like this:

This way you would see the string (which I'm guessing is VarName, but is probably something else) and you would get a pop-up asking if you wanted to continue or stop.

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.

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.