Tahoe AppleScript Timeouts
A reader writes:
As a fellow AppleScripter, I thought you might enjoy knowing about a small Tahoe Finder bug that I have not seen mentioned anywhere and that caused all my carefully crafted (and expertly developed, of course) automations to grind to a halt and collapse, seemingly at random.
For some unfathomable reason, it is no longer permitted to
tell application "Finder" to empty trashwhen the trash is already empty: instead of erroring out or, as before, working silently, the operation now hangs indefinitely. This means that scripts that include this seemingly throwaway line to clean up after themselves will randomly start failing with no error message. In Keyboard Maestro, inline scripts fail quickly with a timeout message, but external scripts just hang.The trick is simply to substitute
if ((items of trash) as list) is not {} then empty trash.
For me, running that script through Script Editor or other means fails with a timeout (error -1712, a.k.a. errAETimeout) after 2 minutes. Recording an Activity Monitor sample of Finder seems to show that Finder is not busy doing anything related to the script. It’s as if it never received the command or else it replied but the reply got lost.
A small percentage of SpamSieve users are seeing a similar issue with Apple Mail on Tahoe. Some very basic/quick commands to Mail time out, with Mail also looking like it’s not even processing the command. Sometimes AppleScript reports error -600 (a.k.a. procNotFound) instead of a timeout. Oddly, this seems to almost exclusively happen with POP accounts.
There was a similar bug in macOS Bug Sur, but it only affected apps running in Rosetta.
Previously:
Update (2025-09-24): I’ve now seen several more cases of macOS Tahoe reporting AppleScript timeouts when it should be reporting other types of errors. For example, scripts that ask Mail for properties that don’t exist will intermittently hang for 2 minutes and then time out. This also seems to be the case with the POP errors that some SpamSieve users are seeing. The underlying issue seems to be a new error that Mail is encountering when accessing the junk mailbox, but instead of reporting the error back to the script it waits and then times out.
Previously:
Update (2025-10-04): Adam Tow:
In macOS 26 Tahoe, it’s the retrieving of the error which is dramatically slower over the same code running on macOS 15 Sequoia. I had hoped that Apple would fix this bug (FB20174869), but the later betas and GM release brought no relief.
15 Comments RSS · Twitter · Mastodon
The dumb kiddies that work on these operating these days ain’t got time for this AppleScript shit. They probably roll their eyes every time a dinosaur within the company has some clout to push back or demand that the thing continue functioning.
Honestly, like, do you, like, expect genz to, like, support your, uhm, old shitty tech, uhm, like, literally nobody cares about????
Actually, Leo, it seems to be Gen X and Boomers pushing the tried-and-true into the trash at Apple; but don’t let that get in the way of your self-righteous anger.
>The dumb kiddies
AppleScript hasn't been a priority at Apple for at least two decades, if not longer. That has always been a top-down decision. I remember reading opinion pieces in print magazines lamenting the lack of support for AppleScript; that must have been in the late 90s or early 00s.
I'm not sure if you're implying that Zoomers invented a time machine, went back in time, and told Michael Spindler or Gil Amelio or Steve Jobs or whoever not to give AppleScript any resources, or if you're just confused.
I don’t think you guys are correct, or it is far, far worse now, than it was 20 or 10 or 5 years ago. Was it a highly prioritized task ever? Likely not. But is it way way worse now and lacks maintenance? Yes. Does it get way worse every time someone touches an old component or app or system? Yes. And not just with AS; how terrible is DiskUtility? The portions of AppKit that were touched by Swift kiddies? When was the last quality software from Apple on the Mac or iPhone? Everything is passable at most. Bugs don’t get fixed unless the whole component is rewritten, at which point, it’s even buggier and less feature rich. Long time frameworks are seemingly abandoned for half-assed Swift alternatives that are broken beyond belief for years. SwiftData comes to mind as a "favorite" of Michael's. This is true across all of Apple’s software, be it user focused or developer focused.
We're definitely correct :-)
We don't even have to go to external sources. In 2013, this very blog linked to this article by Dr. Drang:
http://www.leancrew.com/all-this/2013/10/mixed-applescript-signals/
It's about people lamenting the fact that Apple "dropped AppleScript support on nearly all their apps."
This is nothing new.
And if you think this is because of the frontline devs and designers doing the actual work, you're just wrong. Apple sells fancy slabs of glass to people who want blue bubbles (or are the green ones the good ones? I forget). Investing resources into stuff like AppleScript is just an opportunity cost. I'm sure there are plenty of people at Apple who would personally love to work all day on improving AppleScript. Now try selling that to management.
If you want an OS aimed at tech professionals, go run Linux with KDE or something like that. Mac OS X ain't it anymore, and hasn't been for a long time.
I know I know, it’s fashionable to blame faceless management rather than the engineering snowflakes we all know and love from social media. They are so poor and mismanaged, oh the poor things, they even block people just for posting screenshots of their silly bugs with snippets of swizzles how to work around those bugs. My heart goes out to poor engineering. They have zero agency. Just bad management that even makes them put insane amount of bugs, just so they get ridiculed on Twatter. The poor things. How could I expect anyone to put their cushy job at risk to stand on principle and demand higher quality of the product they are working on? Silly me.
Personally, I think Applescript is awesome and I think Apple should fix any issues in it. I've been learning how to automate my Mac and unfortunately, Shortcuts and Automator both have too many oversights. It seems like doing anything even slightly complex requires a combination of Shortcuts, Automator, terminal scripts, and Applescript. Maybe if I knew more about Applescript, I could just use that by itself
I'm not really an AppleScript adept as I have only dabbled with it, so forgive my ignorance. Isn't automator (and its current AI-incarnation as a result) for a large part based on AppleScriptability of the apps it can automate? That should provide incentive for Apple to keep the technology up to date, even when it has lost its 1980's sex-appeal ;)
@CowMonkey → @MJTsai would know a lot more than me about it, being, as it were, on the frontlines of development, but my understanding is that the Apple Events frameworks/system still underpins massive amounts of macOS and third-party software.
While almost nobody opens Script Editor to write a script, save it as an app, and double-click it from Finder any more, ripping out AppleScript from macOS the way many commentators fantasise about it would have massive consequences — and probably require more investment from Apple than simply keeping it along for the ride.
Is the writing on the wall? Absolutely. Newer Apple apps emphatically do not support AppleScript in any meaningful way and never will. But Apple Script is one of these technologies, like bash scripting and FTP, that has an absurdly long tail and whose disappearance will be both excruciatingly slow and painful.
@CowMonkey Automator actions can implement their functionality however they want. I think some are standalone. But, yes, many (including mine) rely on Apple Events, the layer under AppleScript, to talk to apps. There used to be a way to create actions that were implemented entirely in AppleScript, which is currently marked as deprecated, but my recollection is that it stopped working years ago. I think I had to remove my action that used that. Personally, I think Automator is going to be dropped in favor of Shortcuts (a shame) and that AppleScript will outlive it. As Tarsier says, many parts of the system rely on Apple Events, so they are not going away, but that’s not the same thing as having robust support throughout the first-party apps.
> they even block people just for posting screenshots of their silly bugs with snippets of swizzles how to work around those bugs. My heart goes out to poor engineering.
Feels like they block people who file bugs in the Feedback Assistant as well because they don't respond or fix 90% of the shit I report...
That's clearly a Finder bug, not an AppleScript bug. If the Finder team ever had automated tests for AppleScript validation, it's entirely possible that whomever is responsible for testing these days didn't know about them or forget or they were too low priority for them.
@alexr There may well be a Finder bug that’s causing it to not just succeed like before, but the fact that it’s timing out (rather than, for example, erroring)—combined with the fact that I’ve now seen several other apps start timing out in Tahoe—makes me think there may be a system bug here, too.
@MJTsai — For what it is worth, I am also seeing a lot of random Shortcuts errors with generic failure messages like “There was an error…” and no details when interacting with system frameworks like Calendars using Apple’s built-in actions. Running the shortcuts again always works and Shortcuts that use third-party actions only or do their own thing (calculations, text processing…) behave as they always did. I do not know to what extent native Shortcuts actions use Apple Events (probably not), but there seems to be some high-level “communication” issues between system apps on Tahoe.