Closed JFMugen closed 11 months ago
This probably happens when another instance of the program is running and using the same port. A port can be used by only one process at a time. You can fix it in any of the following ways,
clip_share.exe -s
or in PowerShell by running the command .\clip_share.exe -s
or in any other shell. Make sure you run this in the directory where the clip_share.exe resides )4337
in that list and see which app is using that port. If you do not need that application to run, you can stop that (and stop any other instances of clip_share as well). Then, re-run clip_share.exe.
Hmm, looks like the reason was having more than one instance. When I just click once, there is no log file.
But I couldn't manage to connect, which might be my lack of knowledge. On phone I just write the number that I use for connecting my modem (192.168.1.1) and then I tried the default number in the app (192.168.1.2) but both of them result "No Servers Found". I am not sure what I am doing wrong, but maybe a tutorial can be helpful for more clueless users :)
When I just click once, there is no log file.
Yes, that's the expected behavior of the app. Note that it doesn't open any visible window. It runs in the background.
On phone I just write the number that I use for connecting my modem (192.168.1.1)
No, this is the IP address of the modem. You should use the IP address of your laptop (or desktop) computer.
First make sure the following things are correctly set up.
Both the phone and the laptop or desktop computer are connected to the same Wi-Fi network (or the computer is connected to the mobile hotspot of your phone)
The server is allowed through the firewall. If you just double-clicked on the exe file, Windows Defender firewall should pop-up and ask to allow or block, where you have to allow. Otherwise, you can go to the firewall settings and allow it manually. Please refer to the README.md file, Allow through firewall section for more details. If you are using any other anti-virus software, it may also have a firewall. Whitelist the app if there are any such firewalls in your system.
You have not changed the port numbers in the clipshare.conf file. If you don't have a clipshare.conf file or you got the clipshare.conf file from the releases or README, it should have 4337 as the port. But probably this is not the issue in your situation.
Though it's unlikely, your phone may have a firewall, proxy, VPN, other network setting that routes the local network traffic through a different path. If you haven't installed such applications, you can ignore this.
To find the IP address of your computer, you can use any of the following methods,
If you are using my android app, you can use the scan button. You need the server running on your computer for the scan to work.
Using the ipconfig
command in a command prompt. Note that you should use the IPv4 Address
, not the IPv6 address, Default gateway, or the subnet mask.
Viewing the IP address in Settings > Network and Internet > View your network properties. There are many methods mentioned in www.howtogeek.com/723838/how-to-find-your-ip-address-on-a-windows-10-pc/ to find your IP address.
The IP address of your machine may look like 192.168.1.\<some number> where \<some number> is not 1 (which is the IP address of the router as you mentioned).
On phone I just write the number that I use for connecting my modem (192.168.1.1) and then I tried the default number in the app (192.168.1.2) but both of them result "No Servers Found".
The scan button is there in the Android app to find the server automatically. If you manually put the IP address, you don't need to scan again. Note that scanning is an optional feature to help find the IP address, which is not essential for clipboard sharing functionalities. You can always set the IP address manually and use the app.
Once you have the IP address entered in the client app (mobile), you can check it by copying some text on your computer and then pressing the GET
button on the Android client app. If you see the copied text on the mobile app, it is working. Then, you should be able to paste it on any other place on your mobile (it gets copied into the clipboard when you press the GET
button).
maybe a tutorial can be helpful for more clueless users :)
Yes, this looks like a good idea. I'll try to make a tutorial.
Yes, that's the expected behavior of the app. Note that it doesn't open any visible window. It runs in the background.
I was expecting a GUI so clicked several times, my bad there.
Other than that, I couldn't make it work :/
Both the phone and the laptop or desktop computer are connected to the same Wi-Fi network (or the computer is connected to the mobile hotspot of your phone)
Done.
The server is allowed through the firewall.
Done.
You have not changed the port numbers in the clipshare.conf file. If you don't have a clipshare.conf file..
I don't have the file.
Though it's unlikely, your phone may have a firewall, proxy, VPN, other network setting
Not that I know of. Any way I can verify this? I know for sure that I haven't installed any app that should affect the network.
///
If you are using my android app, you can use the scan button. You need the server running on your computer for the scan to work.
Sadly doesn't work :/
Once you have the IP address entered in the client app (mobile), you can check it by copying some text on your computer and then pressing the GET button
Gives "Couldn't Connect" error.
I believe everything should be good but looks like it isn't? Idk :/
Gives "Couldn't Connect" error.
Are both devices (computer and mobile) on the same WiFi network? Did you find the correct IP address of the server? And, did you copied some text on the computer before pressing the GET button on mobile?
Alriiiight, I just thought about trying with mobile hotspot and worked instantly. So I think the program works as intended.
But I have no idea what might be the difference between that and my wi-fi
Are both devices (computer and mobile) on the same WiFi network?
Yep
Did you find the correct IP address of the server?
From ipconfig ->
And, did you copied some text on the computer before pressing the GET button on mobile?
Yep
Now that implies both the server and client are working, but the network was the problem.
Is that IP address, which you found through ipconfig, is the IP address when you connect to the WiFi? or is it the IP address when connected to the mobile hotspot? That IP address looks correct. If the IP address is not the problem, then probably the firewall may be blocking the app. Please check the firewall rules to see if it allows connections
Probably your laptop is treating your WiFi as a public network while you have allowed the app through the firewall only for private networks only. Here is how to fix that,
If that was the case in your WiFi, this should solve the issue.
Alternative solution, If your WiFi network is a home WiFi network or any other WiFi network where only trusted people can connect, you can make it a private network by following the steps in the link I provided above.
Is that IP address, which you found through ipconfig, is the IP address when you connect to the WiFi?
Yep, hotspot was different.
then probably the firewall may be blocking the app
Well, now it works. I have no idea whether I didn't see before (I don't think so?) or they appear after trying with hotspot, but I see these 2 now.
They were "Block" and after disabling both, now it works as intended.
Great. As I see, the new rules are for public networks. I guess the issue was private vs public networks. If it's now working properly on both networks, we can close this issue. If you have any further doubts, feel free to ask.
I guess the issue was private vs public networks.
The screenshot I send above and the last one both "All" actually, I changed them to all myself before you say it, thinking it might be the problem, but it didn't help.
I really have no idea why these 2 appear to be honest but either way the issue was on my side for sure. Thanks for the help and I hope it can help some others as well in future ^^
@thevindu-w
Wait for a few days and get the newest version
Just thought about it but how about just creating a tray icon when it is active? I don't know if it is hard to implement but it would be useful for sure. This way you can easily close the program as well when you are done.
Yes, It's a good idea. I'll try to do that. It's good to have some kind of an indicator.
Feature to create a tray icon on Windows is now available in the master branch if you want to compile it yourself. It will be included in the next release v2.2 in a few days*.
Update 2023-08-19: This is now available in releases.
Feature to create a tray icon on Windows is now available in the master branch if you want to compile it yourself. It will be included in the next release v2.2 in a few days.
Thanks for the heads-up but I am not very experienced with compiling and stuff, I will wait for the release ^^
@JFMugen Version 2.2 with Windows tray icon support is now available as a release.
@thevindu-w Hey, works great ^^
But I just think you should add "Right Click -> Exit" option to the tray icon. I don't think any more than "Exit" is needed.
Ok I'll try to include it in the next release
@thevindu-w btw just letting you know that sometimes it doesn't create an icon. I tried yesterday and saw the icon but today it doesn't appear. All I did was moving the file from C/Downloads to E/_Portable Tools, feel free to tell me if there is anything else I can provide like log etc.
sometimes it doesn't create an icon.
Is the server running even when the icon is not displayed? You can check if it's running from the task manager.
All I did was moving the file from C/Downloads to E/_Portable Tools.
Does the tray icon always work when it's in C:\? Does the tray icon sometimes work when it's in E:\?
Is the server running even when the icon is not displayed? You can check if it's running from the task manager.
Yep, I was sure it was working from task manager
Does the tray icon always work when it's in C:? Does the tray icon sometimes work when it's in E:?
Right now it doesn't show at all whether its C or E -_-
Right now it doesn't show at all whether its C or E -_-
Try to stop all ClipShare processes and re-run it. May be the existing process is removing the tray icon. I have to check that.
Try to stop all ClipShare processes and re-run it.
Tried it, restarted PC as well to be sure. Didn't help.
It is weird that I saw yesterday but can't see today. I have no idea what might change, I didn't install sth new.
If you didn't create a config file with tray_icon=false, it should work. I'll try to re-create the issue on my machine.
I didn't touch or create any config file :/
I re-created the problem in my machine also. That happened when I moved the exe to another partition. Now I can further check what's wrong. As a temporary solution, copy (not move) the exe file back to where it was working (to the exact same folder. not just the drive). And then run it there. Although it worked for me, I'm not sure if that works always.
Either way it is not a huge deal or anything as the program still works great, but I am glad you managed to recreate the issue. Thanks :)
@JFMugen tray icon not showing when exe is moved is now fixed in version 2.3.
But I just think you should add "Right Click -> Exit" option to the tray icon. I don't think any more than "Exit" is needed.
this is also included in that release.
Works flawlessly, thanks :)
"Can't bind to port 4337 UDP"
Tried to create a new inbound/outbound rule in Firewall but didn't help :/