question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error sending SMS via AppleScript

See original GitHub issue

See the error message here: https://controlc.com/21f386c1

Issue created by BlueBubbles Bot in the BlueBubbles commnity on behalf of @zach in #support.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
conlankcommented, Jan 16, 2021

I did some further digging and found the issue with the fallback script.

original bluebubbles script

tell application \"Messages\"
	set targetChat to a reference to chat id \"SMS;-;+15555555555\"
	send \"Are you there?\" to targetChat 
end tell

– error gives "Can’t get chat id … (-1728) "

fallback bluebubbles script

tell application \"Messages\"
	set targetService to 1st service whose service type = SMS
	set targetBuddy to buddy \"+15555555555\" of targetService
	send \"Are you there?\" to targetBuddy 
end tell

– gives variable SMS is not defined

working script if run from terminal could be used for fallback

tell application "Messages"
	set targetService to 1st service whose service type = iMessage
	set targetBuddy to buddy \”+15555555555\” of service \"SMS\"
	send \”Are you there?\” to targetBuddy
end tell
0reactions
conlankcommented, Jan 17, 2021

That script doesn’t work on Big Sur anyways (at least as far as I can tell with screwing around with permissions for 20ish minutes). That second script was intended to add starting new conversations for big sur.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Simple AppleScript to send SMS by Messages app fails with ...
Try: tell application "Messages" launch repeat while (count of windows) is 0 end repeat set a to first account whose service type =...
Read more >
Sending messages from terminal | Apple Developer Forums
Hi, Thanks for help but now the messages are send as iMessage - they are blu and not green and not going to...
Read more >
How to send a Text Message with AppleScript - CubeMG
The first thing that you have to do is open iMessage and message the number that you want to send the text message...
Read more >
Applescript to send SMS (text) message when it receive an ...
Applescript to send SMS (text) message when it receive an email on my office outlook. - smsme.scpt.
Read more >
mail.app - Apple Script not running as expected - Ask Different
The email I sent later on contained the message "#tech sxi" but the script is not showing the correct output for this email....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found