How to "see" complete error message in Notification Centre - macro failed

Hi all,

I am trying a ‘simple’ macro that prompts for my input, and uses that as a variable to create a new sub-folder.
My macro is failing, presumably since I am doing something wrong in specifying the folder/path name.

What I can see from the Notification pop-up, is '[name of folder path] failed with error Error Domain=NSCocoa…
The remainder of the message is cut-off, given the length of the folder path, taking up too much space in the notification window.

How would I go about trying to see the error message in full?

I think you can see the entire text in the Notification Center, can’t you?

In any case, you can see the variable’s value KM’s Preferences->Variables, or you could display the value. If you’re anything like me, you’ve probably got 2 slashes, or a missing slash.

Oh, I think there’s another way to see the error message (haven’t tried this, but it should work).

Change the options for the action that’s failing so it doesn’t abort the macro (click on the Gear icon).

Then right after the action, set a variable to %ActionResult%. Then display the variable.

See this Wiki article for more information.

Not really.

According to OS X El Capitan: Use Notification Center, you should be able to:

See missed notifications
In Notification Center, click Notifications, then do any of the following.

Get details: Click a notification to see the item in the associated app. For example, click a Mail notification to see the email in Mail. When you open an item, it’s removed from Notifications view.

But that is NOT happening for Keyboard Maestro notifications:

For example, when I click on this notification from the Notification Center dropdown list:

it does nothing. The full notification is NOT shown.

@peternlewis, is there anything we can do, or you can change, to allow us to show the full notification after the initial display has disappeared?

OTOH, Growl does an excellent job. I don't know how I did this, but somehow I have set KM to use Growl for error notifications. Example:

I find Growl much more user friendly than the Apple Notification Center.

The Engine.log file reports the error in full.

Help ➤ Open Logs Folder.

4 Likes

Ah. Many thanks all! Should’ve though to look for a Log option!

OK, I did that.

But I am overwhelmed by many, many duplicate log entries, like this:

2016-10-16 23:34:21 Invalid Plug In Action with Name Wrap Text
2016-10-16 23:34:21 Invalid Plug In Action with Name Wrap Text
2016-10-16 23:34:21 Invalid Plug In Action with Name Wrap Text
2016-10-16 23:34:21 Invalid Plug In Action with Name Wrap Text
2016-10-16 23:34:21 Invalid Plug In Action with Name Wrap Text
2016-10-16 23:34:21 Invalid Plug In Action with Name Wrap Text
2016-10-16 23:34:21 Invalid Plug In Action with Name Wrap Text
2016-10-16 23:34:21 Invalid Plug In Action with Name Wrap Text
2016-10-16 23:34:21 Invalid Plug In Action with Name Wrap Text
2016-10-16 23:34:21 Invalid Plug In Action with Name Choose File(s)
2016-10-16 23:34:21 Invalid Plug In Action with Name Choose File(s)
2016-10-16 23:34:21 Invalid Plug In Action with Name Choose File(s)
2016-10-16 23:34:21 Invalid Plug In Action with Name Choose File(s)
2016-10-16 23:34:21 Invalid Plug In Action with Name Read XPath matches in Chrome or Safari
2016-10-16 23:34:21 Invalid Plug In Action with Name Read XPath matches in Chrome or Safari
2016-10-16 23:34:21 Invalid Plug In Action with Name Read XPath matches in Chrome or Safari
2016-10-16 23:34:21 Invalid Plug In Action with Name Read XPath matches in Chrome or Safari
2016-10-16 23:34:21 Invalid Plug In Action with Name Read XPath matches in Chrome or Safari
2016-10-16 23:34:21 Invalid Plug In Action with Name Read XPath matches in Chrome or Safari
2016-10-16 23:34:21 Invalid Plug In Action with Name Read XPath matches in Chrome or Safari
2016-10-16 23:34:21 Invalid Plug In Action with Name Read XPath matches in Chrome or Safari

@peternlewis:

So, how do I identify what is causing these log entry errors, and correct/eliminate them?

What would really be helpful is a Keyboard Maestro Editor menu item that lists just errors that have been reported by the Notification system.

Is there a script or something that we can use to do this?

Peter, is there any way you can setup notifications so that when we click on one in the Notification Center, it will display the log, or other full text of the notification?

1 Like

The Invalid Plug In errors happen when either:

  • You have a plug in installed in ~/Library/Application Support/Keyboard Maestro/Keyboard Maestro Actions
    or
  • You have not got a plug in installed, but you have the action somewhere in your macros (probably because you imported a macro that included it, but did not install the action).

Those look like the latter.

The notifications API is very limited, and does not allow flexibility of control over what a notification does - all the notifications that an application displays have to be in the same format. Last time I looked, it was impossible to do the sort of things I wanted to do with the notifications.

This appears to be the situation in at least one case: "Wrap Text".
It seems a number of macros in the "Markdown" group in the Keyboard Maestro Library (that comes with the app) use a plugin named "Wrap Text":

In order to stop the KME Logging of this missing plugin many times a minute, I had to actually DELETE the macros. I tried disabling the macros and the Macro Group, but the logging continued. Shouldn't disabling stop the logging?

To make the KM logging more useful, more user-friendly, there must be a way to just the log entries about a given macro. Seems like a good use case for a KM Macro . . . :wink:

1 Like

The logging happens at load/save time, so disabled/enabled is unrelated to it.

So, then shouldn't I just see one log entry for it?
Instead, I see the same log entry many times a minute:

2016-10-16 23:34:21 Invalid Plug In Action with Name Wrap Text
2016-10-16 23:34:21 Invalid Plug In Action with Name Wrap Text
2016-10-16 23:34:21 Invalid Plug In Action with Name Wrap Text
2016-10-16 23:34:21 Invalid Plug In Action with Name Wrap Text
2016-10-16 23:34:21 Invalid Plug In Action with Name Wrap Text
2016-10-16 23:34:21 Invalid Plug In Action with Name Wrap Text
2016-10-16 23:34:21 Invalid Plug In Action with Name Wrap Text
2016-10-16 23:34:21 Invalid Plug In Action with Name Wrap Text
2016-10-16 23:34:21 Invalid Plug In Action with Name Wrap Text

and this keeps repeating and repeating ad nauseam.

BTW, in the other error messages in the KM Log, you provide both the Macro name and Action where the error occurs. Can you please do the same here?

Do you get them continuously or just a lot of them? I think you'll get four per use for every action use in any macro when you load or save. Or something like that.

The Engine will reload the macros every time you make a change in the editor.

In any event, remove the wayward actions, or fix the missing plug in, and then you wont get any messages… :slight_smile:

I too am very frustrated by the poor error reporting of Keyboard Maestro. Yes, all of the info is in the Engine.log, but it is also full of other logs, and is NOT a very user-friendly UI or display.

So, I have created a macro to hopefully fix this:

4 Likes

Many thanks for this! Should be super useful!

2 Likes