Keyboard Maestro just stopped working with Chrome 131.0.6778.86

Hi, I'm on a Macbook Pro M1 Max 16" running Sonoma 14.5.

Up until today I was using Keyboard Maestro 11 with a custom macro I created. What this macro does is that if I'm using Chrome, when I press alt+1 it will bring to the front the window whose title contains a "01". If I press alt+2 it will bring to the front the window whose title contains a "02".

This macro (rather a series of 7 macros, one for each window title) had been working perfectly well for about a year. Today I updated Chrome to version 131.0.6778.86 and my numbered macros stopped working completely.

I still have another macro where all applications are hidden if I press alt+d and that one is working perfectly well, so this seems to be Chrome specific.

Does anyone know what has changed n this new version of Chrome and how I can get my numbered macros to work again? Thanks

See this recent thread: “Bring window to front” no longer works with Chrome.

1 Like

Perhaps you deleted Chrome before installing the newest one, and therefore maybe you deleted the permissions, or its Javascript settings, prior to installing the new version.

So, first, you should check that your new version of Chrome has the correct permissions in macOS, and that KM has the correct permissions to access Chrome. This is one of the authoritative pages on permissions:

https://wiki.keyboardmaestro.com/assistance/Accessibility_Permission_Problem

Also, try reading the following post, which deals with configuring Chrome to support Javascript:

Be aware that Chrome has a long history of "incomplete and unreliable support for AppleScript." Perhaps you should test new versions of Chrome with your scripts on a different Mac before upgrading Chrome, or you will have more problems like this in the future.

And perhaps kevin's thread above is the most likely issue.

It's almost 100% assured this is the problem, because when Chrome is in the background, you can no longer see any of its tabs or windows via Accessibility, other than the frontmost window/tab. So those window title checks will always fail, unless that window happens to be the frontmost one already.

For easy reference, here's the bug report we filed; it's been acknowledged and will hopefully be fixed soon.

-rob.

Hi guys, thanks for your quick reply, much appreciated.

As it is, I got this solved shortly after posting the topic.

At first I also thought this must be a permissions issue (and in fact it could still be). I made sure to renew all the possible permissions but that still did not fix the issue.

ChatGPT provided a solution to do this by using Apple Script in Keyboard Maestro instead, and that did the trick. Same thing, just in a different way. The functionality is now the same I used to have so problem solved from my part.

After I found this solution, I realized that if Apple Script is doing the trick, the issue must be either with javascript permissions between Keyboard Maestro and Chrome (I think I have checked them all but who knows) or with some bug that was just introduced in Chrome, which is not something I would be able to fix.

In any case, it works now, so I'm glad that Keyboard Maestro is so flexible that different solutions can be found.

Thanks

1 Like

Hi griffman, please note that my original aumtomation was made to work only when Chrome is in the foreground, since I would never attempt to switch between Chrome windows if Chrome is not in the foreground. So that's perhaps a moot point.

Also something I did not specify previously: I keep 7 windows open in Chrome at all times , and they all have a title. I also keep Chrome open at all times (except for reopening it when an update comes).

So there would not be a situation where a window is not there in Chrome, it always is and if Chrome is in the forefront then the automation should work. Which it did for a very long time, it just stopped suddenly yesterday until the Apple Script fix.

Thanks for clarifying ... I still suspect one of those two bugs is involved. Especially if by title you mean you named the windows, then those names aren't available (foreground or background). The good news is that that's the bug that's already fixed and should be coming to a future release.

-rob.

1 Like

That's just a long-winded version of one of the solutions given in the thread @kevinb linked to earlier.

But it seems a reasonable workaround until the Chrome bug is fixed.