AppleScript Error: Not authorized to send Apple Events?

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Hi all!

I just tried implemented this very cool looking set of 2 rules that create a GTD "tickler" file:
https://codingbulljunky.wordpress.com/2015/11/10/hazel-based-tickler-file/

While the 1st rule (the filing portion) works as expected, the 2nd rule that sorts files back to the desktop is failing. When I try to preview the results of the rule, I get an error that reads: "Error executing AppleScript: Not authorized to send Apple events to Finder." It's the first time I've ever seen this error. You can see a couple screenshots below (the code and error).

Does anyone know what's up, or how to fix it? I'm running macOS 10.14 Mojave, and I've already made sure that HazelHelper is authorized in the Accessibility and Automation sections within the Privacy tab of System Preferences.

Thanks for your time!

Image

Image
Taz
 
Posts: 7
Joined: Sun May 18, 2014 10:07 pm

Can you post an image of HazelHelper in the privacy settings for Automation?
Mr_Noodle
Site Admin
 
Posts: 11236
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Can you post an image of HazelHelper in the privacy settings for Automation?


Of course! Here you go. Let me know if you need anything else to help troubleshoot.

Image
Taz
 
Posts: 7
Joined: Sun May 18, 2014 10:07 pm

Try rebooting and reporting back. If it still happens, send the logs showing the error.
Mr_Noodle
Site Admin
 
Posts: 11236
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Try rebooting and reporting back. If it still happens, send the logs showing the error.


Hi! I've rebooted several times since experiencing the error. Also tried after updating from 10.14 to 10.14.1. No changes.

I turned off all other hazel rules, leaving only the problem rule active. The log indicated no error:

2018-10-31 12:08:27.722 hazelworker[23173] ###main load address: 0x10c868000
2018-10-31 12:08:27.722 hazelworker[23173] ###Noodle load address: 0x10c988000
2018-10-31 12:08:27.722 hazelworker[23173] ###CK load address: 0x10c94c000
2018-10-31 12:08:27.747 hazelworker[23173] Processing folder Tickler
2018-10-31 12:08:29.753 hazelworker[23173] Done processing folder Tickler

However, previewing the rule on one of the files contained in the Tickler folder still returned the same error: "Error executing AppleScript: Not authorized to send Apple events to Finder."

After googling this AppleScript error, I found that it was reported in a wide variety of cases, all relating back to Mojave. Apparently, Apple made some major security changes that screwed up a bunch of previously working things. Perhaps, Hazel is among the disrupted tools?

Thanks again for your time!
Taz
 
Posts: 7
Joined: Sun May 18, 2014 10:07 pm

Ah, I think the issue here is that when using the preview function, it's System Preferences and not HazelHelper. Since I don't control System Preferences, I can't have it request permissions. I'll need to add a fix in the next patch to get around this.
Mr_Noodle
Site Admin
 
Posts: 11236
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Ah, I think the issue here is that when using the preview function, it's System Preferences and not HazelHelper. Since I don't control System Preferences, I can't have it request permissions. I'll need to add a fix in the next patch to get around this.


Roger that! However, it's not just the preview that doesn't work. The rule itself is not working. I assumed it was failing for the same reason the preview was failing. Could the issue you've described also cause the rule to fail? Thanks!
Taz
 
Posts: 7
Joined: Sun May 18, 2014 10:07 pm

Check the logs for the rule when running. It should be a different error I suspect.
Mr_Noodle
Site Admin
 
Posts: 11236
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Check the logs for the rule when running. It should be a different error I suspect.


No errors, but I did realize that the rule wasn't looking at files in subfolders. So, I added a rule to direct hazel to look into those subfolders (under certain conditions), and it's now working like a charm (despite the preview not working). Thanks again for your help!
Taz
 
Posts: 7
Joined: Sun May 18, 2014 10:07 pm


Return to Support