I have pretty successfully used EPPC commands for several years to control my music server in another room from my desktop iMac.
All of sudden, this has stopped working for me almost entirely. My scripts with EPPC commands will no longer even compile, and simply give me a Syntax Error saying, āApplication isnāt runningā, regardless of which app I specify (and the apps ARE running, I can see that on the remote machine.)
I havenāt changed a thing about my wiring or telecommunications setup. The problem did start to manifest after a recent Mavericks security update on both machines. I have tried every form of computer and router reset I can think of, but the problem persists. The computers ARE connected, file and screen sharing work fine.
Most of my scripts are of the form:
try
tell application "Keyboard Maestro Engine" of machine "eppc://myusername:mypassword@my-machine-name.local"
do script "Amplifier Volume Down"
end tell
end try
Any help or useful suggestions would be tremendously appreciated!!
(My OS version is 10.9.5, which doesnāt seem to be an option in the pull-down)
Model: 2.7 GHz Intel Core i5
AppleScript: 2.6.1
Browser: Chrome Version 41.0.2272.89
Operating System: Mac OS X (10.8)
Well, that is definitely a useful command that I didnāt know about before. But it doesnāt seem to help.
If I run it as just āChoose Applicationā it comes up with the full list of local applications (on either machine I do it on.)
If I run it as āChoose Remote Applicationā, it comes up with a blank list of applications for either of the two machines it finds (my desktop iMac and my Mac Mini music server.)
Is there something I need to do (other than allowing Remote Apple Events) to permit Applescript to āseeā applications running remotely?
Thank you for that info, Mouramartins! That definitely makes it seem more likely that itās something Apple did, and not something broken in any part of my setup.
Yes it seems like that. Iām surprised that there arenāt more complaints.
I have a similar set-up, except the wurlitzer is a PowerPC. The Mavericks side sees all the apps running there, so my problem is not a problem. Yet.
I went through the error logs and found nothing. Now the pain of re-installing, testing, re-upgradingā¦
Iāve never used choose remote application because Iām checking always the remote application from the local host. The process element of System Events is available ā but not documented ā also from the Finder. And the Finder is the only scriptable application which is running permanently on every Mac.
Thanks StefanK, but that script still doesnāt work for me. After I got a couple of authentication issues ironed out, it still throws an error -600, application not running error.
Iāve encountered this in the past, and rebooting the target machine always fixed it. But not today.
My setup is 6 web servers that use AppleScript to process the access logs (rolled nightly at midnight) and send the pertinent data to an application (Helix Server) on āmachine #7.ā Every night launchd faithfully triggers the script on each machine. This all works quite well, with just a few occasional hiccups.
But yesterday I had a power outage when a UPS overloaded (donāt ask), and "machine #7āā went down. It rebooted OK when power was restored, but today I noticed that all but one of the remote machines was unable to contact the target machine. The console error reads āCFNetwork SSLHandshake failed (-4)ā and running the script manually returns the āApplication isnāt running (-600)ā error.
(Itās really odd to me that one of the machines is still able to establish contact. All the rest can not and they all return the same -600 error.)
Trying to debug this, I fired up Script Debugger and created a simple āchoose remote applicationā script. When I run this, the target machine (running Mountain Lion Server, BTW) shows either no applications or a bit of garbage text.
So it seems that something is now corrupted on the target machine. Iāve tried rebooting a few times, Iāve tried a turn āRemote Apple eventsā off/reboot/turn āRemote Apple eventsā on sequence, Iāve tried switching the āAllow access forā switch to āAll users,ā and Iāve tried clearing out the allowed users list and rebuilding it. Nothing is fixing it.
Next up is to run Disk Utility and see if that fixes anything. If that doesnāt help, Iāll clear out some caches and maybe think about upgrading it to Mavericks or Yosemite.
Sometimes it helps to clean out the system caches, when things errs mystically, It might not help in your cases, but at least it wonāt hurt. You can use a tool such as Onyx, to clean them out, (you need to reboot right afterwards, so that the system can rebuild the caches.)
Well, that was the only shot I had for you really, as eppc events arenāt really my cup of tea.
I apologize if those questions sound stupid, but have you looked at the Console.app, while you are running the scripts that tries to start up things, Iād especially look for firewall and or ipfw entries. But Iād rather go through every error thrown, also things that may seem unrelated, like Dyld errors. Iād also go through the settings in the appfirewall from the preferences pane, but I donāt know exactly what Iād look for there.
Just out of curiosity, are both machines language settings set to English? Is the applicationās bundle name localized like messages.app? When using remote events I address remote application by the localized bundle name rather than the actual application name. I think Yosemite automatically corrects this, at least it did for me when I had Yosemite. But if your system language is set to English or the applicationās bundle name is not localized you donāt have to look into this.
I am wondering about one more thing, and Iām sorry if this is a stupid question, but what kind of answer do you get when you ping the remote address and port?
I discovered another breakdown today, with a different pair of machines doing a different function. Between the two (first one described above) I think I know what the problem is: Security Update 2015-002 (https://support.apple.com/en-us/HT204413) includes a fix for the āFREAKā exploit:
Iām convinced this is what broke it, because Iāve run some tests on various machines here, and have found that as long as the machines are 10.7.x or lower, there is no error. But if either of the machines is 10.8.5 or higher, it fails. I guess the eppc protocol uses āephemeral RSA keys.ā
The AppleScript error (-600: Application not running) isnāt very helpful, but the one captured in Console (-4: CFNetwork SSLHandshake failed) is what has me convinced that Security Update 2015-002 is the culprit.
I proved it (to myself at least) by testing on a friendās machine (running 10.9.5) where the Security Update is not yet installed. Hereās how you can confirm it with a single machine:
tell application "Finder" of machine "eppc://127.0.0.1" to activate
Run thatā¦
with Remote Apple Events turned off: error āRemote access not allowedā
with Remote Apple Events turned on and:
Security Update installed: error āApplication not runningā
Security Update not installed: Finder activates (no error)
That seems pretty conclusive to me. Anybody got a data point to refute it?