# Osascript stopped working on MacOS Mojave

**URL:** <https://travis-ci.community/t/osascript-stopped-working-on-macos-mojave/3657>\
**Category:** macOS\
**Tags:** bug\
**Created:** [June 8, 2019, 5:18am UTC](https://travis-ci.community/t/osascript-stopped-working-on-macos-mojave/3657 "2019-06-08T05:18:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wojnilowicz](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/wojnilowicz/32/4511_2.png) [@wojnilowicz](https://travis-ci.community/u/wojnilowicz)\
**Post date:** [June 8, 2019, 5:18am UTC](https://travis-ci.community/t/osascript-stopped-working-on-macos-mojave/3657/1 "2019-06-08T05:18:08Z")

</div>

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/](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.

---

<div class="post-metadata">

**Author:** ![Bob-Thomas](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/bob-thomas/32/2568_2.png) [@Bob-Thomas](https://travis-ci.community/u/Bob-Thomas)\
**Post date:** [August 21, 2019, 2:40pm UTC](https://travis-ci.community/t/osascript-stopped-working-on-macos-mojave/3657/2 "2019-08-21T14:40:29Z")

</div>

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](https://travis-ci.com/Bob-Thomas/KYD3/jobs/226963971)
