Step to reproduce: 1. pair PC with android device 2. run kdeconnect -l several times 3. the android apps would say "Device not paired" kdeconnect -l also cause connected device to disconnect, not sure if it's the same problem.
Possibly related lines in log: kdeconnect.core: Starting client ssl (but I'm the server TCP socket) kdeconnect.core: Failing due to ("The host name did not match any of the valid hosts for this certificate")
Seems like, the CN= field in the certificate is different from the device ID. Actually, that CN is the same as the device ID my phone used to have (I wiped my phone and the ID changed).
This problem persists after I remove ~/.config/kdeconnect
This problem goes away after clear data on the Android side. So probably the Android app is sending conflicting device IDs? Maybe kdeconnect should reject pair requests like this?
I guess two changes are needed: 1. verify the CN in certificate sent by the device 2. on android, detect device id changes (happens after user wipe the device and restore apps from backup)
Fixed in https://invent.kde.org/network/kdeconnect-android/-/merge_requests/326