Wednesday, July 6, 2022

AppleScript Broken in macOS 12.5 Beta 5

Luc Beaudoin brought to my attention that there is a serious bug in the current Monterey beta. So far it’s affected every app I’ve tried that uses AppleScript. The script will fail with error -609 (connectionInvalid). Sometimes the script succeeds the first time, but then it will fail every subsequent time.

I can reproduce the error with a script as simple as:

tell application "Safari" to get URL of document of window 1

or this similar script for BBEdit.

Until this bug is fixed, I recommend not updating to the latest Monterey beta, as it is likely to cause widespread breakage. Even if you don’t write scripts yourself, many apps rely on them under the hood. For example, there are confirmed problems with:

I have filed a feedback (FB10565806) about this, as has Beaudoin (FB10563311).

Update (2022-07-07): It also affects the Dock and SuperDuper.

Update (2022-07-12): This seems to be fixed in the release candidate.

8 Comments RSS · Twitter

Beatrix Willius

Does Apple have anyone left doing quality assurance at all? I'm doing a bit of testing for the new features in Mail. I have buttons that need 2 clicks. When the time shows :15 then the clock face shows :16.

Still no automated testing it seems?

This is failing everywhere that seems to require some sort of IPC connection. If you have Cmd+Click on a thing in the Dock to reveal it in the Finder this same behavior occurs and you can see that the ECFileOperationRevealURL() call failed in Console. It'll temporarily work again if you kill Finder or the Dock.

I do wonder how Apple is testing builds for this to have shown up 5 betas into a minor update.

I thought I was going crazy with all the 609 errors until I saw it was just present-day Apple QA doing its thing. Beta or not (especially when it's a public beta), this is a bizarre fumble. Is Craig just too busy writing cute skits for WWDC to manage his team?

@Kahina, Yes, it's strange that this one suddenly showed up as it wasn't in beta 4. I'm curious as to what triggered this issue.
[macOS Monterey 12.5 Beta 5 Release Notes | Apple Developer Documentation](https://developer.apple.com/documentation/macos-release-notes/macos-12_5-release-notes) says:

> There are no new release notes for this beta software update.

They recently connected Shortcuts and AppleScript. We'll likely never know what caused this glitch.

Hi,

To solve this temporarily, I created this Applescript (oh the irony):

---
do shell script "killall Dock"
—

...and exported it to an app. I Placed a shortcut to it in the Finder toolbar so I can run it immidiately when Finder decides to do the disappearing 609 magic trick again. I hope Apple can come up with a better fix soon though 😆

macOS Version 12.5 (21G69) RC has solved the issue as far as I can tell.

12.5 RC does indeed fix this. But the problem with the resized app windows still exists for me:
Since the last 12.5 beta all apps that are not Apple apps (i.e. Chrome, Photoshop…) get resized to around 1700 x 1100 px (they vary a bit in size) and placed at the left lower part of the screen. I'm using a Mac Studio with Studio Display running 2560 x 1440 px resolution. Apple apps stay as they were before sleep.

Sometimes when the Mac wakes up I see the login screen first being displayed as well smaller starting at the lower left edge and than quickly scaling up to full screen. I have no idea what happens here.

Leave a Comment