Oodles of applescript errors

Since upgrading to SpamSieve 3.3.2 this morning, my SpamSieve log is riddled with AppleScript errors — about 100 since the upgrade. I’m afraid I had turned off detailed script debugging so it might not be obvious where these errors are coming from, but they are mostly of this form:

Summary:	An AppleScript error occurred.
Suggestion:	Mail encountered error -1712 (errAETimeout - the AppleEvent timed out):

Mail got an error: AppleEvent timed out.

near:

<unknown location>
Date Logged:	Today at 10:34:55 AM

SpamSieve:	3.3.2 at /Applications/SpamSieve.app
Device:	macOS 27.0.0 (26A428) on matt's m1 (MacBookPro18,3)
User:	mattm1 (Matt Neuburg)
Language:	English

Error:	<NSError Domain=NSOSStatusErrorDomain Code=-1712 UserInfo={
MJTScriptArgumentsDescription = "<NSAppleEventDescriptor: [ 0 ]>",
MJTScriptSubroutine = "listinboxestocheck",
MJTStackFrames = (
    "-[NSAppleScript(MJT) mjtCallSubroutine:arguments:error:] (174)"
    ),
NSAppleScriptErrorAppName = "Mail",
NSAppleScriptErrorBriefMessage = "AppleEvent timed out.",
NSAppleScriptErrorMessage = "Mail got an error: AppleEvent timed out.",
NSAppleScriptErrorNumber = -1712,
NSAppleScriptErrorRange = NSRange: {0, 0},
NSLocalizedDescription = "An AppleScript error occurred.",
NSLocalizedFailureReason = "Mail got an error: AppleEvent timed out.",
NSLocalizedRecoverySuggestion = "Mail encountered error -1712 (errAETimeout - the AppleEvent timed out):
    
    	Mail got an error: AppleEvent timed out.
    
    near:
    
    	<unknown location>"
}>

I noticed the problem when I selected a message that SS had moved into junk and said Train As Good; nothing happened, and the SS menu bar icon turned pale green. I took a sample of Mail. I’ve also made a diagnositc report. Let me know what else I can do to help.

SpamSieve Diagnostic Report.tbz2 (324.3 KB)

Sample of Mail.txt (310.7 KB)

Restarted the computer. So far, no error messages in the log. Perhaps this was a state that only happens right after one of SS’s self-updates?

Still no errors, and the Train As Good that failed previously now works.

I think you were getting these errors persistently before, and that’s why you had turned off Check inboxes for new messages not sent to Mail extension and instead selected the individual inboxes for filtering. So it might be worth going back to that setup if this happens again.

I doubt that this has anything to do with SpamSieve updates. Others have sometimes gotten these errors before, unconnected to updates, and you didn’t have this problem with any of the beta updates this cycle. The 3.3.2 update itself doesn’t change anything related to this feature. As far as I can tell, it’s an internal Mail issue related to it being busy doing lots of stuff, though at the time this sample was recorded it seemed to be mostly idle.

If we confine ourselves to “Mail got an error” log messages, there were none after 9/7/26, until right after I updated SpamSieve, at which point this slew of error messages began. I don’t think I can believe the “nothing changed”, because I certainly didn’t change anything other than updating.

The current mail setup (before and after the upgrade) is that extension is on, plus check inboxes for new messages, plus filter spam messages in other mailboxes, and the three inboxes are correctly specified in the list.

Were you using b4? I went through the Git log, and there were only two code changes since then:

  1. Adding an autorelease pool when opening the Core Data store.
  2. Deleting a pre-existing file when saving a diagnostic report.

I have no other recent reports of this error. The listInboxesToCheck script subroutine hasn’t changed in the last 2 years.

If you have a theory of what might be happening, I’m all ears, but I think the natural base assumption is that nothing changed and Mail just got into a state where it stopped responding to AppleScript, as it sometimes does. If you had simply quit and relaunched the old version of SpamSieve that would have triggered it to send Mail the same command, and it probably would have responded in the same way.

Yeah, I was using whatever the latest beta was. My way of updating is coherent: when there is an self-update like this, I ask for it, it downloads, it tells me to quit Mail, I do, we proceed with the self-replacement, and then I launch Mail. But maybe the moral here is that it’s better to restart the computer afterwards.

From a user point of view, the upsetting part is there could be so many errors without my knowing. Can’t SS notify me if we get into a state like that?

You certainly can if you want, but I have not seen anything to suggest that this should be recommended as standard practice.

The log shows that it worked around the errors and was still filtering new messages. Would you still want to be notified? How?

Since the problem is solved by restarting the computer, wouldn’t it be nice to be told that the problem exists so I can do that if I want to? The computer has a notification center; perhaps SS could post to it?

From what I’ve seen with this error, restarting the Mac is not necessarily any better than restarting Mail or waiting for it to finish whatever it’s doing. Depending on the situation, either might work or not work. I suppose I could offer multiple suggestions.

Apple’s guidelines are clear that Notification Center is not supposed to be used for errors, and I’ve had apps rejected from the Mac App Store for doing that. I definitely would want something non-modal, though. I’m not recalling a lot of precedents for that for an app that usually has no windows open. I could bounce the Dock icon and then open the Log window when clicked (and show the suggestion in the log entry). Many people have the Dock icon hidden, though, so alternatively perhaps it could color the menu bar icon and insert a menu item with some error text…