KM Engine: "File Google Chrome wasn't found"

The problem started when I installed a custom Chromium build. I cannot use the official one for technical reasons. I misinterpreted other situations that turned out not to be related to the build. Recently, however, when I tried KM's Chromium action pack, I stumbled upon the issue of Chromium failing to establish a relationship with Keyboard Maestro. None of these actions set Chromium in an operational mood, and KM Engine's log repeatedly showed the message you see in the title.
The build's binary is named _Chromium. Does it mean I'm in the cold? Can it be rectified?

Have you tried setting the hidden Chrome-based preferences, as per the manual?

1 Like

I used the 2 defaults commands to add Chromium's bundle ID and the name as Google Chrome alias, but that seems not to have any effect. What version of KM do they apply to? Is it all versions of KM or only 10?

The exact log message is

CompileAppleScript[55045:303] Keyboard Maestro Internal AppleScript Error: File Google Chrome wasn’t found. - File Google Chrome wasn’t found.

I fail to understand why it refers to AppleScript. The actions aren't AppleScript-based, and the workflow contains the execute Javascript action.

Because KM controls the browser with Apple Events, communicated via AppleScript. It may be that Chromium doesn't support the same AppleScript commands as Chrome -- open the Dictionary of each in Script Editor/Debugger and compare them.

1 Like

Also make sure to allow JavaScript events in Chromium

1 Like

I already said I don't run Chrome because it's impossible, therefore only customized Chromium builds support the macOS generation available to me. So I cannot compare AppleScript commands of both, although I very much doubt those differ. Javascript from Apple events is allowed.

No, you said "I cannot use the official one for technical reasons". That could mean "It doesn't work on the pages I want to visit".

Given that Chrome itself loses and regains AS support on practically alternate builds, and other Chromium-based browsers vary wildly in their AS implementations (see eg here) there's a good chance that a custom Chromium build does differ!

How custom is this custom Chromium build? Can you point any of us to a download that we can test on a known working-with-Chrome system, given that you aren't able to?

That could mean

Could but doesn't. "Technically impossible" means just that. No need to try catching a black cat in a dark room. It's either the developer's oversight or a software defect. By this point, it's clear there's no solution, and we reached a dead end.

Before you totally throw in the towel -- have you tried the "Execute JavaScript in Front Browser" action? There's a chance that there's a bundle ID or name conflict/snafu that might be avoided by letting KM/the OS decide how to "connect" with whatever's frontmost rather than you trying to set it explicitly.

Edit to add:
One last thing to try is the following in Script Editor/Debugger, pasting it in exactly as is:

tell application "My Fake App"
	tell document 1
		do JavaScript "document.title"
	end tell
end tell

When you try to compile the script you'll be prompted to select "My Fake App" -- pick your custom Chromium build. Make sure that browser has a page, any page, open and then run the script. If you get the page title returned you'll know the KM problem is likely a bundle ID/name issue, so drill into that. If you get nothing or an AppleScript error (or can't even select the app at compile) you'll know there's an AS support problem.

Either result can help you with the person doing the custom build -- they're much more likely to fix a problem you can demonstrate than one which they have to unravel for themselves.

1 Like