Authorization error when running AppleScript

Describe the bug
I am trying to run a simple AppleScript via a gesture to show the PopClip application (see below). When I set a gesture to the Predefined Action and enter that Apple Script and hit Run Script it says "not authorized to send apple events to PopClip" (see attached image). Can you please help me resolve this issue? Thanks!
tell application "PopClip"
end tell

Affected input device (e.g. MacBook Trackpad, Magic Mouse/Trackpad, Touch Bar, etc.):
MacBook Pro 13" 2015 Trackpad


Device information:

  • Type of Mac: Macbook Pro 13" 2015
  • macOS version: 10.14.4
  • BetterTouchTool version: 2.807

Additional information (e.g. StackTraces, related issues, screenshots, workarounds, etc.):

Note: Before bug reporting, please make sure you have the latest version of BetterTouchTool and that you have already tried to restart your system :-). If you encounter a crash, please attach a crash log from the macOS from the "User Diagnostic Reports" section.

Make sure BTT has the permissions to send events to popclip in System PReferences => Security & Privacy => Privacy => automation

Thanks for getting back to me so quickly! I don't see BetterTouchTool listed under Automation

Then you most likely hit some macOS bug. Which version of macOS are you running?
It should automatically add any app that wants to control other apps there.

//edit: ah sorry, just saw you are running 10.14.4. Weird! Haven't seen that issue on that version yet :frowning:

I just made a quick change in v2.808 that may force macOS to re-request the permissions.
It will be available via "check for alpha version updates " in a few minutes.

Thanks I upgraded to the latest alpha version (2.809) but it hasn't resolved the issue

@Andreas_Hegenberg are there any other things I can try to resolve the Authorization error issue?

Possibly try to reset the macOS privacy / security database, sometimes it gets corrupted.

This terminal command may work:

sudo tccutil reset All


That fixed the issue! Thanks so much for your help on this!!

I'm having this same issue with a newly upgraded Mojave 10.14.5. I'm running the latest alpha of BTT (3.085) and no matter what I can't get my scripts that call iTunes to trigger the permission prompt, so all scripts trying to access iTunes fail with "Not authorized to send events to iTunes".

I've rebooted, did the tccutil reset command, and nothing has worked. Resetting tccutil made BTT ask for access to JSON Helper and Location Helper, but nothing I do can get it to ask for permissions for iTunes and iTunes never shows up in System Preferences -> Security -> Automation.


What can I do to get BTT to ask for permission to access iTunes so my touch bar buttons will work again?

It turns out that the Now Playing widget covers what I was using the scripts for (showing now playing track and play/pause) so using that solves my issue, but it would still be nice to figure out why BTT wasn't asking for permissions to access applications used in scripts.