• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Using applescript on Mavericks within Java complaning it is a sanboxed application but it is not
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using applescript on Mavericks within Java complaning it is a sanboxed application but it is not


  • Subject: Re: Using applescript on Mavericks within Java complaning it is a sanboxed application but it is not
  • From: Paul Taylor <email@hidden>
  • Date: Tue, 05 Nov 2013 21:28:44 +0000

On 05/11/2013 18:55, Christopher Nebel wrote:
On Oct 24, 2013, at 7:00 AM, Paul Taylor <email@hidden> wrote:

Using applescript within Java complaining it is a sandboxed application but it is not, although it is signed application, (not an applet but a standalone java applicatioon)

10/20/13 12:37:44.553 PM iTunes[74256]: AppleEvents/sandbox: Returning errAEPrivilegeError/-10004 and denying dispatch of event rdwr/writ from process 'Jaikoz'/0x0-0x413413, pid=19717, because it is not entitled to send an AppleEvent to this process.

I call the javascript by using java ScriptEngine

	ScriptEngineManager mgr = new ScriptEngineManager();
	ScriptEngine engine = mgr.getEngineByName("AppleScript");

How can I resolve this
The error is actually normal, but it's being logged incorrectly.  You put a "write" command inside a 'tell application "iTunes"' block, which sends the event to iTunes.  However, security rules in place since Snow Leopard prevent iTunes from handling it; it reports an error, which AppleScript notices and uses to re-handle the event inside your application.  Unfortunately, the "iTunes reports an error" bit uses the same error code used for sandbox rejections, and AEM logs it as such.  So, you are seeing a bug, but it's essentially harmless.  If you want to get rid of the extra event send (and the resulting log), move the "write" command outside of any "tell" block, or prefix it with "tell current application to", as described in <https://developer.apple.com/library/mac/releasenotes/AppleScript/RN-AppleScript/RN-10_6/RN-10_6.html> under "Scripting Addition Security".


--Chris Nebel
AppleScript Engineering

Thanks Chris I got some help modifying my script so that it worked without error. Bu the error isnt just an annoyance because I was writing alot of files to a file and the error was reported for every line slowing down the script massively

Paul
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden


References: 
 >Re: Using applescript on Mavericks within Java complaning it is a sanboxed application but it is not (From: Christopher Nebel <email@hidden>)

  • Prev by Date: Re: Using applescript on Mavericks within Java complaning it is a sanboxed application but it is not
  • Next by Date: Re: Pages 4.3 and Mavericks - Can't export as PDF
  • Previous by thread: Re: Using applescript on Mavericks within Java complaning it is a sanboxed application but it is not
  • Next by thread: Possibly OT: interactive speakable workflows
  • Index(es):
    • Date
    • Thread