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

Auto reconnect #63

Open
hoangthai2171 opened this issue May 8, 2024 · 29 comments
Open

Auto reconnect #63

hoangthai2171 opened this issue May 8, 2024 · 29 comments
Labels
bug Something isn't working

Comments

@hoangthai2171
Copy link

hoangthai2171 commented May 8, 2024

I've a two computer setup (macbook and PC), usually when one of the devices go to sleep when I AFK (bathroom, food, etc..) the app get disconnected on both devices. When I wake them both to work again I have to open the Cursr app and click connect again and this is kind of annoying to do so.

How about an option in Settings to allow automatically reconnect when both devices are available on the network again, it would be great.

I used to use ShareMouse app (same purpose of using this but your app works better and smoother :) ) and get this idea from them.

If this is already included in Cursr please guide me how to do it, thank you.

@ragauskl
Copy link
Contributor

ragauskl commented May 8, 2024

You should not need to do anything - Cursr should already reconnect on wake, if it does not means it's a bug.

I'll see what I can find, from a quick test of trying to replicate the issue everything seems to be working as expected on my end, when one of the devices is put to sleep (macbook and PC as well) and woken up the devices reconnect without an issue.

To help resolve the issue I will need ask you to enable Debug mode in settings of Cursr on both devices, recreate the issue by putting one of the devices to sleep, waking it up and check that they did not connect. If by any chance during manual attempt they will reconnect successfully - try leaving Debug mode on and let one of devices to go to sleep on it's own due to inactivity. Then when reconnect fails send me 'Compressed Logs' (next to Debug setting) from both devices to [email protected]

@ragauskl ragauskl added the bug Something isn't working label May 8, 2024
@hoangthai2171
Copy link
Author

hoangthai2171 commented May 9, 2024

You should not need to do anything - Cursr should already reconnect on wake, if it does not means it's a bug.

I'll see what I can find, from a quick test of trying to replicate the issue everything seems to be working as expected on my end, when one of the devices is put to sleep (macbook and PC as well) and woken up the devices reconnect without an issue.

To help resolve the issue I will need ask you to enable Debug mode in settings of Cursr on both devices, recreate the issue by putting one of the devices to sleep, waking it up and check that they did not connect. If by any chance during manual attempt they will reconnect successfully - try leaving Debug mode on and let one of devices to go to sleep on it's own due to inactivity. Then when reconnect fails send me 'Compressed Logs' (next to Debug setting) from both devices to [email protected]

I've sent an email with logs from both my device and I've also describe another issue (seem like it), please look into it too.

@BillyLavoie
Copy link

BillyLavoie commented Jun 17, 2024

I'm getting the same issue.

Everything works great until both computers go to sleep. Then I have to manually go in Cursr and press the connect button. I attached my log.

@ragauskl
Copy link
Contributor

@BillyLavoie just fyi, I've downloaded the logs for debugging and removed them from your comment on purpose. It's better that logs don't get shared in public

@ragauskl
Copy link
Contributor

Think I got this fixed, will release it with update 1.7.2 soon, let me know once the update is out if it helped

@ragauskl ragauskl added the released/waiting for feedback Feature/Fix released in latest stable release and waiting for feedback label Jul 2, 2024
@BillyLavoie
Copy link

Unfortunately I still have the same issue. I made sure I had 1.7.2 installed on both and made sure I restarted both computers

@muzicman0
Copy link

muzicman0 commented Aug 1, 2024

I am also having this issue on 1.7.2. I am testing the software prior to subscribing. If my Macbook goes to sleep, then I have to reconnect on both nodes. Then everything works again.

This is the only thing that is making me not subscribe at this point.

I will be happy to provide any troubleshooting help necessary.

@ragauskl
Copy link
Contributor

ragauskl commented Aug 1, 2024

I'll continue trying to replicate the issue in different setups, the one I was able to replicate in <=1.7.1 is resolved for me with 1.7.2, but it wasn't a solution for all then. I'll provide an update when one will be available

@ragauskl ragauskl removed the released/waiting for feedback Feature/Fix released in latest stable release and waiting for feedback label Aug 21, 2024
@mkarr
Copy link

mkarr commented Sep 25, 2024

I experience the same behavior. I have 1.7.2 running on both a Mac and a PC. When one goes to sleep, it does not re-connect on wake. I have to manually click the reset button in the UI, then it works fine.

@anthonypants
Copy link

On my Windows 11 PC, if it goes to sleep, Cursr does not reconnect. When I wake my PC, it does take a while for the network to reconnect, so that might be one issue, but when the network reconnects, Cursr doesn't try to reconnect. Attempting to reconnect from my PC usually doesn't work, so I swap my mouse/keyboard to my macOS computer, which doesn't go to sleep automatically, and attempt a reconnect from there, which is successful.

@ragauskl
Copy link
Contributor

New fixes/adjustments related to connection establishment is available in 1.7.3 beta (enable Early Access in settings), let me know if this has helped with the connection issues on wake or if the issue still persists

@anthonypants
Copy link

Using the 1.7.3 beta, After resuming from sleep, my PC and Mac were disconnected. When I loaded the Cursr window on my PC, it said something about being unable to broadcast, but I didn't catch the exact message. On either machine, when I try to reconnect, I get an error that neither machine could come to a consensus on which one was the cluster leader; here's that message on my Mac:
image
Restarting the client from my Mac allowed them to connect.

@ragauskl
Copy link
Contributor

@anthonypants see if this reoccurs again. Could it have been that mac had the older version? If Windows was on newer version but Mac was still using old, Windows would have rejected the connections - and Mac due to not getting response back in time on the 'vote' would have thrown that issue (I saw this when running different versions of Cursr). Version 1.7.3-prerelease.2 is only compatible with itself and higher due to minor changes in communication format/data change

@anthonypants
Copy link

I'd updated both computers to 1.7.3-prerelease.2 at the same time, when you replied to say that version fixes these issues, so I don't think that's it. The same thing happened today, and I've attached a screenshot of the broadcast failure message from my Windows PC:
image
Today I reconnected by restarting the client from my Windows PC, which worked.

@ragauskl
Copy link
Contributor

Okay, I'll have a look

@ragauskl
Copy link
Contributor

@anthonypants the issue of trying to manually reconnect should be fixed with released 1.7.3-prerelease.3 as for the braodcast issue - I'm still looking into it

@anthonypants
Copy link

anthonypants commented Oct 22, 2024

Woke up my Windows PC and updated my Mac to 1.7.3-prerelease.3 first. It came up with an error that the Windows PC was on an earlier version, and I'm assuming this is expected behavior.
image
However, on my Windows PC, Cursr said it couldn't connect to the internet. I have a network range configured for both computers, and it does have internet access, so I know Cursr should have been able to access the internet.
image
After a few minutes, it did realize it had internet access, and I was able to upgrade from inside the app.

I do have a couple other network interfaces, so here's my route print output. I don't know if Cursr is using this or is relying on Network Location Awareness to tell if it has internet access, but maybe one of these extra interfaces is causing issues.

C:\Users\anthony>route print
===========================================================================
Interface List
 13...00 15 5d xx xx xx ......Hyper-V Virtual Ethernet Adapter
  9...e8 9c 25 xx xx xx ......Intel(R) Ethernet Controller I226-V
  4...90 65 84 xx xx xx ......Intel(R) Wi-Fi 7 BE200 320MHz #3
 12...92 65 84 xx xx xx ......Intel(R) Wi-Fi 7 BE200 320MHz #5
 24...90 65 84 xx xx xx ......Intel(R) Wi-Fi 7 BE200 320MHz
 17...90 65 84 xx xx xx ......Bluetooth Device (Personal Area Network)
  1...........................Software Loopback Interface 1
===========================================================================

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0     10.0.101.254     10.0.101.105     20
       10.0.101.0    255.255.255.0         On-link      10.0.101.105    276
     10.0.101.105  255.255.255.255         On-link      10.0.101.105    276
     10.0.101.255  255.255.255.255         On-link      10.0.101.105    276
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    331
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    331
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    331
      172.29.48.0    255.255.240.0         On-link       172.29.48.1    271
      172.29.48.1  255.255.255.255         On-link       172.29.48.1    271
    172.29.63.255  255.255.255.255         On-link       172.29.48.1    271
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    331
        224.0.0.0        240.0.0.0         On-link      10.0.101.105    276
        224.0.0.0        240.0.0.0         On-link       172.29.48.1    271
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    331
  255.255.255.255  255.255.255.255         On-link      10.0.101.105    276
  255.255.255.255  255.255.255.255         On-link       172.29.48.1    271
===========================================================================
Persistent Routes:
  None

IPv6 Route Table
===========================================================================
Active Routes:
 If Metric Network Destination      Gateway
  9     36 ::/0                     fe80::208:a2ff:fe0d:155d
  1    331 ::1/128                  On-link
  9     36 2601:1c0:717c:4595::/64  On-link
  9    276 2601:1c0:717c:4595:xxxx:xxxx:xxxx:xxxx/128
                                    On-link
  9    276 fe80::/64                On-link
 13    271 fe80::/64                On-link
  9    276 fe80::78bb:e166:b90d:1a3a/128
                                    On-link
 13    271 fe80::812f:eb5e:261:ae02/128
                                    On-link
  1    331 ff00::/8                 On-link
  9    276 ff00::/8                 On-link
 13    271 ff00::/8                 On-link
===========================================================================
Persistent Routes:
  None

@ragauskl
Copy link
Contributor

I don't know if Cursr is using this or is relying on Network Location Awareness to tell if it has internet access

Cursr simply uses node.js dns to see if site like google.com is reachable, because if that fails then the update check will also fail. So the problem is likely not directly in Cursr but in packages used + maybe network setup. But I also have multiple network interfaces and that causes no issues.

Can I ask you to send me 'compressed logs' from the settings > general > debug to [email protected]? It may show more errors that happen before the ones you see on-screen, especially with the broadcast issue as so far I was unable to replicate it.

Another question - do you by any chance use any software that may be blocking incoming/outgoing requests? I don't remember the name of it but one user used something like that and for some reason even tho Cursr was allowed it was still blocking one specific request required for initial connection between devices.

@ragauskl
Copy link
Contributor

prerelease.5 is now published and contains further improvements related to connection between devices, let me know if the issue persists

@ragauskl
Copy link
Contributor

ragauskl commented Nov 30, 2024

From 1 feedback looks like the issue persist

@ragauskl
Copy link
Contributor

ragauskl commented Dec 5, 2024

prerelease.6 published with likely fix to the issue

@ragauskl
Copy link
Contributor

@mkarr @BillyLavoie @hoangthai2171 @muzicman0 @anthonypants Anyone had a chance to try out 1.7.3-prerelease.6 and can confirm if issue is resolved for you or is still occurring?

@mkarr
Copy link

mkarr commented Dec 13, 2024

@mkarr @BillyLavoie @hoangthai2171 @muzicman0 @anthonypants Anyone had a chance to try out 1.7.3-prerelease.6 and can confirm if issue is resolved for you or is still occurring?

For me, the behavior is much improved.

@BillyLavoie
Copy link

@mkarr

I just tried it and it seems to be perfect so far. But it's only been 2 days.

@muzicman0
Copy link

Just installed earlier today. Didn't realize I needed to enable the early access, but once I did and it installed, it seems to be good.

@muzicman0
Copy link

Spoke too soon. It works fine as long as I don't leave home with my Mac. But once I leave my house, and come back, both my PC and Mac show an 'Unsaved' profile and don't connect. I then restart the software on the Mac and they connect right away and my 'Home' profile is active.

@ragauskl
Copy link
Contributor

@muzicman0 On Mac when KVM is not connected, do you have a setup as well? Or you don't have a setup for single device meaning that 'unsaved' profile is expected and issue is only in that it does not reconnect? Does PC have a setup/profile for when it's not connected to other devices?

When you come back, do you wake your devices from sleep/hibernation or do you start them up because they were shut down?

When you leave, does that include taking Mac with yourself (meaning while you're not at home you may connect it to other networks) or does it stay at home (so while you're gone nothing else is happening on the device)?

Answers to above questions may help me understand what is happening and I will try to reproduce it, however if you're up to it, an even more useful thing would be logs if you can:

  1. Before leaving, while devices are still connected
    • go to Settings > General > Debug and make sure Debug is enabled on both device
    • Also click on 'Open Logs' and delete all files in there on both devices
  2. Leave as usual. Once you're back:
    • if issue does not occur and devices connect, go back to step 1
    • however if connection failed
      • restart Cursr on the Mac
      • go to same Debug setting and get/click 'Compressed Logs' on both devices
      • send these to [email protected]

@muzicman0
Copy link

On Mac when KVM is not connected, do you have a setup as well? Or you don't have a setup for single device meaning that 'unsaved' profile is expected and issue is only in that it does not reconnect?
a. The Mac does not have a profile for when it is unconnected, so I assume that the unsaved profile would be expected. It does not auto reconnect.

Does PC have a setup/profile for when it's not connected to other devices?
a. The PC also does not have a profile

(I tested both of the above by simply clicking the 'Disconnect' icon in Cursr. Not sure if that is the way to test or not.

When you come back, do you wake your devices from sleep/hibernation or do you start them up because they were shut down?
a. I wake the Mac from sleep. The PC is a desktop, and it doesn't sleep, just the monitor will shut off.

When you leave, does that include taking Mac with yourself (meaning while you're not at home you may connect it to other networks) or does it stay at home (so while you're gone nothing else is happening on the device)?
a. The mac leaves with me and does connect to another WiFi network while away.
a. The PC stays at home, and will revert to the 'Unsaved' profile when the Mac leaves.
i. The PC also goes to the unsaved profile if the Mac stays home, but in this case, auto reconnect works just fine. Or at least appears to.

I will try to get the logs when I can, but it might take me a while.

@ragauskl
Copy link
Contributor

Okay no rush with the logs - whenever you'll be able to. In meantime I'll find some time and try to replicate the issue, see if I can figure anything out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants