Open with Finder AppleScript Bug in macOS 12.3

I have no solution for this yet. I did have ShortcutObserver.app launcher macro activated by launching the KM Engine, but I've disabled that. The issue that is causing me difficulty is that if I create a file launch shortcut like this in the Finder macro group then launch it using a hot key trigger,

I see this:

logic1703

However, I can double-click this file in Finder, and it opens Logic Pro.
That's a problem I don't understand, and can't yet fix. Thanks.

One more thing:
If Logic Pro is not running when I trigger that hot key in Finder, It will launch, but today.logicx will not open.

Apparently, it's related to Launch Services, KM, and Finder, because the same error occurs if I create the same file launch macro in the Finder macro group for any .rtf file on the desktop. If I double-click it, it opens in TextEdit.app without issue. If I trigger the macro, error message -1703 appears instead.

Uh-oh, this will probably be up to Apple.

2 Likes

Hi @Lantro. If you haven’t seen it already, check out:

1 Like

The problem isn't limited to Logic Pro. It appears to occur when an assistive app launches a document. If the document’s app is not running, the app launches, but doesn’t open the document. If the app is running, error -1703 appears. This AppleScript demonstrates the issue.

BTW, you won't have any problem running the AppleScript if you're using macOS 12.2.1 or older. It's simply a matter of enabling access in Security & Privacy prefpane. There may be a way to bypass it in 12.3 as well, but I haven't found it yet.

Here, try it yourself. Script Editor.app is in /Applications/Utilities. Don't forget to use TextEdit.app to create a file named "richtext.rtf" on your Desktop first.


set rtfile to alias ((path to desktop as text) & "richtext.rtf")
tell application "Finder"
activate
open rtfile
end tell

3 Likes

Oh dear. I can confirm that this seems to be a bug in OS 12.3
All my open Applications Actions with Finder are broken :flushed:

image

2 Likes

I'm still on Catalina so I can't test I'm afraid. This might seem a bit facile, but what about changing the open actions' "with:" option to Logic rather than Finder? Does that make any difference?

I had an issue with opening files with Lossless Cut (a video trimming app). I got around it by setting my macro to open the app, wait till it was at the front and then open the file with the app. I appreciate this is more work than you may want to do. I suppose you could create a subroutine with the app name as a variable, but the wisdom of @peternlewis would probably be of help to you.

In the meantime, did you try @_jims' suggestion?

2 Likes

I have the same issue where I cannot get GarageBand to open Finder selection via Keyboard Maestro.

My current workaround is to activate GarageBand first and then make the GarageBand open the Finder selection.

2 Likes

Thanks @noisneil @_jims @RazMastero @Lantro @takashiyoshida
The "fix" seems to be to change the "open with Finder" to "Open with Default Application"

For an Application:

For a Path to a File (which can be a Variable)

But this is a pain (for me at least) because I have many Macros set up the other way, which worked fine yesterday... Not sure if it is worth changing them all as this is probably an OS12.3 bug rather than a feature.

3 Likes

I had the same issue and I had to change the way I open Files.

3 Likes

Hi @Lantro - I hope you don't mind, but as this seems to be a general bug in macOS 12.3 I changed the title of this thread to help others who are having the same issue. I bet it has affected a lot of people.

3 Likes

Good idea! Thanks.

I did report a bug using Feedback at Apple.com, BTW.

5 Likes

Yeah, this hit me today. As a heavy Finder/KM user, I use these open Finder files with application macros a lot. At first I thought Photoshop had broken, which is certainly the most likely issue. I'm going to hit these keystrokes and have the files not open countless times before there's a fix, and 'til then I'll try to just control click or drag a Finder file to the dock.

2 Likes

This is a bad idea - applications should not be opened with the “Default Application”. The “Default Application” for “.app” can be almost anything, it could be an archiver, it could be an app cleaner, it could be anything at all. The fact that it is working for you currently is just luck.

3 Likes

It appears there is a bug in macOS 12.3 Finder such that asking it to open documents via AppleScript is broken in a variety of ways.

The best apparent solution so far seems to be:

For launching applications, you should probably always be using the Activate a Specific Application action to launch it.

4 Likes

Noted. And I see the warning triangle when I have changed my Action from "with Finder" to "Default Application". And this warning is similar to what you have just written.

In my case the Actions that were working before and are now broken by the macOS12.3 bug all look like this:

The Dictionary entry is a path to an Application (it could have been a Variable). Either way, it varies.

What I like about this use of "open with Finder" Action is that it restores the Application Window even if its Window has been minimized.

I think I will just have to wait until Apple fix the bug. As it affects AppleScript it's probably going to be noted by lots of people. I have sent a bug report in to Apple and hopefully others will too. Feedback - macOS - Apple

The irony is that I was waiting for the release of 12.3 to fix another AppleScript bug (to do with making a Contact using AppleScript) and Apple actually fixed that but now this other thing is broken… :worried:

1 Like

The good news is that this seems to be getting some reporting outside of this Forum so, bodes well for the macOS12.3 AppleScript bug to be noticed and fixed:

From this report, a little way down on the page: https://www.kiratas.com/problems-with-macos-12-3-reports-of-broken-macbooks-broken-scripts/

Problems also with Safari 15.4 and AppleScript

macOS 12.3 also brings new bugs with AppleScript and apparently prevents files from being opened – a basic function. This fails with error -1703, as reported by the developer of the keyboard shortcut tool Keyboard Maestrowhich is directly affected.

2 Likes

I'm using macOS Monterey 12.3 on a 24" M1 iMac.
I'm not sure if I'm following this thread, but FWIW this works whether TextEdit is open or not.
I have the following macro that's triggered by a kmtrigger file (so I can have it in the Dock).

Open “/Users/Steve/Documents/Scratch Pad/Scratch Pad.rtfd”
with TextEdit
Execute Macro “Set Window Position Scratch Pad.rtfd” Asynchronously
[merely moves and sizes the window from the standard upper left to lower right*]

BTW, this window move is much faster on M1 than on my 2014 27" iMac (RIP).