Reminder and osascript, SecTaskLoadEntitlements

I have an application that allows users to run scripts of their own, these scripts are run by my helper app running in the background.


Since El Capitan, users have an issue running scripts that accesses Reminders for example.

Here is what happens :


4/6/16 8:24:29.404 PM tccd[527]: SecTaskLoadEntitlements failed error=3
4/6/16 8:24:29.404 PM tccd[527]: Refusing client without path (pid 54116)

MyHelper.app > Runs a user shell script > scripts run an applescript through osascript to get access to reminders


Funny enough, is I run the helper app from the terminal using ./MyHelper.app/Content/MacOS/MyHelper, then it works perfectly.


How can I debug TCCD, and unserstand what's missing in 'Refusing client without path'? The PID indicated is the one for "osascript" binary that my app launches.


Thanks!


P.S. Sorry for the weird title, I litterally spent 10mn finding a title that wouldn't be rejected as "invalid characters" by the forum...

I appear to have this same issue. I wrote an ApplesScript (in Apple's Script Editor) to export my reminders to a json file for use in automations. I want to run it on a cron job using the osascript command line tool, but I always get:

/Users/robleach/Temporary/synchReminders.scpt: execution error: Reminders got an error: AppleEvent timed out. (-1712)

And I have similar messages in the console:

error 19:33:49.628309-0400 tccd Refusing client without path (from responsibility_get_responsible_audit_token_for_audit_token) PID[1422]: (#3) No such process error 19:33:49.628370-0400 tccd Refusing TCCAccessRequest for service kTCCServiceReminders from invalid client with pid 1422

I wrote a test version of the script that is 3 lines and generates that error when run via osascript:

tell application "Reminders" set allRems to (properties of every reminder whose completed is false) end tell

Anyone know how to get this to work? In System Preferences>Security & Privacy>Reminders, osascript is not there, nor do I have ± buttons to add it.

Reminder and osascript, SecTaskLoadEntitlements
 
 
Q