Osascript stopped working on MacOS Mojave

If I try to execute following code in bash
echo ’
tell application “Finder”
tell disk “MyDisk”
open
update without registering applications
delay 1
close
end tell
end tell
’ | osascript

Result:
“Finder got an error: AppleEvent timed out. (-1712)”
and build fails.

Expected result:
osascript shouldn’t fail

Additional information:

  1. I use osx_image: xcode10.2
  2. I didn’t happen on osx_image: xcode9
  3. Maybe Terminal app needs special authorization like this one
    https://applehelpwriter.com/2018/09/24/mojave-not-authorized-to-send-apple-events/
    to get it working. I cannot grant that permission to myself though.
1 Like

I got the same issue for my mojave build.

execution error: Finder got an error: AppleEvent timed out. (-1712)
https://travis-ci.com/Bob-Thomas/KYD3/jobs/226963971

Imprint