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

Inputs not working after some time #38

Closed
gigovx opened this issue Sep 28, 2021 · 16 comments · Fixed by #48
Closed

Inputs not working after some time #38

gigovx opened this issue Sep 28, 2021 · 16 comments · Fixed by #48
Assignees
Labels
bug Something isn't working

Comments

@gigovx
Copy link

gigovx commented Sep 28, 2021

Describe the bug
No input from remote device on server device

To Reproduce
Keep an active connection, after time the server device fails to respond to inputs, but not on all devices I am operating

Expected Behavior
Inputs to be sent to device

Logs/Backtraces

Your environment (please complete the following information):

  • OS and version: Windows 11 264 & Android 11
  • VNC viewer and version: Real VNC Viewer 6.21 (and TightVNC)

Additional context
I have tried different VNC viewers and the same response
I have disconnected and re-connected and it does not resolve the issue
I have used different devices to connect, (both Android and Windows)
Only restarting the server device manually (ie physically in person) seems to solve the issue
I can still awake the screen on by pressing ctrl+esc but no other inputs are being sent once screen is awake other than esc

@gigovx gigovx added the bug Something isn't working label Sep 28, 2021
@bk138
Copy link
Owner

bk138 commented Sep 28, 2021

Thanks for reporting! How would one be able to consistently reproduce this? Could you maybe try with an emulator and then share its version and setup?

@bk138 bk138 changed the title Inputs not working Inputs not working after some time Sep 28, 2021
@bk138 bk138 added the answer-needed Waiting for response from OP label Sep 28, 2021
@gigovx
Copy link
Author

gigovx commented Sep 28, 2021 via email

@bk138
Copy link
Owner

bk138 commented Sep 28, 2021

Thanks a lot, Giles! I fear - however - that I won't be able to repro this without a device where it's happening.

@bk138 bk138 added help wanted Extra attention is needed and removed answer-needed Waiting for response from OP labels Sep 28, 2021
@gigovx
Copy link
Author

gigovx commented Sep 28, 2021 via email

@bk138
Copy link
Owner

bk138 commented Sep 28, 2021

The usual logcat way and a lot of patience I guess ;-): https://support.citrix.com/article/CTX232375

@peekd
Copy link

peekd commented Oct 8, 2021

Also have this same issue - seems to stop accepting input after running for a day or so. I still can get screen updates but cannot control the device until I do a complete restart of the phone. Android 11, Pixel 2. Real VNC viewers on Windows10, iPad & Android 11 - all cannot control the phone after I extended period of time. I will try and guage approximately how long it takes.

Thanks!
David

@Jdogzz
Copy link

Jdogzz commented Oct 22, 2021

I am facing the same issue, but this time I can give you a method of reproduction. I installed Ubuntu Server 21.10 ( https://ubuntu.com/download/server ) in a proxmox VM, installed Android Studio from a snap ( https://snapcraft.io/android-studio ), made an emulator with a few custom options but other than that all the offered defaults (made a custom device with size 10.3" and resolution 1404x1872). From there I installed droidVNC-NG in the emulator from the F-Droid store, turned it on, connected a VNC client and fiddled around. In a few minutes I lost the ability to give touch input to the emulator over VNC though I was still able to stream picture. I have confirmed this with two separate VNC clients on two different devices. The emulator remains perfectly functional, responding to direct clicks. After restarting the emulator I can regain VNC input for a few minutes before it again no longer responds.

@Jdogzz
Copy link

Jdogzz commented Oct 22, 2021

Here's the log produced following the procedure in the link @bk138 shared using my setup as described above.
logcat.txt
One comment in my case: I've now noticed that the failure each time is preceded by a loss of connection, and upon successful reconnection by the same VNC client I am no longer able to give input. A successful reconnection by a different VNC client on another device has the result, no accepting of input. The entire time as far as I am aware, the emulator remains perfectly functional and responsive to direct input.

@bk138
Copy link
Owner

bk138 commented Oct 23, 2021

Thanks for the log file! Quick theory: The user starts a gesture, client disconnects, gesture is never ended since button up is never received, client reconnects, button up is not recognized because of some reason, gesture buffer full, no input anymore. #46 might be related.

@Jdogzz
Copy link

Jdogzz commented Oct 24, 2021

One other comment: With some more testing I think the disconnect is particular to the first VNC client I'm trying. After a few minutes of using this VNC client ( https://github.com/matteodelabre/vnsee ) I see disconnects with each trial, following which no VNC client can submit touch events to the droidVNC-NG server. However, I was unable to trigger disconnects with the tigervnc client, and if that's the first client to connect to the droidVNC-NG server then there are no problems with touch input result (at least unless the vnsee client connects and then triggers a disconnect).

@bk138 bk138 self-assigned this Oct 24, 2021
bk138 added a commit that referenced this issue Oct 24, 2021
...regardless of exceptions being thrown by the gesture functions.

These would throw when the maximum gesture duration of 1 minute would be
reached.

Thanks to https://github.com/redburn82 for pointing this out!

Closes #38, closes #46
@bk138
Copy link
Owner

bk138 commented Oct 24, 2021

Hi @Jdogzz, #46 pointed me in the right direction. Can you please try out two things:

Thanks!

@bk138 bk138 added answer-needed Waiting for response from OP and removed help wanted Extra attention is needed labels Oct 24, 2021
@bk138 bk138 closed this as completed in #48 Nov 2, 2021
bk138 added a commit that referenced this issue Nov 2, 2021
...regardless of exceptions being thrown by the gesture functions.

These would throw when the maximum gesture duration of 1 minute would be
reached.

Thanks to https://github.com/redburn82 for pointing this out!

Closes #38, closes #46
@peekd
Copy link

peekd commented Nov 2, 2021

Hi @bk138, thanks for fixing this. How can I download an apk with this fix in it or will I need to wait for a new version to be released? If so, when might that be?
Thanks again!

@bk138
Copy link
Owner

bk138 commented Nov 3, 2021

Here you go: https://github.com/bk138/droidVNC-NG/releases/tag/v1.2.4

NB that this release will not be available on Google Play due to #52

@Jdogzz
Copy link

Jdogzz commented Nov 7, 2021

@bk138 Thanks for packaging that as an apk (it was on my todo list to figure out how to build Android apps from source). Unfortunately I see the same problem as before, within a couple of minutes I see a broken connection and then all reconnects do not respond to gestures. I can't tell if it's related to gesture length, though. In a couple of tests just now, a few simple taps over a few minutes put it into that state, while in a followup test after restarting the emulator I was getting continuous gestures lasting over 30 seconds after a single tap, then a deliberate continuous click and drag showed no response on Android's end, and after all that VNC continued to work correctly.

@bk138
Copy link
Owner

bk138 commented Nov 7, 2021

@Jdogzz As I pointed out in #38 (comment), I was able to reproduce the input lockup by doing a gesture that lasts over 60s. I applied #48 and this was fixed for me.

If there's still an issue on your side, please post a way to (hopefully quickly) reproduce together with some logcat output. Tip: you can write into the logcat text file what action you took after sampling it, that makes things easier to understand.

@peekd
Copy link

peekd commented Nov 7, 2021

Hi @bk138, Just letting you know that the last update has fixed my issue with the android app not receiving inputs after some time. It has been running for over 3 days now without issue. Previously it would have definitely failed - a few times! Thanks for the fix!

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
4 participants