GSConnect / gnome-shell-extension-gsconnect

KDE Connect implementation for GNOME
GNU General Public License v2.0
3.16k stars 256 forks source link

Can't find my device #1841

Open ztjuh opened 1 month ago

ztjuh commented 1 month ago

Describe the bug

Phone can't find my PC. The extension is Waiting for service...

Steps to reproduce

  1. Install gsconnect
  2. Refresh
  3. Add IP manually
  4. Refresh
  5. Nothing

In a other topic I found lsof -i UDP:1716 and there is no output, it seems not to be running.

Tried my both my PC and RaspberryPi.

Expected behavior

No response

GSConnect version

50

Installed from

GNOME Extensions website

GNOME Shell version

42.9

Linux distribution/release

Pop!_OS 22.04

Paired device(s)

Won't pair can't find phone (

KDE Connect app version

1.30.1

Plugin(s)

No response

Support log

cat /tmp/gsconnect.WUP8Q2 

GSConnect: 50 (user)
GJS:       17202
Session:   x11
OS:        Pop!_OS 22.04 LTS
--------------------------------------------------------------------------------
Jul 13 19:58:03 io.elementary.a[3022]: hdy_carousel_box_get_position: assertion 'HDY_IS_CAROUSEL_BOX (self)' failed
Jul 13 19:58:03 io.elementary.a[3022]: hdy_carousel_box_get_n_pages: assertion 'HDY_IS_CAROUSEL_BOX (self)' failed
Jul 13 19:58:03 io.elementary.a[3022]: hdy_carousel_box_get_position: assertion 'HDY_IS_CAROUSEL_BOX (self)' failed
Jul 13 19:58:03 io.elementary.a[3022]: hdy_carousel_box_get_nth_child: assertion 'HDY_IS_CAROUSEL_BOX (self)' failed
Jul 13 19:58:03 io.elementary.a[3022]: hdy_carousel_box_scroll_to: assertion 'HDY_IS_CAROUSEL_BOX (self)' failed
Jul 13 19:58:08 io.elementary.a[3022]: hdy_carousel_box_get_position: assertion 'HDY_IS_CAROUSEL_BOX (self)' failed
Jul 13 19:58:08 io.elementary.a[3022]: hdy_carousel_box_get_n_pages: assertion 'HDY_IS_CAROUSEL_BOX (self)' failed
Jul 13 19:58:08 io.elementary.a[3022]: hdy_carousel_box_get_position: assertion 'HDY_IS_CAROUSEL_BOX (self)' failed
Jul 13 19:58:08 io.elementary.a[3022]: hdy_carousel_box_get_nth_child: assertion 'HDY_IS_CAROUSEL_BOX (self)' failed
Jul 13 19:58:08 io.elementary.a[3022]: hdy_carousel_box_scroll_to: assertion 'HDY_IS_CAROUSEL_BOX (self)' failed

Screenshots

No response

Notes

No response

ferdnyc commented 1 month ago

@ztjuh

Unfortunately, GSConnect 50 is an unsupported version. However, it does appear that it's not launching correctly on your system. Some things to check:

  1. If you can open the preferences, gjs must be working on your system, so that's OK.
  2. Do you have the openssl command installed? (which openssl from a terminal.) GSConnect uses it to manage secure credentials when connecting to paired devices.
  3. If you open a terminal and run ls -l $HOME/.config/gsconnect, what does that show, if anything?
ztjuh commented 1 month ago

Hi @ferdnyc

Thank you for answering!

gjs is launching after a reboot, but I still can't find any devices.

$ lsof -i UDP:1716
COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
gjs     21419 alex   16u  IPv6 100091      0t0  UDP *:1716 

command -v openssl and which openssl both give the output /home/alex/.cache/activestate/bin/openssl.

And the output of the ls -l $HOME/.config/gsconnect is

-rw-rw-r-- 1 alex alex 2017 Jul 14 00:31 certificate.pem
-rw------- 1 alex alex 3272 Jul 14 00:31 private.pem
ferdnyc commented 1 month ago

@ztjuh OK, that's progress though!

(The Activestate openssl is a little weird and concerning, but it seems to work because you have credentials files in your $HOME/.config/gsconnect/, so meh.)

My guess at this point would be a firewall issue, your device needs to be reachable from the outside on port 1716 and ports 1739-1764. If your phone can't connect to your Linux machine, they won't be able to pair.

I'm not familiar with Pop! OS specifically, but there's firewall configuration info available in the wiki that might help.

ztjuh commented 1 month ago

Thanks a lot, I'm not using a firewall though. But I am using wireguard on my phone, is it possible that it won't work because of that, even if I add the IP address manually? It's always connected to my network.

ferdnyc commented 1 month ago

@ztjuh I'm afraid I know even less about wireguard than I do about Pop!, but if you can connect to the phone on port 1716 from your Linux box then I can't imagine why they wouldn't be able to pair.

Can you connect to the Linux box on port 1716, from the phone? If you open a local shell using ConnectBot (or any other app with terminal functionality), you can just run nc <linux_ip> 1716 to attempt a connection. If the connection isn't refused, then there shouldn't be any problems in that direction either.

You can also use Wireshark on Linux to capture and view negotiation attempts between the two devices; the actual traffic will be encrypted but there should at least be packets of TLS data being exchanged by the two devices.

ztjuh commented 1 month ago

When I try to install nc in termux, it can't find the package, it refers to nmap-ncat, that one installs but when I run nc now it still says I need to install the package! 😂

I'll go to bed now and figure it out tomorrow!

ztjuh commented 1 month ago

Program is just called ncat.

$ ncat 192.168.2.50 1716

It's just haning there for infinity until I stop it.

I guess I can't connect with WireGuard.

EDIT: I read you last answer again, but the connection is not refused...

I found this thread: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=332679 which linked to a redditpost https://www.reddit.com/r/kde/comments/l2kqiu/kde_connect_actually_supports_adding_devices_by/

So what I did is make a config file in ~/.config/gsconnect/ with the following content:

[General]
name=PopOS
customDevices=10.234.131.2

But I'm not sure if this config file is still being read?

Also made the config file in ~/.config/kdeconnect and restarted the process but no difference.