문제

I have an Applescript that runs fine on my Macbook Retina but fails on a Mac Mini.

Both are running MacOS 10.9.2.

After peeling the onion a bit I'm able to reproduce the problem with a one-line Applescript:

tell application "MidiPipe" to activate

On the Mini that throws the error:

An error of type -10810 has occurred.

On the Macbook the MidiPipe application opens.

MidiPipe works normally on the Mini when started from the Finder or from Launchpad.

Google provides no insight into this error.

도움이 되었습니까?

해결책

Well, I found this: http://www.thexlab.com/faqs/error-10810.html and this: http://osxdaily.com/2010/02/09/mac-error-10810/ and this: http://forums.adobe.com/thread/1389805 . At least one of these suggests a RAM problem.

But just to make sure you've tried every weird variation, have you tried the following:

1) using a full path:

tell application "Full:Path:To:MidiPipe.app" --(probably "YourHDName:Applications:MidiPipe.app"?

2) using an actual tell block:

tell application "MidiPipe"--or full path
 activate
end tell

3) using the Finder:

tell application "Finder" to open "Full:Path:To:MidiPipe.app"

4) using shell: do shell script "open /Applications/MidiPipe.app"

?

다른 팁

After looking at the links in CRGreen's answer, it looks like this is likely being caused by the process table being full on the mini. This, in turn, prevents any new applications from opening. According to The X Lab:

Error -10810 is a Launch Services result code indicating an unknown error. One cause of this error is that the Mac® OS X process table is full. When the process table is full, new (not currently running) applications cannot be opened until another running application ends. Programming errors in third-party applications can fill-up the process table, leading to the -10810 error when opening an application.

I would start by restarting the mini to see if that clears the process table, allowing you to to start MidiPipe.

If that doesn't work, you should look at your Activity Monitor to see if there is a specific program filling up your process table.

Could be nothing more than another mysterious grieving crap from Apple.

Today I have faced this myself, first time after using four different Mac Minis as build servers for Continuous Integration of Mobile apps for about two years or so.

My Jenkins runs the osascript from the bash script to build the app.

A few days ago the office experienced the power outage and all Macs went down. After powering them back on I have got this error at osascript execution on one of my Macs.

I have tried just to re-build - with the same result.

First thing I stumbled upon was https://jacobsalmela.com/2014/08/04/infamous-execution-error-error-type-10810-occurred-10810/ , but none of them applied to me.

Then I googled more general 10810 issue occurrences and went through couple of questions here on SO.

Still no luck.

Next I reached to the server via SSH using PuTTY and tried telling Terminal to do the very basic script like

 osascript -e 'tell application "Terminal"
 activate
 tell window 1
 do script "counter=0; while true; do if [ \"$counter\" -gt \"10\" ]; then
     break; else counter=$((counter + 1)); sleep 1; fi; done; exit;"
 end tell
 end tell'

This worked fine.

Then I tried to run the whole bash script that Jenkins used to execute. Everything went just perfect and the app was uploaded to HockeyApp as the result.

I came with the thought that the issue is that Jenkins runs it remotely on that Mac and finally I have tried just to re-build again and it magically worked fine this time.

No idea what it was, but since then I have performed three or more builds already and all of them were successful.

Note I haven't changed anything, and my script:

1) never used a full path;

2) always used an actual tell block;

3,4) nothing like that from the accepted answer was ever used.

So... Go away mysterious grieving crap! Go away! :)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top