[solved] Error running macro

I was running a macro that checks which files were modified in the last N minutes and then copies them to a folder and I got this, but I don't know what this means:

2024-02-12 20:26:10 Launch Task /bin/sh -c '/var/folders/4_/68zgw8m93p70d84rycx_fsh80000gn/T/Keyboard-Maestro-Script-6309715F-CB71-4631-A5CF-26B706F6E8B2' failed with exception Failed to set posix_spawn_file_actions for fd -1 at index 0 with errno 9

2024-02-12 20:26:10 Action 15450450 failed: Task failed with status -1

It still copied around 2GB of files, but then it showed me that error. I ran this macro a few times before and it was ok, no errors.


While I was typing the above, I got another notification, this time for a recurring macro, that never showed me any errors:

2024-02-12 20:29:59 Execute macro “Battery Power” from trigger Every 30 minutes between 0:00-23:59 every day

2024-02-12 20:30:00 Launch Task /bin/sh -c '/var/folders/4_/68zgw8m93p70d84rycx_fsh80000gn/T/Keyboard-Maestro-Script-CE5E9222-F601-495F-964B-0F89F1BF2889' failed with exception Failed to set posix_spawn_file_actions for fd -1 at index 0 with errno 9

2024-02-12 20:30:00 Action 11451101 failed: Task failed with status -1

2024-02-12 20:30:00 Task failed with status -1. Macro “Battery Power” cancelled (while executing SCRIPT: Get Battery Status (SS)).

I have no idea what those mean either…and whenever that happens to me, the first thing I do is quit and relaunch the Keyboard Maestro Engine. May not help, but it can't hurt :).

-rob.

2 Likes

Every so often I get weird error messages similar to these, and usually an Engine restart solves it. Worse case scenarios have required a computer restart, but that’s rare.

1 Like

It sounds like the script (or the macros) have caused Keyboard Maestro to “run out of” some resource in the system, perhaps file descriptors.

The system has various low level limits on things like file descriptors and network ports and such and they are not necessarily immediately cleaned up when finished with. They may be intentionally left alive for a period afterwards to avoid possible conflicts or confusions with new ones, or they may simply have periodic cleanups, or the cleanups themselves might take time.

So the issue will likely be resolved by one or more of:

  • Waiting.
  • Relaunching the Keyboard Maestro Engine.
  • Restarting.
1 Like

Thank you all for clarifying.
I guess it was indeed a temporary issue.