Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant send messages on macOS (14.2.0) #31

Open
trevoroleary opened this issue Nov 27, 2020 · 3 comments · May be fixed by #33
Open

Cant send messages on macOS (14.2.0) #31

trevoroleary opened this issue Nov 27, 2020 · 3 comments · May be fixed by #33

Comments

@trevoroleary
Copy link

I was using apple script to send messages before this but those scripts are seemingly broken as well. Anybody know what might have changed? This is the error I got when running the echo.js (I censored the phone number)

(node:29344) UnhandledPromiseRejectionWarning: Error: Command failed: /usr/bin/osascript -l JavaScript
execution error: Error: Error: no thread with handle '+14xxxxxxxx1' (-2700)

    at ChildProcess.exithandler (child_process.js:308:12)
    at ChildProcess.emit (events.js:314:20)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
(node:29344) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:29344) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
@3DJakob
Copy link

3DJakob commented Jan 19, 2021

I got the same problem! Any fix yet?

@wtfaremyinitials
Copy link
Owner

It looks like Apple may have (un?)intentionally broken that API. I’ll see what I can do

@RandallKent
Copy link

A couple of observations:

  1. Access to ~/Library/Messages/ has been restricted in Catalina (blog)
  2. buddies have become participants

Screen Shot 2021-02-21 at 11 18 52 y1KFOlLQ-62hvuicj-9Aq0T3VE

I was able to get echo.js to work by granting access to ~/Library/Messages/ and changing index.js:104 from

target = Messages.buddies.whose({ handle: handle })[0]

to

target = Messages.participants.whose({ handle: handle })[0]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants