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

tightvnc Java 2.8.3 won't stay connected to droidVNC-NG 1.3.3 #101

Closed
rnveach opened this issue Sep 11, 2022 · 9 comments
Closed

tightvnc Java 2.8.3 won't stay connected to droidVNC-NG 1.3.3 #101

rnveach opened this issue Sep 11, 2022 · 9 comments
Labels
answer-needed Waiting for response from OP bug Something isn't working

Comments

@rnveach
Copy link

rnveach commented Sep 11, 2022

Describe the bug

TightVnc 2.8.3 for Java fails to stay connected droidVNC-NG 1.3.3.

While the screen is being displayed (top is partially displayed), the viewer gets: "Unsupported encoding code: -1869469441". The number on unsupported changes on every connection.

To Reproduce
Install droidVNC-NG 1.3.3 from the playstore.
Setup droidVNC-NG and get all permissions granted.
Download tightvnc Java 2.8.3.
Have tightvnc connect to droidVNC-NG.
Exception occurs.

Expected Behavior

Expected to be able to connect to the device with droidVNC-NG 1.3.3 with no exception and be able to control device.

Logs/Backtraces

N/A

Your environment (please complete the following information):

  • droidVNC-NG version: 1.3.3
  • Android version: Pixel 6, Android 13
  • Client-side OS and version: Windows 10
  • VNC client and version: tightvnc Java 2.8.3

Additional context

Reverting droidVNC-NG back to 1.2.6 while changing nothing else resolves the issue and connection works and is stable. Don't know the specific version that the break occurs in.

@rnveach rnveach added the bug Something isn't working label Sep 11, 2022
@bk138
Copy link
Owner

bk138 commented Sep 12, 2022

This might be due to changes in LibVNCServer. You can help debug the problem by trying with LibVNCServer's example server and using git-bisect to track down the change that might cause this. The revisions in question are:

@rnveach
Copy link
Author

rnveach commented Sep 12, 2022

I am willing to give this a try if no one more experience can at the moment, but I am not very familar with C, cmake, or LibVNC. I am mostly a Java developer but use to do C++ years ago.

I have cloned the repo in ubuntu, I built the project (via https://github.com/LibVNC/libvncserver#how-to-build ), and it is successfully built examples_simple.

I assume I just execute pure ./example in build and connect to port 5900? I was able to see "Hello World" on RealVNC. I did not get any issues with tightvnc .

ricky@ubuntu:~/opensource/libvncserver$ git rev-parse --short HEAD
993df689

Edit:
I checked out the "bad" commit mentioned above, cleaned out all the builds and re-built it, and it doesn't fail either.

ricky@ubuntu:~/opensource/libvncserver$ git rev-parse --short HEAD
c5c353e9

@bk138
Copy link
Owner

bk138 commented Sep 12, 2022

Hmm, then it might have to do with the host platform, i.e. it might only happen when the server is running on ARM instead of x86. I can look into this, but am currently overwhelmed with €€€-work, so this might take a while.

@rnveach
Copy link
Author

rnveach commented Sep 13, 2022

There is no rush from me. I would assist by checking other versions of the apk to assist narrowing down, but there are no other previous releases attached here, and I can't get the source to compile.

@bk138
Copy link
Owner

bk138 commented Sep 13, 2022

Thank you, and that being said, there are more .apk's available at https://f-droid.org/packages/net.christianbeier.droidvnc_ng/ - though not all, they seem to make available only the last three...

@rnveach
Copy link
Author

rnveach commented Sep 13, 2022

Installed the oldest, 1.3.1, and the issue persists there.

Stack trace on client side for info:

java.lang.IllegalArgumentException: Unsupported encoding code: -1864939777
        at com.glavsoft.rfb.encoding.EncodingType.byId(EncodingType.java:142)
        at com.glavsoft.rfb.encoding.decoder.FramebufferUpdateRectangle.fill(FramebufferUpdateRectangle.java:61)
        at com.glavsoft.rfb.protocol.ReceiverTask.framebufferUpdateMessage(ReceiverTask.java:151)
        at com.glavsoft.rfb.protocol.ReceiverTask.run(ReceiverTask.java:85)
        at java.lang.Thread.run(Thread.java:748)

Repository owner deleted a comment from DeadSamurai8 Oct 1, 2022
@bk138
Copy link
Owner

bk138 commented Nov 13, 2022

Alright, tried the following which is as close as possible to your setup @rnveach but it works 🤷

java --version
openjdk 11.0.16 2022-07-19
OpenJDK Runtime Environment (build 11.0.16+8-post-Debian-1deb11u1)
OpenJDK 64-Bit Server VM (build 11.0.16+8-post-Debian-1deb11u1, mixed mode, sharing)
  • Connecting to droidVNC-NG v1.3.4 without password
  • works...

Maybe it's the Windows Java?

Edit: Just tried with v1.3.3 and am able to reproduce your issue. So it seems v.1.3.4 has this fixed. Are you able to confirm?

@bk138
Copy link
Owner

bk138 commented Nov 20, 2022

Tentatively closing, feel free to post something if there's new info.

@bk138 bk138 closed this as completed Nov 20, 2022
@rnveach
Copy link
Author

rnveach commented Nov 20, 2022

Sorry for the delay as I was at my job around the clock last week.

Edit: Just tried with v1.3.3 and am able to reproduce your issue. So it seems v.1.3.4 has this fixed. Are you able to confirm?

I just installed 1.3.5 and yes, it is working now and isn't disconnecting me instantly. I am sorry I did not mentioned I set a password, but I figured that was something trivial.

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

No branches or pull requests

2 participants