Bug 503288 - Android app is still very flaky with connecting to computer
Summary: Android app is still very flaky with connecting to computer
Status: REPORTED
Alias: None
Product: kdeconnect
Classification: Applications
Component: common (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Albert Vaca Cintora
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-24 13:17 UTC by Nate Graham
Modified: 2025-04-24 13:17 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2025-04-24 13:17:48 UTC
I previously had an issue whereby the phone and computer would briefly see each other and then disappear, meaning they couldn't connect: Bug 502427. This got fixed in version 1.33 of the Android app, and then I was able to pair them!

However since then, the connection is extremely flaky. I'd say that the two devices can see one another maybe 10% of the time, and it feels very random.

I debugged this locally with Kristen McWilliam. Here were her conclusions, which will hopefully be useful to a person smarter than me:


kdeconnectd receives a UDP packet with `LanLinkProvider::udpBroadcastReceived` from the Android app. Looks like `LanLinkProvider::connectError` tries to make a fallback connection but fails.

```
[ 15:06:41.960 ] kdeconnect.core: LanLinkProvider::udpBroadcastReceived 284: Datagram  {"id":1745500002554,"type":"kdeconnect.identity","body":{"deviceId":"6de7082082df46769a00928a13601293","deviceName":"SM-G970U1","protocolVersion":8,"deviceType":"phone","incomingCapabilities":["kdeconnect.battery","kdeconnect.bigscreen.stt","kdeconnect.clipboard","kdeconnect.clipboard.connect","kdeconnect.contacts.request_all_uids_timestamps","kdeconnect.contacts.request_vcards_by_uid","kdeconnect.findmyphone.request","kdeconnect.mousepad.keyboardstate","kdeconnect.mousepad.request","kdeconnect.mpris","kdeconnect.mpris.request","kdeconnect.notification.request","kdeconnect.notification.reply","kdeconnect.notification.action","kdeconnect.ping","kdeconnect.notification","kdeconnect.runcommand","kdeconnect.sms.request","kdeconnect.telephony.request","kdeconnect.sms.request_conversations","kdeconnect.sms.request_conversation","kdeconnect.sms.request_attachment","kdeconnect.sftp.request","kdeconnect.share.request","kdeconnect.share.request.update","kdeconnect.systemvolume","kdeconnect.telephony.request_mute"],"outgoingCapabilities":["kdeconnect.battery","kdeconnect.mousepad.request","kdeconnect.bigscreen.stt","kdeconnect.clipboard","kdeconnect.clipboard.connect","kdeconnect.connectivity_report","kdeconnect.contacts.response_uids_timestamps","kdeconnect.contacts.response_vcards","kdeconnect.findmyphone.request","kdeconnect.mpris.request","kdeconnect.mpris","kdeconnect.notification","kdeconnect.ping","kdeconnect.presenter","kdeconnect.notification.request","kdeconnect.mousepad.echo","kdeconnect.mousepad.keyboardstate","kdeconnect.runcommand.request","kdeconnect.sms.messages","kdeconnect.sms.attachment_file","kdeconnect.sftp","kdeconnect.share.request","kdeconnect.systemvolume.request","kdeconnect.telephony"],"tcpPort":1716}}
```

```
[ 15:06:41.960 ] kdeconnect.core: LanLinkProvider::udpBroadcastReceived 332: Received Udp identity packet from QHostAddress("::ffff:100.64.0.153")  asking for a tcp connection on port  1716
[ 15:06:48.144 ] kdeconnect.core: LanLinkProvider::connectError 360: Socket error QAbstractSocket::NetworkError
[ 15:06:48.144 ] kdeconnect.core: LanLinkProvider::connectError 361: Fallback (1), try reverse connection (send udp packet) "Host unreachable"
```