gnome-shell-extension-gsconnect icon indicating copy to clipboard operation
gnome-shell-extension-gsconnect copied to clipboard

GSConnect can't find my android phone

Open lucifer9676 opened this issue 1 year ago • 8 comments

GSConnect can't see any device on any network. I have other Android devices that can see each other but GSConnect can't see any of them and they can't see GSConnect. I tried adding the IP manually it still didn't work.

Steps To Reproduce:

  1. Go to Settings
  2. Click on refresh'

Expected behavior Devices on my network should should show up

Support Log


GSConnect: 50 (u
GJS:       17202
Session:   wayland
OS:        EndeavourOS
--------------------------------------------------------------------------------
-- No entries --

System Details (please complete the following information):

  • GSConnect version: 50
  • Installed from: GNOME Extensions Website
  • GNOME/Shell version: 42.4
  • Distro/Release: EndeavourOS_Artemis_nova_22_9

GSConnect environment (if applicable):

  • Paired Device(s): SAMSUNG GALAXY M12
  • KDE Connect app version: 1.19.1

lucifer9676 avatar Oct 09 '22 17:10 lucifer9676

I'm at the same place.

iw00d avatar Nov 18 '22 14:11 iw00d

@iw00d @lucifer9676

My initial suspicion would be firewall issues, the wiki "Common Problems" section has some info and links on how to open firewall ports.

For auto-discovery GSConnect needs to be listening for UDP messages on port 1716, and that port needs to permit incoming datagrams from the network.

You can check whether a device is discoverable using netcat; if your phone's IP is 192.168.1.2:

$ netcat -z -v 192.168.1.2 1714-1764
netcat: connect to 192.168.1.2 port 1714 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1715 (tcp) failed: Connection refused
Connection to 192.168.1.2 1716 port [tcp/xmsg] succeeded!
netcat: connect to 192.168.1.2 port 1717 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1718 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1719 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1720 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1721 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1722 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1723 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1724 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1725 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1726 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1727 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1728 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1729 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1730 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1731 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1732 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1733 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1734 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1735 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1736 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1737 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1738 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1739 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1740 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1741 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1742 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1743 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1744 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1745 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1746 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1747 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1748 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1749 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1750 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1751 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1752 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1753 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1754 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1755 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1756 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1757 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1758 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1759 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1760 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1761 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1762 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1763 (tcp) failed: Connection refused
netcat: connect to 192.168.1.2 port 1764 (tcp) failed: Connection refused

You can also do the same thing to localhost, just to check that GSConnect is listening, though this can't tell you whether a firewall is blocking connections from other machines.

$ netcat -z -v localhost 1714-1764
netcat: connect to localhost (::1) port 1714 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1714 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1715 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1715 (tcp) failed: Connection refused
Connection to localhost (::1) 1716 port [tcp/xmsg] succeeded!
netcat: connect to localhost (::1) port 1717 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1717 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1718 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1718 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1719 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1719 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1720 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1720 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1721 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1721 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1722 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1722 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1723 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1723 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1724 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1724 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1725 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1725 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1726 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1726 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1727 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1727 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1728 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1728 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1729 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1729 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1730 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1730 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1731 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1731 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1732 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1732 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1733 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1733 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1734 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1734 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1735 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1735 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1736 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1736 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1737 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1737 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1738 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1738 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1739 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1739 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1740 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1740 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1741 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1741 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1742 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1742 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1743 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1743 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1744 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1744 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1745 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1745 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1746 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1746 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1747 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1747 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1748 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1748 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1749 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1749 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1750 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1750 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1751 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1751 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1752 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1752 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1753 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1753 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1754 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1754 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1755 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1755 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1756 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1756 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1757 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1757 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1758 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1758 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1759 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1759 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1760 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1760 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1761 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1761 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1762 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1762 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1763 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1763 (tcp) failed: Connection refused
netcat: connect to localhost (::1) port 1764 (tcp) failed: Connection refused
netcat: connect to localhost (127.0.0.1) port 1764 (tcp) failed: Connection refused

In either case, the "Connection to _________ 1716 port [tcp/xmsg] succeeded!" message is the one you're looking for.

(If you have a second Linux machine on the same local network, you can run that netcat command to its IP address to check whether your firewall is blocking the connection.)

If you have a shell-console app like ConnectBot installed on Android, it does have a very primitive netcat command that can be used as well:

If your Linux system's IP is 192.168.1.3:

:/ $ # A failed connection attempt will error out immediately...
:/ $ netcat -t -W 1 192.168.1.3 1716
netcat: connect: No route to host
:/ $ 

:/ $ # If it succeeds, it will pause for 1 second and then return the shell prompt:
:/ $ netcat -t -W 1 192.168.1.3 1716
:/ $

ferdnyc avatar Nov 22 '22 03:11 ferdnyc

Ugh, sorry. Those last commands should read...

:/ $ # A failed connection attempt will error out immediately...
:/ $ netcat -t -W 1 192.168.1.3 1716
netcat: connect: No route to host
:/ $ 

:/ $ # If it succeeds, it will pause for 1 second and then return the shell prompt:
:/ $ netcat -t -W 1 192.168.1.3 1716
:/ $

ferdnyc avatar Nov 22 '22 03:11 ferdnyc

How to Solve this issue. ? Two Android Phones can discover themselves but phone cannot discover the desktop and the desktop also can't discover phone.

NeuHix avatar Nov 23 '22 09:11 NeuHix

I'm not frequent enough at Ubuntu computers to know what I did to fix it. But when I couldn't find the running process, I ended up installing KDE Connect from the Ubuntu Software APT. If having this extension worked, IDK. If that's what I'm supposed to do, IDK. By the time I finally got connected, I had lost where I got the tip to use this extension. So I ended up installing Dolphin and really making a mess out of my fathers computer. The next time I see him, I'll try to figure out what I did and probably give up fixing that. But I managed to get the files from his phone through TeamViewer, and that's whats important.

So there, future person. Read the link I provided above unlike what I did, throw more files at the problem or read the documentation.

iw00d avatar Nov 23 '22 16:11 iw00d

But when I couldn't find the running process, I ended up installing KDE Connect from the Ubuntu Software APT. If having this extension worked, IDK. If that's what I'm supposed to do, IDK.

Well, if you managed to achieve what you needed to do, that's what really matters. But for the sake of those future bug-readers, I will say: Installing KDE Connect (the Linux part) is definitely not a solution to anything involving GSConnect. In fact, having kdeconnectd running will unequivocally BREAK GSConnect. You most assuredly do not want to do that, to address this problem.

That bit's even covered in the troubleshooting FAQ.

(The issue is that KDE Connect, the protocol, operates over a fixed set of network ports. If kdeconnectd has attached itself to those ports, then GSConnect cannot. It's the same reason you can't have two instances of GSConnect running on the same system, even as different users.)

ferdnyc avatar Nov 23 '22 19:11 ferdnyc

Yesterday, I tried all the soultions in the the wiki "Common Problems" section And today morning, GSConnect started working on its own. And it is still working currently.

NeuHix avatar Nov 24 '22 05:11 NeuHix

I think for here, the issue is openssl system package. Make sure you have it installed. The wiki mentions it for Fedora Silverblue https://github.com/GSConnect/gnome-shell-extension-gsconnect/wiki/Help#openssl-not-found However, it is possible for you to have the issue with other distros as well.

With fedora, you could further try ensuring that the kdeconnect service is allowed in the firewall. https://github.com/GSConnect/gnome-shell-extension-gsconnect/wiki/Help#cli I just tested these two couple of hours ago in Fedora. For other distros, you'll have to check with your firewall manager.

bevsxyz avatar Mar 21 '23 16:03 bevsxyz