Script Debugger can't see anything from Mail

I’ve problems with SD and AppleScript in general to access properties from Apple Mail in Catalina. I’ve already added SD to Full Disk Access, enabled Mail Automation for SD and granted Accessibility Access for SD. On a second Mac with the same OS it works well. Both Macs have SIP enabled.

The error is “Error getting {property}: -43”

Any ideas?

That definitely sounds like a permissions issue. I fear you might have to resort to tccutil reset to clear things. You might also get some useful info if you watch Console while access is being rejected.

Thanks, Shane. I resetted the whole TCC without success.

This simple command just fails:
tell application “Mail” to get enabled of account 1

The console shows this:

standard	11:38:12.543361+0100	Mail	An exception was thrown during execution of an NSScriptCommand...
standard	11:38:12.543484+0100	Mail	[<MFEWSAccount 0x7fb0bd70f360> valueForUndefinedKey:]: this class is not key value coding-compliant for the key isActive.

Strange ist, that this Mac is nearly a fresh install.

Asking for enabled fails here too (error -10000). That looks like a Mail bug. The same happens for a few other properties, too. I don’t think it’s related to the -43 stuff you mentioned earlier.

I’ve two other Macs with Catalina without that problem. I can access all properties. Also SD shows everything on this Macs.

But interesting that I have access to some properties like full name and id on the affected Mac vie AppleScript. SD can’t show this property in the Explorer on this Mac (see screenshot).

Error -43 is a file not found error. In this instance, I think SD is simply the messenger for some other problem on your system.

After some investigations I found a solution for the SD bug. It seems that the SD does not work correctly, when Deep Freeze is installed. After uninstalling it, SD looks correct:

Well, it does not fix my problem with the enabled status for Mail accounts. :frowning:

In this instance, SD is just the messenger. When SD sends a get enabled of ... AppleEvent to Mail, this is the error that is being returned.

I believe I had a similar problem a while ago, but it ended up not being SDs fault. I had installed App Tamer (St Claire Software) which would either kill or slow down apps that were in the background. When the apps were in the background and you set App tamer to throttle CPU use too much, everything slowed way down, obviously even AppleEvents. When I am programming now, I make sure to turn App Tamer off. Maybe add this to troouble-shooting database also.

1 Like