MacroBackerUpper Failing on Scheduled Run

2024-10-09 09:06:59 Execute macro “•main | MacroBackerUpper” from trigger At 9:07 AM every day
2024-10-09 09:07:00 Variable “KMVAR_ZIP__ScriptResults” excluded from environment to ensure the environment is not too large
2024-10-09 09:07:00 Variable “KMVAR_Start_Now_Comp” excluded from environment to ensure the environment is not too large
2024-10-09 09:07:12 GetProcessForPID(86317) failed with -600 for <KBMRunningApplication “Keyboard Maestro” <0x13b7d2a60> pid=86317 bid=com.stairways.keyboardmaestro.editor abht>, using cached version
Last message repeated 2 times
2024-10-09 09:07:29 Action 15603653 timeout exceeded. Macro “•main | MacroBackerUpper” cancelled (while executing Activate Keyboard Maestro).

None of that looks like MBU, other than the timeout exceeded causing it to stop. I don't use those variables, so those aren't related to MBU, and I have no idea what the "GetProcessForPID(86317)" error is, as I don't use any commands related to process IDs.

If you want to figure out what's happening, you'll have to add a Start Debugger action and step through, and then tell me exactly where it's failing.

-rob.

You can help narrow down the problem by running

tell application "Keyboard Maestro"
	selectAction 15603653
end tell

...in your favourite AppleScript editor. That'll select the timing-out action, and knowing what it is might give a clue as to why.

1 Like

Geez, I totally missed the last line in his log—thanks! (I have the above AppleScript as a macro with an input box, preloaded with the clipboard contents (if it's just a number) for easy repetitive use.

-rob.

1 Like

nice @Nige_S , I found the action, it was a simple 'activate application keyboard maestro' , I deleted it and inserted a 'fresh' one, now it doesn't time out.
most excellent....

sidebar: I was here before, that when I close the editor, KM crashes. I open it again, it crashes. If I hide KM, it is ok.
Last time (2 days ago) it stopped after I restarted, but I can't restart just now till later... all just FYI......

Yeah, that's also this line from your log:

2024-10-09 09:07:12 GetProcessForPID(86317) failed with -600 for <KBMRunningApplication “Keyboard Maestro” <0x13b7d2a60> pid=86317 bid=com.stairways.keyboardmaestro.editor abht>, using cached version

Confusion over the KM Editor's current process id could also be behind your mystery crashes. I'm assuming you haven't moved Keyboard Maestro out of /Applications or something? Check KM's Settings->Security and make sure you haven't got an alert for "App Translocation".

will check, and FYI, after running once successfully, it now errors/times out at the same exact place, a simple activate KM action..

no translocation security alert

So something's fubared -- on to more generic troubleshooting.

What version of macOS are you on, and what version of KM? And when you get this error, what "Process ID" does Activity Monitor report for the Keyboard Maestro? Does it match the one in the log's error message?

This may require a "proper" support ticket, but maybe someone can replicate and add more data to that process.

OS 14.6.1
KM 11.0.3
Not sure about the Process ID in Activity Monitor -
The PID in Activity Monitor is 85756
That number is no where in the engine error log.
Cheers

What about the other way around? Is PID 86317 anywhere in Activity Monitor?

-rob.

sorry,
86317 is in the error log, but only from this morning, around 9am when I was running it. I have run the macro both manually and scheduled at least 4-5 times each and that number / PID has not failed....

and no, 86317 is not in activity monitor

You need to check both the Activity log PID and the error log's GetProcessForPID(... message straight after the action has failed.

Meanwhile, try single-action "Activate Keyboard Maestro" macro and see if that exhibits the same behaviour. If so, try setting the "Activate" action to the other matching options (at the bottom of the apps list):

image

...and see if it helps.

You're trying to narrow it down to whether the Action has a general problem, whether it's only a problem when it activates KM, or only KM and only within @griffman's routines.

thanx,
Just ran it manually, and it failed
85756 is in both the error log and activity monitor for KM

2024-10-09 17:28:16 GetProcessForPID(85756) failed with -600 for <KBMRunningApplication “Keyboard Maestro” <0x132eeaf60> pid=85756 bid=com.stairways.keyboardmaestro.editor Abht>, using cached version

As the author of MBU, I say "whew" :). But on a personal level, that's really weird. Did you try @Nige_S' suggestions to try matching by path or bundle ID?

-rob.

Yes I have....

Something is definitely whack....
Every time I close the editor, KM crashes.

  • I suppose a deletion of anything KM and a fresh install is called for.

Just Crazy - this is when I run it scheduled.... for the past few days, that is 'normal' that on a scheduled run, the Activate KM times out. and I tried to delete insert a new one, tried an AppleScript to make it active (honestly I forgot what happened, but I can tell you it didn't work....

2024-10-10 14:14:59 Execute macro “•main | MacroBackerUpper” from trigger At 2:15 PM every day
2024-10-10 14:15:00 Variable “KMVAR_ZIP__ScriptResults” excluded from environment to ensure the environment is not too large
2024-10-10 14:15:20 Action 15603653 timeout exceeded. Macro “•main | MacroBackerUpper” cancelled (while executing Activate Keyboard Maestro).