Page 3 of 4

Re: AppleScript "Application isn't running" (-600) Errors

PostPosted: Thu Nov 19, 2015 12:32 pm
by jay (support)
As we've said in other places on the forums, we've reported the problem to Apple and they've yet to offer a solution. We have no idea why it's happening, nor why it works for some people and not for others. I'm running Yosemite on a laptop and El Capitan on my development Mac and AppleScript is working fine on both of them.

Make sure you don't have more than one copy of the IndigoServer app anywhere on any mounted disk - that will definitely trigger the error. This is a OS issue of some kind - we use the exact same AppleScript code we've used for many years and since the problem is sporadic it seems to mean that there's something odd going on with the OS.

We recommend that you convert your AppleScripts to Python (as much as possible, that is) since we're not extending AppleScript any more and Python is our scripting language of the future. We know there are still things you can't do in Python that you can in AppleScript, but over time those will go away.

Re: AppleScript "Application isn't running" (-600) Errors

PostPosted: Thu Nov 19, 2015 1:40 pm
by McJohn
Thanks for your explanation Jay.
It's very strange that every other program works perfectly with AppleScript and Yosemite, (so I think Apple does nothing about this problem).
With a brand new Mac and brand new OSX and no mounted volumes ONLY Indigo doesn't work with AppleScript.

Kind regards,

John

Re: AppleScript "Application isn't running" (-600) Errors

PostPosted: Thu Nov 19, 2015 5:16 pm
by matt (support)
I'm pretty sure Indigo is not the "ONLY" one that has this problem. It might be the only application that YOU have which you use AppleScript with frequently that exhibits the problem, but it is not specific to only Indigo. One thing that makes the Indigo Server somewhat unique or non-standard is that it is a background (headless / no GUI) process which is often started by launchd. Neither of those should cause AppleScript to fail, but I believe one or both are related to the Apple bug that causes the problem. We will continue to try to work with Apple to find a solution. Going forward though we strongly encourage users to use python for scripting Indigo. We have much more control over the reliability of python and how it communicates with Indigo than we do with the AppleScript framework.

Re: AppleScript "Application isn't running" (-600) Errors

PostPosted: Sun Nov 22, 2015 5:13 am
by GlennNZ
Thanks for the other options - have changed my iMessage AppleScript to use curl - was a bit of pain to work around but seems okay now,

Did notice in this process that these errors only appear outside indigo - if I run a AppleScript embedded in indigo I can tell indigo server without the above error. In the script editor - get the application not running error.

Is there any difference to how AppleScript references indigo server app in embedded scripts versus external scripts?

Glenn

Re: AppleScript "Application isn't running" (-600) Errors

PostPosted: Sun Nov 22, 2015 8:30 am
by dclonts
So I might (but just might) have an answer. I disabled power nap both for the indigo app as well as the indigo server (by going into package contents). Have not gotten any more of these errors since then.

The caveat is i've done some other stuff too, so who knows...

But this really seems like a power nap issue...

Re: AppleScript "Application isn't running" (-600) Errors

PostPosted: Sun Nov 22, 2015 9:11 am
by autolog
That's interesting :)

A quick bit of googling found this article: Mac Mavericks' App Nap, Power Nap don't always play well with others

The article says that you can disable power nap for an App from Get Info > Prevent App Nap

It also says that "Apple says that Power Nap is on by default only on desktop models that use only flash storage, and not systems running Apple's Fusion Drive, which mixes hard disk and flash storage." - I have been getting the problem and have an SSD for the system drive in my Mac Mini.

Maybe this is why some people are getting the problem and others aren't?

I will have to experiment and see if I still get the problem - I had abandoned my previous efforts as I was always getting the -600 error and it was rather like bashing my head against a brick wall! :)

Re: AppleScript "Application isn't running" (-600) Errors

PostPosted: Mon Nov 23, 2015 10:31 am
by jay (support)
Unfortunately, this error predates app nap. It could very well be a contributing factor though. It's interesting though - Indigo apps have the appropriate internal switch set so that they should never nap (a switch which is independent of the one you see in the Finder).

Re: AppleScript "Application isn't running" (-600) Errors

PostPosted: Sun Dec 20, 2015 7:50 am
by ken_jacobs
Is this problem restricted to external Applescripts and not embedded scripts?

Re: AppleScript "Application isn't running" (-600) Errors

PostPosted: Sun Dec 20, 2015 9:51 pm
by matt (support)
Correct, I haven't heard of the problem ever occurring with embedded AppleScripts. Indigo handles the event dispatching directly to itself with embedded scripts, which apparently prevents the Mac OS bug from occurring.

Re: AppleScript "Application isn't running" (-600) Errors

PostPosted: Sat Dec 26, 2015 2:23 pm
by davinci
App Nap seems to not have any effect for me.

Edit: The issue was still present and my script restarted the Server sometimes up to ten times...
I now got rid of any scripts that depend on this functionality and use the HTTP API only.

Re: AppleScript "Application isn't running" (-600) Errors

PostPosted: Sun Apr 17, 2016 10:28 am
by matt (support)
I've updated the bottom of the first post in this thread with an additional tip that might be able to help get the Mac OS into a better state when the problem occurs.

Re: AppleScript "Application isn't running" (-600) Errors

PostPosted: Sun Apr 17, 2016 11:47 pm
by blueballsius
Just ran the sudo command and so far, so good for me. thanks!

Re: AppleScript "Application isn't running" (-600) Errors

PostPosted: Thu Nov 17, 2016 7:05 am
by McJohn
This problem arises also with an upgrade to Indigo 7.
(with another Mac which has n't had this problem before with Indigo 6).
All the other external Scripts (for example to do an Action in Indigo with a FaceTime AppleScript) are working perfectly, except the script to do an Indigo action.
(Mac OS 10.9.5)

Re: AppleScript "Application isn't running" (-600) Errors

PostPosted: Thu Nov 17, 2016 4:55 pm
by jay (support)
As mentioned in many other places on this forum, it's an AppleScript bug. Given recent announcements, don't expect it to ever get fixed.

Re: AppleScript "Application isn't running" (-600) Errors

PostPosted: Wed Dec 14, 2016 1:22 am
by mediabox
Wow. Thank you for this thread. I spent the last 2+ hours trying to figure out why my linked applescript all of a sudden stopped working after I made a small edit. I'm on 7.0.2 w/ El Capitan. I deleted my older 6.x copy from the /Library tree like Jay mentioned and seems better now. Thx.