Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot pair to Sailfish OS #784

Closed
davidpanic opened this issue Mar 10, 2020 · 18 comments
Closed

Cannot pair to Sailfish OS #784

davidpanic opened this issue Mar 10, 2020 · 18 comments
Labels
can't fix An issue that is out-of-scope or expected behaviour upstream KDE Connect, Android or supporting library

Comments

@davidpanic
Copy link

Describe the bug

Cannot pair to a phone running SailfishOS.

Steps To Reproduce:

  1. Open the extension settings
  2. Observe no devices
  3. Open the sailfish connect app
  4. Observe no devices

Expected behavior

I should be able to pair my devices.

Screenshots

image

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/gsconnect@andyholmes.github.io/service/protocol/lan.js:557:44
                                                            @/home/david/.local/share/gnome-shell/extensions/gsconnect@andyholmes.github.io/service/daemon.js:1128:17

System Details (please complete the following information):

  • GSConnect version: 34
    • Installed from: Gnome extensions website
  • GNOME/Shell version: 3.35.91
  • Distro/Release: Arch linux, uname -a: Linux daweed 5.5.8-arch1-1 #1 SMP PREEMPT Fri, 06 Mar 2020 00:57:33 +0000 x86_64 GNU/Linux

GSConnect environment (if applicable):

  • Paired Device(s): Cannot pair
  • KDE Connect app version: Sailfish Connect version 0.5-1
  • Plugin(s): none

Additional Notes:

I've opened ports 1716-1764 tcp/udp in my firewall settings

@andyholmes
Copy link
Collaborator

andyholmes commented Mar 10, 2020

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

@andyholmes andyholmes added can't fix An issue that is out-of-scope or expected behaviour upstream KDE Connect, Android or supporting library labels Mar 10, 2020
@R1tschY
Copy link
Contributor

R1tschY commented Mar 11, 2020

Thank you for your investigation. I created a issue and will soon fix it.

@davidpanic
Copy link
Author

@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/gsconnect@andyholmes.github.io/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/gsconnect@andyholmes.github.io/service/protocol/lan.js:557:44
                           @/home/david/.local/share/gnome-shell/extensions/gsconnect@andyholmes.github.io/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/gsconnect@andyholmes.github.io/service/protocol/lan.js:557:44
                           @/home/david/.local/share/gnome-shell/extensions/gsconnect@andyholmes.github.io/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/gsconnect@andyholmes.github.io/service/protocol/lan.js:557:44
                           @/home/david/.local/share/gnome-shell/extensions/gsconnect@andyholmes.github.io/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"

@andyholmes
Copy link
Collaborator

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.

@davidpanic
Copy link
Author

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.

Screenshot_20200322_001

@andyholmes
Copy link
Collaborator

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.

@davidpanic
Copy link
Author

davidpanic commented Mar 22, 2020

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
                                                              }
                                                            }

@ferdnyc
Copy link
Member

ferdnyc commented Mar 23, 2020

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.

@andyholmes
Copy link
Collaborator

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?

@davidpanic
Copy link
Author

davidpanic commented Mar 23, 2020

Initiated it from GSConnect. Initiating from Sailfish does literally nothing.

@davidpanic
Copy link
Author

I could start up wireshark or burp suite or somethning if that helps?

@andyholmes
Copy link
Collaborator

This is starting to sound like another firewall problem. Are you sure you have ports 1716 & 1739-1764 open for TCP & UDP?

@davidpanic
Copy link
Author

image
image

@andyholmes
Copy link
Collaborator

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.

@davidpanic
Copy link
Author

I have no firewall on sailfish. Or at least I'm not aware of one...

@andyholmes
Copy link
Collaborator

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.

@davidpanic
Copy link
Author

hehe.. I found my problem. A system update fixed it.. thanks a lot for your help though! 10/10 tech support! 🎉

@ferdnyc
Copy link
Member

ferdnyc commented Mar 24, 2020

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
can't fix An issue that is out-of-scope or expected behaviour upstream KDE Connect, Android or supporting library
Projects
None yet
Development

No branches or pull requests

4 participants