AppleEvents errors in 10.13

I'm the developer of SmashTunes (an app to control iTunes and Spotify). Since the latest beta of 10.13, I'm seeing a lot of errors being logged:


10759711: Error #17  (os/kern) invalid right attempting to add send right to port ( port:33051/0x811b rcv:1,send:0,d:0 limit:5).
AppleEvents: received mach msg which wasn't complex type as expected in getMemoryReference.


SmashTunes use ScriptingBridge for its communication with iTunes and Spotify. I'm suspecting this may have to do something with my entitlements file (which I think should be correct). The "funny" thing is, that the app is still functioning correctly (although a bit slow). So, the AppleScript is correclty executed by both Spotify and iTunes.


Anyone seen this before?

Replies

Still no changes with Version 10.13.1 Beta (17B42a) :/

And still also broken in the final. Anyone ever going to look into this from engineering:(?

Heard of any progress on this lately?

Any updates to the bug?

Hi Eskimo,


Is there any update on this issue? I'm running 10.13.3 beta and I'm experiencing seemingly the same issue.


Thanks

There’s a bunch of different issues in play here but the specific issue being tracked by the bug mentioned earlier (r. 34634383) was reported fixed in 10.13.2.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

For me the problem did not go away as well. The bug I filed was 34691166, it was marked as a duplicate of another bug, that hat now been closed. That's all the information I got. Looks like you've got more information, Eskimo. It's a pity the system is this closed.


In this case the issue clearly isn't "Fixed", at least not in 10.13.2, I'll see If I can reopen my issue... Or maybe, it was not a duplicate of 34634383. Impossible to tell.

For me the same thing happens. I make a simple Apple Script call inside a Swift application.

So this issue is not fixed.

As I mentioned earlier, there’s a bunch of different issues in play here, more than I can reasonably deal with in this context. If you’d like me to look at your specific issue in detail, I recommend that you open a DTS tech support incident, which will allow me to spend more time on it.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Maybe I will file a DTS tech support issue, but what I find odd is, that issues are marked as duplicates of each other while appently there are "a bunch of different issues in play". That does not make sense.

That does not make sense.

I agree that this is confusing. Alas, a DevForums thread doesn’t afford me the time required to untangle this )-:

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Hi,


Has there been any progress on this issue?


I just tried to create a new project as an Autiomation action and have not been able to get it to interpret the input correctly. It is as the original poster described with errors logging:

Automator[45534:9069203] AppleEvents: received mach msg which wasn't complex type as expected in getMemoryReference.)

Also, I can log the input and it shows the input as an NSAppleEventDescriptor and the input appears to be correct but it is not converted into a usual object (just the serialized version). Is there anyway to coerce the object into a usual form through applescript? Nothing I have tried (and I have been trying for 24 hours) has worked. In this case, I am simply passing in messages from mail and trying to iterate the list. The input is logged as:

<NSAppleEventDescriptor: [ 'obj '{ 'want':'mssg', 'form':'ID ', 'seld':201434, 'from':'obj '{ 'want':'mbxp', 'form':'name', 'seld':'utxt'("[Gmail]/All Mail"), 'from':'obj '{ 'want':'mact', 'form':'ID ', 'seld':'utxt'("A91404CC-52AA-44EB-8370-29EDC2FF1E90"), 'from':[0x0,955955 "Mail"] } } } ]>

I can get the applescript to run through the Automation app, just can't get any input to process when created through Xcode. It's as if the scripting bridge is broken.


Thanks,

Jaime

I don't know about the kern issue, but I get the "AppleEvents: received mach msg which wasn't complex type as expected in getMemoryReference" warning simply running a trivial script in osascript in the Terminal:


tell application "Preview"

path of document 1 of window 1

end tell


I have reported this as radar 37809535, though I expect it will just get marked as a duplicate.

I'm seeing this in 10.13.3 with Xcode 9.2.


Not a currently shipping app, but a work-in-progress. I'm running an NSAppleScript off a timer. Performance seems to be OK, but not keen to go into production with this if it's going to fill the Console with log messages in this way. 😟

So I searched on this message and found this topic.


I'm running Xcode 9.3 and latest MacOS 10.13.4. I have this little program to get the path of a specific project in Xcode:


tell application "Xcode"
  set docs to every workspace document
  repeat with doc in docs
    set str to name of doc as string
    if str is "MyWorkspace.xcworkspace" then
      set thePath to path of doc
      log thePath as string
    exit repeat
    end if
  end repeat
end tell


Now, I can run this with each line placed in an osascript command (with -e, one per line). Works fine. Also works find in Script Debuffer. But if I add this to my Swift Command Line program, I get that dreaded message, and the path of the project is not output.


I'm using Process() to run /usr/bin/osascript, and capturing both stdOut and stdError - the stdErr is filled with lines just containing the "msg":


osascript[26983:1214821] AppleEvents: received mach msg which wasn't complex type as expected in getMemoryReference.