-
Notifications
You must be signed in to change notification settings - Fork 54
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
Comments
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. Thanks in advance! |
Have you send an iMessage to that phone number using your Mac before? |
I'm sending it from my Mac, to my phone, in a simple Node.js script. Tryed the code interactively and from a .js file.
… On Dec 22, 2017, at 12:57 PM, Will Franzen ***@***.***> wrote:
Have you send an iMessage to that phone number using your Mac before?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#20 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAWlLgYNBPqTYSs2aqed5106AzPCcnU1ks5tC-2CgaJpZM4RGYBE>.
|
Try sending a message to your phone via your Mac with the built in Messages app before trying |
Yes. Works fine.
…Sent from my iPhone
On Dec 25, 2017, at 2:22 PM, Will Franzen ***@***.***> wrote:
Try sending a message to your phone via your Mac with the built in Messages app before trying osa-imessage
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Okay, now try |
Same error.
I literally copied the osa-imessage project folder (repo), ran npm install, then added a script called test.js.
then I execute: node test.js
$ cat test.js
const imessage = require('osa-imessage');
imessage.send('+3035206372', 'Hello World!')
$ node test.js
(node:23350) 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 '+3035206372' (-2700)
(node:23350) [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.
… On Dec 25, 2017, at 2:52 PM, Will Franzen ***@***.***> wrote:
Okay, now try osa-imessage
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#20 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAWlLlbpwljEiIaOmGcL69GE0uh-wr6Hks5tD_zjgaJpZM4RGYBE>.
|
Try including the country code on the phone number. ( |
That worked!
Thanks a bunch for your time and effort.
… On Dec 25, 2017, at 3:03 PM, Steve Johnson ***@***.***> wrote:
Same error.
I literally copied the osa-imessage project folder (repo), ran npm install, then added a script called test.js.
then I execute: node test.js
$ cat test.js
const imessage = require('osa-imessage');
imessage.send('+3035206372', 'Hello World!')
$ node test.js
(node:23350) 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 '+3035206372' (-2700)
(node:23350) [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.
> On Dec 25, 2017, at 2:52 PM, Will Franzen ***@***.*** ***@***.***>> wrote:
>
> Okay, now try osa-imessage
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub <#20 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAWlLlbpwljEiIaOmGcL69GE0uh-wr6Hks5tD_zjgaJpZM4RGYBE>.
>
|
Happy to help. Cheers |
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? |
using the example from the readme in file:
fails with this error:
svens-mbp:osa-test svenyonson$ node test.js
The text was updated successfully, but these errors were encountered: