Bug 509132

Summary: kdeconnect-cli --send-sms returns true when SMS sending fails
Product: [Applications] kdeconnect Reporter: Robert <robbak>
Component: messaging-applicationAssignee: Simon Redman <simon>
Status: RESOLVED FIXED    
Severity: normal CC: iamvijaysri2
Priority: NOR    
Version First Reported In: 25.08.0   
Target Milestone: ---   
Platform: FreeBSD Ports   
OS: FreeBSD   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Robert 2025-09-05 01:26:35 UTC
SUMMARY

When you try to send an SMS using the command line utility but the sending isn't possible, the utility still returns true. This makes it impossible to handle or report this failure when using kdeconnect-cli in scripts.

I understand that it may not be possible to report failure in all cases, but this happens in even trivial cases, such as when the device is no longer contactable, for instance, if it has been put into airplane mode.

Ideally, they kdeconnect app running on the phone should robustly determine whether the message has been sent delayed or failed, and return that information to the local kde daemon and utility allowing the utility to report this using messages to stderr and return values.

STEPS TO REPRODUCE

1. $ if kdeconnect-cli --send-sms "Test Message" --device [GUID] --destination [Number]; then echo "Success"; else echo "Failure"; fi
Success
(Message is successfully sent and received)
2. Enable airplane mode on phone
3. $ if kdeconnect-cli --send-sms "Test Message" --device [GUID] --destination [Number]; then echo "Success"; else echo "Failure"; fi
Success
(even though delivery is impossible and message isn't sent)

OBSERVED RESULT

Utility returns true (0) when message is not sent.

EXPECTED RESULT

Utility returns false(1) to indicate failure

SOFTWARE/OS VERSIONS

Operating System: FreeBSD 15.0
KDE Plasma Version: 6.4.4
KDE Frameworks Version: 6.17.0
Qt Version: 6.9.2
Kernel Version: 15.0-CURRENT (64-bit)
Graphics Platform: X11
Memory: 15.8 GiB of usable RAM
Graphics Processor: Intel� HD Graphics 630


ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2025-09-07 09:10:00 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/kdeconnect-android/-/merge_requests/554
Comment 2 Bug Janitor Service 2025-09-07 09:10:21 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/kdeconnect-kde/-/merge_requests/861
Comment 3 Vijay M 2025-09-07 09:18:58 UTC
Patches submitted:
- kdeconnect-android MR: https://invent.kde.org/network/kdeconnect-android/-/merge_requests/554
- kdeconnect-kde MR: https://invent.kde.org/network/kdeconnect-kde/-/merge_requests/861
These make `kdeconnect-cli --send-sms` fail fast when the phone cannot send SMS.