Numerous, repeating Editor.log entries AND Keystroke losses

I’m frequently getting this entry in the Editor.log file:
“Preference read share incoming failed with error: The file “Keyboard Maestro Macros From Shared.plist” couldn’t be opened because there is no such file.; (null)”

Followed by numerous entries of the line below, for each time that I get the above line:
“Ignoring shared file we have already seen”

Don’t know if they are directly related. Started looking at the logs when I seemed to be losing keystrokes while KM and it’s engine are open. Best I can tell (but will keep examining), the key lags and losses stop when completely closing KM.

Also frequently getting the entry:
“Assertion Failed: MMacroInsertion::CurrentlyInserting(), file: /Users/peter/Keyboard Maestro/Project/Source/Macros/, value: 0”

The keystroke problem seems worse when I’m editing a macro with several IfThenElse actions and sometimes is unbearably bad, i.e. takes 3 or 4 taps on a key to get a single keystroke.

Hoping for a way to clear up the Editor.log file and hope that will stop the key lag/loss.

This issue seems related to this topic:
Editor Log Errors - Still - Hundreds of Them

1 Like

The only reason you would ever get that is if the Keyboard Maestro Engine received a sync file from your macro sync file, attempted to write it and then alerted the editor, and the file was not written.

And the only reason that the file would not be written would be a permission or ownership problem with the Keyboard Maestro preferences folder or a serious disk issue.

Given this situation, Keyboard Maestro would like be almost entirely inoperative. Do changes to your macros even save? I doubt syncing is working properly. Your Keyboard Maestro installation is, I would guess, seriously broken on that Mac.

The likely cause is either a failed attempt to migrate Keyboard Maestro to that Mac, or a failed attempt to restore the Keyboard Maestro preferences folder, or some sort of "system cleaner" messing up the Keyboard Maestro preferences folder.

You should not attempt to use Keyboard Maestro until you resolve these issues or you will almost certainly lose changes to your macros. You should also turn off syncing immediately until you resolve the issue and ensure you know which of your Macs has the latest version of your macros before restarting syncing.

Well thank you for the “Red Alert” on KM installation. You probably saved me from future headaches. KM seemed to be running fine on my main Mac computer. Changes to macros were saving between quits of KM and restarts of my Mac. In my sync folder, however, there were several recent conflicted sync files.

I deleted all the KM preferences in my main and 2nd Mac. Re-opened KM and restarted a new sync initiated on my main Mac (the one with the most recent macros). I followed up with doing the same on my 2nd mac but starting sync on my 2nd mac using the existing sync file I had just created on my main Mac. The changes did sync through to my second Mac. I also changed something in a macro on each Mac to see the change sync through which it did.

On my 2nd Mac, I did have several KM preference files whose filenames ended in a set of random letters. (Wish that I could post some of the filenames but I already deleted them.)

I have Tech Tool Pro running on both computers and neither are showing any issues through Tech Tool Pro (except a dying battery on my 2nd Mac).

I will continue to examine the log files and report back if the issue continues. I also hope the lost and lagging keystroke issue will be resolved.

Thanks for your help.

By the way, I would like to express my appreciation at your responsiveness, and that of others, on this forum. There are many other application forums where you don’t get a response for days if at all. Thank you!

1 Like

Glad to help, and I’m glad I could answer quickly, although through January I do not always answer quickly as it is our summer and I tend to take time off to spend with the family. Particularly the next few weeks I may not answer quickly at all. Thankfully, there are lots of other really helpful people on the forum too.

I'm sorry to bother you with this again Peter, or anyone else who might have an answer. The missing keystrokes problem has returned. It had left since about mid-January but returned with a vengeance today. It does only seem to happen when Keyboard Maestro engine is running.

The last time I got the following entry, that you mentioned earlier in the thread, was in mid January (It's not happening now.):
“Preference read share incoming failed with error: The file “Keyboard Maestro Macros From Shared.plist” couldn’t be opened because there is no such file.; (null)”

I've tried to coordinate the instant the problem happens with the time down to the second. As I've done this, I've gone back and looked at the engine log and it looks pretty clean, to my eyes, during the moments that the missing keystrokes occur. Other odd, but less frequent, or at least less evident, ways the problem expresses itself is: the character accent popover will appear briefly; also shortcut key commands will sometimes take a 2nd or 3rd try to get them to execute.

The problem does occur in other apps but it’s most noticeable right now in Safari.

Now, I do have a couple of macros that execute when the app activates and one of those involves Safari. I disabled those macros and the problem seemed to go away. Here is what the macro triggered by Safari activation looks like. (Note the ellipsis in the path reference is my edit for privacy.)

Do I need to refrain from using the triggers in this way? (Kinda like, "Hey Doc, it hurts when I move my arm like this...)

Oddly, though, I've had these macros running for a couple of months and I'm only just now experiencing these lost keystrokes again.

However, even after disabling the supposedly offending macros, the problem has returned a couple minutes later about as badly.

After closing Keyboard Maestro. Again, typing was easy, as you will see from the video linked below:
Lost Keystroke Demo Video (correct one)

Note added July 17, 2018: The above example was the wrong one, and not very helpful. I replaced the link immediately above with the correct, hopefully more helpful, one.

I'm pretty convinced this is at least related to Keyboard Maestro because the performance is so different with Keyboard Maestro off or on. I would appreciate any help in solving this. Thanks!

So to be clear, you are getting missing keystrokes, and/or character accent popover will appear briefly, in a number of different applications.

It sounds to me like keyboard events are either going missing or being long delayed. Keyboard Maestro doesn't change keyboard events itself, so it should not cause this unless for some reason Keyboard Maestro, when processing a keyboard event took a long time, which should not happen.

Do you have any other applications monitoring or affecting the keyboard event queue? Any other text expansion or the like, or any applications like Karabiner installed?

The macro you showed should not have any appreciable effect. For one thing, it should only trigger when you first activate Safari, and so should not be running while you are typing in Keyboard Maestro. One case you do have to worry about with any “application activates” triggered macro is not to cause the application to deactivate and re-activate. I don't think your AppleScript should cause that, but if it did cause the Finder to activate and then reactivate Safari, then your macro would run again. But you'd see that in your Engine.log as multiple sequential executions of the macro.

@peternlewis You are correct in your understanding of my description. The missing keystrokes continue to happen, though sometimes the problem is much less severe than at others, and it does seem less so lately.

The accent popover and missing stroke can happen anywhere I'm typing.

My goal at this point is simply to add information to this thread as it occurs, an evidence trail so to speak, that may eventually lead to a solution.

I do continue to suspect that Keyboard Maestro is at least involved in the issue (not saying it's the cause), because the issue always seems to completely resolve immediately after quitting the Keyboard Maestro engine.

An additional bit of information: I have noticed that the "Cancel All Macros" submenu (under the Keyboard Maestro menubar icon) blinks sporadically.

Here is a dropbox link to the a screen video of the phenomenon occurring: (Caveat: I think the software I'm using to make the video (SnagIt) is, itself, causing the submenu to blink once a second, so this video is only intended to demonstrate the blink event, not the frequency of the blink.)
Video of "Cancel All Macros" blinking.

When not screenshotting the submenu, the blinking continues, but only (usually) sporadically, as in once or twice every several seconds. Other times, it will blink once a second, without SnagIt's "help."

Also, I looked at the engine.log. I'm getting a "ton" (15 to 20 within a second) of...
"Invalid Plug In Action with Name Execute a Script in Terminal"
"Invalid Plug In Action with Name Get Finder Path."

However, I do not see additional entries (those listed just above or others) in the engine.log timed to each blink.


I see the blinking submenu is described here as well:

You didn't mention whether you had Karabiner or any other software that might be monitoring keystrokes installed.

Check the Engine.log file (Help ➤ Open Logs Folder) and see what macro is running. That should not be blinking unless there is a macro running each time (which could include a macro being tried from the Keyboard Maestro editor, including to update the conditions in the editor).

Search the Keyboard Maestro macros for the named plugins (“Execute a Script in Terminal” and “Get Finder Path”) and remove the actions.