Bug 367937

Summary: Trusted devices randomly unpair after a short time period
Product: [Applications] kdeconnect Reporter: Luca Beltrame <lbeltrame>
Component: commonAssignee: Albert Vaca Cintora <albertvaka>
Status: RESOLVED FIXED    
Severity: normal CC: fabian
Priority: NOR    
Version First Reported In: 1.5   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Luca Beltrame 2016-08-28 20:48:40 UTC
I've been seeing this behavior only on one of my many machines, but I can reproduce this with both kdeconnect master and the recently released 1.0. What happens is that after a successful pair, the device will get unpaired again. This can occur when the phone goes into sleep mode.

Relevant logs from the kdeconnect daemon:

kdeconnect.core: Starting server ssl (I'm the client TCP socket)
kdeconnect.core: Socket succesfully stablished an SSL connection
kdeconnect.core: Socket succesfully stablished an SSL connection
kdeconnect.core: creating pairing handler for "28bec5450e1b955f"
Pairing package received! "{\"body\":{\"pair\":true,\"publicKey\":\ -- SNIP --
User accepts pairing
QObject::connect: No such signal QDBusAbstractInterface::messageReceived(QString,QString)
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
[ after some time ...]
kdeconnect.core: Starting server ssl (I'm the client TCP socket)
kdeconnect.core: Socket succesfully stablished an SSL connection
kdeconnect.core: Socket succesfully stablished an SSL connection
Pairing package received! "{\"body\":{\"pair\":false},\"id\":\"1472416824276\",\"payloadSize\":0,\"payloadTransferInfo\":{},\"type\":\"kdeconnect.pair\"}\n"
kdeconnect.core: Unpair request

The device being paired is a rooted Nexus 5X running Android 6. As I said before, I can't reproduce this on most of my machines: only my main desktop is affected. Wiping away the configuration has no effect. I'm also running the latest stable version on the phone from the Play Store.

Reproducible: Always

Steps to Reproduce:
See bug description.



My system is openSUSE Tumbleweed, running KF5 + Applications + Plasma from git master.
Comment 1 Fabian Vogt 2016-08-29 07:36:34 UTC
I experience the same issue after the kdeconnect android app updated to 1.0.
I did not update the desktop application as I only had Qt 5.5.1 available.
After the phone loses connection to the computer, they always have to be paired again.
Comment 2 Albert Vaca Cintora 2016-08-29 09:53:04 UTC
Git commit 9c40374b0091d928de9b427302d1700c9cfa61cb by Albert Vaca.
Committed on 29/08/2016 at 09:48.
Pushed by albertvaka into branch '1.x'.

Unpair only when there is no certificate

Unpairing on every error was a bit too aggressive.

M  +14   -9    src/org/kde/kdeconnect/Backends/LanBackend/LanLinkProvider.java
M  +6    -0    src/org/kde/kdeconnect/Helpers/SecurityHelpers/SslHelper.java

http://commits.kde.org/kdeconnect-android/9c40374b0091d928de9b427302d1700c9cfa61cb