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

Unable to send text #20

Closed
svenyonson opened this issue Dec 19, 2017 · 11 comments
Closed

Unable to send text #20

svenyonson opened this issue Dec 19, 2017 · 11 comments

Comments

@svenyonson
Copy link

svenyonson commented Dec 19, 2017

using the example from the readme in file:

const imessage = require('osa-imessage');
imessage.send('+<mycellnumber>', 'Hello World!')

fails with this error:

svens-mbp:osa-test svenyonson$ node test.js

(node:21987) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 
1): Error: Command failed: /usr/bin/osascript -l JavaScript
445:509: execution error: Error on line 19: Error: no thread with handle '+<mycellnumber>' (-2700)

(node:21987) [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.
@KarinaFernandez
Copy link

Hi @svenyonson ! I tried to send a message without success too, but I think that my problem is that I am executing it at anywhere.
Could you please tell me where are you running the command imessage.send('+<mycellnumber>', 'Hello World!')?

Thanks in advance!

@wtfaremyinitials
Copy link
Owner

Have you send an iMessage to that phone number using your Mac before?

@svenyonson
Copy link
Author

svenyonson commented Dec 22, 2017 via email

@wtfaremyinitials
Copy link
Owner

Try sending a message to your phone via your Mac with the built in Messages app before trying osa-imessage

@svenyonson
Copy link
Author

svenyonson commented Dec 25, 2017 via email

@wtfaremyinitials
Copy link
Owner

Okay, now try osa-imessage

@svenyonson
Copy link
Author

svenyonson commented Dec 25, 2017 via email

@wtfaremyinitials
Copy link
Owner

wtfaremyinitials commented Dec 25, 2017

Try including the country code on the phone number. (+1303520****)

@svenyonson
Copy link
Author

svenyonson commented Dec 25, 2017 via email

@wtfaremyinitials
Copy link
Owner

Happy to help. Cheers

@enzotrompeneers
Copy link

I can only send a message when I interacted with the phone number before by Imessage mac/iphone. It doesn't send if there is no chat active with that person. Any ideas on that?

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

No branches or pull requests

4 participants