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

Unable to connect to libvnvserver instance #13

Open
moroslantia opened this issue Feb 6, 2022 · 2 comments
Open

Unable to connect to libvnvserver instance #13

moroslantia opened this issue Feb 6, 2022 · 2 comments

Comments

@moroslantia
Copy link

moroslantia commented Feb 6, 2022

I try to connect to a vncserver instance of an libvncserver implementation (https://github.com/ponty/framebuffer-vncserver)
The connection to the server works nicely with UltraVNC Client with some information of the server log:

Initializing framebuffer device /dev/fb0...
  xres=800, yres=480, xresv=800, yresv=480, xoffs=0, yoffs=0, bpp=32
  offset:length red=16:8 green=8:8 blue=0:8 transp=24:8
No keyboard device
No touch device
Initializing VNC server:
        width:  800
        height: 480
        bpp:    32
        port:   5900
        rotate: 0
  touch rotate: 0
    target FPS: 10
Initializing server...
06/02/2022 12:13:52 Listening for VNC connections on TCP port 5900
06/02/2022 12:13:52 Listening for VNC connections on TCP6 port 5900
06/02/2022 12:14:09   other clients:
06/02/2022 12:14:09 Normal socket connection
06/02/2022 12:14:09 Client Protocol Version 3.8
06/02/2022 12:14:09 Protocol version sent 3.8, using 3.8
06/02/2022 12:14:09 rfbProcessClientSecurityType: executing handler for type 1
06/02/2022 12:14:09 rfbProcessClientSecurityType: returning securityResult for client rfb version >= 3.8
06/02/2022 12:14:11 Pixel format for client 192.168.2.254:
06/02/2022 12:14:11   32 bpp, depth 32, little endian
06/02/2022 12:14:11   true colour: max r 255 g 255 b 255, shift r 0 g 8 b 16
06/02/2022 12:14:11 no translation needed
06/02/2022 12:14:11 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x0000001D)
06/02/2022 12:14:11 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x0000001B)
06/02/2022 12:14:11 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x0000001A)
06/02/2022 12:14:11 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x00000019)
06/02/2022 12:14:11 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x00000013)
06/02/2022 12:14:11 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x00000012)
06/02/2022 12:14:11 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0x0000000A)
06/02/2022 12:14:11 rfbProcessClientNormalMessage: ignoring unsupported encoding type zlibhex
06/02/2022 12:14:11 Using compression level 6 for client 192.168.2.254
06/02/2022 12:14:11 Enabling full-color cursor updates for client 192.168.2.254
06/02/2022 12:14:11 Enabling cursor position updates for client 192.168.2.254
06/02/2022 12:14:11 Using image quality level 8 for client 192.168.2.254
06/02/2022 12:14:11 Using JPEG subsampling 0, Q92 for client 192.168.2.254
06/02/2022 12:14:11 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFF000B)
06/02/2022 12:14:11 Enabling LastRect protocol extension for client 192.168.2.254
06/02/2022 12:14:11 Enabling NewFBSize protocol extension for client 192.168.2.254
06/02/2022 12:14:11 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFFFECC)
06/02/2022 12:14:11 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFF8000)
06/02/2022 12:14:11 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFF8001)
06/02/2022 12:14:11 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFF8004)
06/02/2022 12:14:11 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFF8002)
06/02/2022 12:14:11 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFF8003)
06/02/2022 12:14:11 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xC0A1E5CE)
06/02/2022 12:14:11 Using ZRLE encoding for client 192.168.2.254

Attempts to connect with this VncClient prduces this server log:

Initializing framebuffer device /dev/fb0...
  xres=800, yres=480, xresv=800, yresv=480, xoffs=0, yoffs=0, bpp=32
  offset:length red=16:8 green=8:8 blue=0:8 transp=24:8
No keyboard device
No touch device
Initializing VNC server:
        width:  800
        height: 480
        bpp:    32
        port:   5900
        rotate: 0
  touch rotate: 0
    target FPS: 10
Initializing server...
06/02/2022 12:15:53 Listening for VNC connections on TCP port 5900
06/02/2022 12:15:53 Listening for VNC connections on TCP6 port 5900
06/02/2022 12:16:31   other clients:
06/02/2022 12:16:31 Normal socket connection
06/02/2022 12:16:31 Client Protocol Version 3.8
06/02/2022 12:16:31 Protocol version sent 3.8, using 3.8
06/02/2022 12:16:31 rfbProcessClientSecurityType: executing handler for type 1
06/02/2022 12:16:31 rfbProcessClientSecurityType: returning securityResult for client rfb version >= 3.8
06/02/2022 12:16:31 Using fine quality level 100 for client 192.168.2.254
06/02/2022 12:16:31 Using image quality level 9 for client 192.168.2.254
06/02/2022 12:16:31 Using JPEG subsampling 0, Q100 for client 192.168.2.254
06/02/2022 12:16:31 Enabling LastRect protocol extension for client 192.168.2.254
06/02/2022 12:16:31 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFFFEC7)
06/02/2022 12:16:31 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFFFEC8)
06/02/2022 12:16:31 Enabling NewFBSize protocol extension for client 192.168.2.254
06/02/2022 12:16:31 Using subsampling level 0 for client 192.168.2.254
06/02/2022 12:16:31 rfbProcessClientNormalMessage: ignoring unsupported encoding type Enc(0xFFFFFECC)
06/02/2022 12:16:31 Using ZRLE encoding for client 192.168.2.254

and produces an exception:

Received invalid RLE palette index of 508 for a palette of 12 bytes.
at
MarcusW.VncClient.Protocol.Implementation.EncodingTypes.Frame.ZrleEncodingType.ReadPaletteRleTile(Stream stream, Boolean hasTargetFramebuffer, FramebufferCursor& framebufferCursor, Rectangle& tile, PixelFormat& cPixelFormat, Int32 paletteSize) 
in .\MarcusW.VncClient-master\src\MarcusW.VncClient\Protocol\Implementation\EncodingTypes\Frame\ZrleEncodingType.cs: Zeile412

Any chance to get it working (happy to help to narrow down the issue)?
Can i configure the client to use another encoding implementation?

@MarcusWichelmann
Copy link
Owner

Hi,

I'm not sure what could be causing this. I tried connecting to libvncserver before and didn't have any issues, if I remember right.
Maybe some exended logging could be helpful, in case of the Avalonia sample application, you can run it as "Debug" and check the trace log of your IDE.

Yes, you can remove ZRLE from the list of supported encodings to circumvent this issue. See:
https://github.com/MarcusWichelmann/MarcusW.VncClient/blob/master/src/MarcusW.VncClient/Protocol/Implementation/DefaultImplementation.cs#L64
You can then pass your protocol implementation object to the VncClient() constructor.

@paviad
Copy link

paviad commented Jul 29, 2024

Does PR #28 solve this issue for you?

Depth 32 indicates there are 4 bytes per pixel and this PR fixes a bug where code assumes 3 bytes per pixel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants