Describe the bug
Cannot pair to a phone running SailfishOS.
Steps To Reproduce:
Expected behavior
I should be able to pair my devices.
Screenshots

Support Log
GSConnect Version: 34
GSConnect Install: user
GJS: 16400
XDG_SESSION_TYPE: x11
GDMSESSION: gnome-xorg
--------------------------------------------------------------------------------
-- Logs begin at Sun 2019-12-29 17:40:04 CET, end at Tue 2020-03-10 20:17:53 CET. --
mar 10 20:17:17 gjs[7997]: Unable to retrieve object 'lan-radio' from class template for type 'GSConnectConnectDialog' while building a 'GSConnectConnectDialog'
mar 10 20:17:53 org.gnome.Shell.Extensions.GSConnect[7957]: [/service/protocol/lan.js:broadcast:385]: "Broadcasting to LAN"
mar 10 20:17:53 org.gnome.Shell.Extensions.GSConnect[7957]: [/service/protocol/lan.js:accept:735]: "lan://192.168.1.189:1716 (804d5c95-3dd9-4776-bc9b-cc062bd399e2)"
mar 10 20:17:53 org.gnome.Shell.Extensions.GSConnect[7957]: [/service/protocol/lan.js:close:771]: "lan://192.168.1.189:1716 (804d5c95-3dd9-4776-bc9b-cc062bd399e2)"
mar 10 20:17:53 org.gnome.Shell.Extensions.GSConnect[7957]: [/service/protocol/lan.js:_handshake/</<:557]: Error performing TLS handshake: A packet with illegal or unsupported version was received.
_handshake/</<@/home/david/.local/share/gnome-shell/extensions/[email protected]/service/protocol/lan.js:557:44
@/home/david/.local/share/gnome-shell/extensions/[email protected]/service/daemon.js:1128:17
System Details (please complete the following information):
uname -a: Linux daweed 5.5.8-arch1-1 #1 SMP PREEMPT Fri, 06 Mar 2020 00:57:33 +0000 x86_64 GNU/LinuxGSConnect environment (if applicable):
Additional Notes:
I've opened ports 1716-1764 tcp/udp in my firewall settings
It looks like the Sailfish OS app forces TLS v1.0:
// Configure for ssl
QSslConfiguration sslConfig;
sslConfig.setCiphers(socketCiphers);
sslConfig.setProtocol(QSsl::TlsV1_0);
Since GLib 2.42.1, SSL 3.0 is no longer supported. See: https://developer.gnome.org/gio/stable/GTlsClientConnection.html#g-tls-client-connection-set-use-ssl3
You should open an upstream issue in R1tschY/harbour-sailfishconnect to have this fixed.
cc @R1tschY
Thank you for your investigation. I created a issue and will soon fix it.
@R1tschY I've updated the app to 0.5.1-1 (from openrepos) and I still can't connect
GSConnect Version: 34
GSConnect Install: user
GJS: 16400
XDG_SESSION_TYPE: x11
GDMSESSION: gnome-xorg
--------------------------------------------------------------------------------
-- Logs begin at Sun 2019-12-29 20:05:04 CET, end at Sun 2020-03-22 04:13:24 CET. --
mar 22 04:13:12 gjs[2503]: JS WARNING: [/home/david/.local/share/gnome-shell/extensions/[email protected]/service/protocol/lan.js 710]: reference to undefined property "GSocketOutputStream"
mar 22 04:13:12 gjs[2503]: JS ERROR: Gio.TlsError: Error performing TLS handshake: A disallowed SNI server name has been received.
_handshake/</<@/home/david/.local/share/gnome-shell/extensions/[email protected]/service/protocol/lan.js:557:44
@/home/david/.local/share/gnome-shell/extensions/[email protected]/service/daemon.js:1128:17
mar 22 04:13:14 gjs[2503]: JS ERROR: Gio.TlsError: Error performing TLS handshake: A disallowed SNI server name has been received.
_handshake/</<@/home/david/.local/share/gnome-shell/extensions/[email protected]/service/protocol/lan.js:557:44
@/home/david/.local/share/gnome-shell/extensions/[email protected]/service/daemon.js:1128:17
mar 22 04:13:19 gjs[2503]: JS ERROR: Gio.TlsError: Error performing TLS handshake: A disallowed SNI server name has been received.
_handshake/</<@/home/david/.local/share/gnome-shell/extensions/[email protected]/service/protocol/lan.js:557:44
@/home/david/.local/share/gnome-shell/extensions/[email protected]/service/daemon.js:1128:17
mar 22 04:13:24 org.gnome.Shell.Extensions.GSConnect[2503]: [/service/protocol/lan.js:broadcast:385]: "Broadcasting to LAN"
Hmm, you aren't running GSConnect in a virtual machine are you?
If not, by my reading, Sailfish's certificate verification is effectively the same as KDE Connect. glib-networking still doesn't support SNI, but this really shouldn't be an issue unless there's some kind of redirect happening on the network.
Oh nevermind I was dumb I forgot to save the firewall from runtime to permanent configuration and rebooted in between. And no, I'm not running anything in a VM, but there's a different issue now: when I click pair my sailfish connect app gives me a pairing request notification, but it won't pair. The generated support log is empty. Tapping on my PC does nothing. My laptop was paired with the regular KDE desktop app a while ago.

The generated support log is empty.
To be clear, because a lot of people miss this, you have to leave the generate support dialog open while trying to log a problem. There should at least be a pair packet in the log if it was received correctly.
Because of many (erroneous) claims about leaking private information, debugging messages are only printed when the dialog is open.
GSConnect Version: 34
GSConnect Install: user
GJS: 16400
XDG_SESSION_TYPE: x11
GDMSESSION: gnome-xorg
--------------------------------------------------------------------------------
-- Logs begin at Sun 2019-12-29 20:05:04 CET, end at Sun 2020-03-22 22:45:45 CET. --
mar 22 22:45:07 gnome-shell[1762]: Window manager warning: MetaSyncRing: We should never wait for a sync -- add more syncs?
mar 22 22:45:11 gnome-shell[1762]: Window manager warning: Invalid WM_TRANSIENT_FOR window 0xc600008 specified for 0xc60016a.
mar 22 22:45:12 gnome-shell[1762]: Could not create transient scope for PID 2286636: GDBus.Error:org.freedesktop.DBus.Error.UnixProcessIdUnknown: Process with ID 2286636 does not exist.
mar 22 22:45:13 gnome-shell[2286653]: X Error of failed request: BadWindow (invalid Window parameter)
mar 22 22:45:13 gnome-shell[2286653]: Major opcode of failed request: 18 (X_ChangeProperty)
mar 22 22:45:13 gnome-shell[2286653]: Resource id in failed request: 0xc60016a
mar 22 22:45:13 gnome-shell[2286653]: Serial number of failed request: 13
mar 22 22:45:13 gnome-shell[2286653]: Current serial number in output stream: 15
mar 22 22:45:13 gnome-shell[1762]: Could not create transient scope for PID 2286653: GDBus.Error:org.freedesktop.DBus.Error.UnixProcessIdUnknown: Process with ID 2286653 does not exist.
mar 22 22:45:22 gnome-shell[1762]: Window manager warning: MetaSyncRing: We should never wait for a sync -- add more syncs?
mar 22 22:45:32 org.gnome.Shell.Extensions.GSConnect[2503]: [/service/protocol/lan.js:broadcast:385]: "Broadcasting to LAN"
mar 22 22:45:37 org.gnome.Shell.Extensions.GSConnect[2503]: [/service/protocol/lan.js:broadcast:385]: "Broadcasting to LAN"
mar 22 22:45:42 org.gnome.Shell.Extensions.GSConnect[2503]: [/service/protocol/lan.js:broadcast:385]: "Broadcasting to LAN"
mar 22 22:45:42 org.gnome.Shell.Extensions.GSConnect[2503]: [/service/protocol/lan.js:accept:735]: "lan://192.168.1.189:1716 (ad2cfa98-7ed1-469e-abac-dd53687960c6)"
mar 22 22:45:42 org.gnome.Shell.Extensions.GSConnect[2503]: [/service/daemon.js:_ensureDevice:169]: "Adding Bruh"
mar 22 22:45:42 org.gnome.Shell.Extensions.GSConnect[2503]: [/service/device.js:_setConnected:320]: "Connected to Bruh (_7f4a4a9a_dc09_4344_95f8_5d9ecf4821fd_)"
mar 22 22:45:42 dbus-daemon[583]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.16724' (uid=1000 pid=2286774 comm="gjs /home/david/.local/share/gnome-shell/extension")
mar 22 22:45:42 systemd[1]: Starting Hostname Service...
mar 22 22:45:42 dbus-daemon[583]: [system] Successfully activated service 'org.freedesktop.hostname1'
mar 22 22:45:42 systemd[1]: Started Hostname Service.
mar 22 22:45:42 audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-hostnamed comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 22 22:45:42 kernel: audit: type=1130 audit(1584913542.797:947): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-hostnamed comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
mar 22 22:45:45 org.gnome.Shell.Extensions.GSConnect[2503]: [/service/protocol/core.js:send:344]: Bruh: {
"id": 1584913545127,
"type": "kdeconnect.pair",
"body": {
"pair": true
}
}
Holy crap! Thanks, new GitHub Android app! Instead of _replying to_ @psrcek I somehow managed to EDIT their message! Wow, not cool.
Restored from the edit history, so at least there's that safety net. Still, apologies, no _idea_ how that happened.
Is there no response packet from the Sailfish device? The side requesting the pair should send one of those, and the accepting side should send back basically the same packet.
Did you initiate this from GSConnect or Sailfish?
Initiated it from GSConnect. Initiating from Sailfish does literally nothing.
I could start up wireshark or burp suite or somethning if that helps?
This is starting to sound like another firewall problem. Are you sure you have ports 1716 & 1739-1764 open for TCP & UDP?


This is true for Sailfish as well? It seems like your phone is receiving pair requests fine, but GSConnect is not receiving anything in response.
I have no firewall on sailfish. Or at least I'm not aware of one...
Hmm, not sure what to say then. GSConnect isn't logging any errors and nothing has changed in that code path for a long time. As far as I know, that's also true of the Sailfish app.
You may have to debug the Sailfish app or check with a tool like wireshark to see if something is blocking packets on the network.
hehe.. I found my problem. A system update fixed it.. thanks a lot for your help though! 10/10 tech support! :tada:
Holy crap! Thanks, new GitHub Android app! Instead of _replying to_ @psrcek I somehow managed to EDIT their message! Wow, not cool.
Restored from the edit history, so at least there's that safety net. Still, apologies, no _idea_ how that happened.
(That happened to me a _second_ time, BTW! I have since uninstalled that broken piece of... app. Avoid with extreme prejudice, at least until they work the bugs out. Their mobile web interface is better anyway, using Chrome for Android. For instance, the web editor can autocomplete @-mentions, even on my phone, a feature inexplicably missing from the dedicated Android app.)