CamHenlin / imessageclient

send and receive iMessages in a terminal or over ssh
866 stars 50 forks source link

Crash/error when sending iMessage on OS X 10.10.2 #4

Closed tdlm closed 9 years ago

tdlm commented 9 years ago

The UI loaded just fine, I tabbed between names and the textbox a few times, then typed a message and hit enter. Immediately after, it crashed.

Using OS X 10.10.2 and iTerm2 Build 2.0.0.20141103.

➜  imessageclient git:(master) node app
we have a file to monitor!
14
Error: /Users/scott/imessageclient/sendmessage_single.AppleScript:147:159: execution error: System Events got an error: Can’t get process "Messages". (-1728)

    at ChildProcess.<anonymous> (/Users/scott/imessageclient/node_modules/applescript/lib/applescript.js:54:13)
    at ChildProcess.emit (events.js:98:17)
    at Process.ChildProcess._handle.onexit (child_process.js:820:12)
CamHenlin commented 9 years ago

Looks like AppleScript can't find Messages.app. You have to have Messages.app open and be signed in to iMessages

nighthawk24 commented 9 years ago

^ + Allow Terminal.app to control your computer via System Preferences > Privacy > Accessibility. This is not a good idea for security reasons.

And every time a message is sent, Messages.app is brought in focus and the entered message is viewed in the text field while being sent. such hack.