xpra icon
Bug tracker and wiki

Opened 3 weeks ago

Closed 2 weeks ago

#1515 closed defect (fixed)

bencode parsing error from the HTML client depending on the remotized window height

Reported by: saste Owned by: saste
Priority: major Milestone: 2.1
Component: html5 Version: trunk
Keywords: bencode, html5 Cc:

Description

I'm experiencing a failure to display the remote session from the HTML client when the size of one of the window is too big. The end result is that the browser will be directed to the connect.html page and it will show the error:

You were disconnected for the following reason:
failed to parse bencode packet

This is the log on the client console:

websocket error:  undefined reason:  failed to parse bencode packet  Client.js:1382:2
    XpraClient.prototype._process_error http://xx.xx.xx.xx:5999/js/Client.js:1382:2
    XpraClient.prototype._route_packet http://xx.xx.xx.xxx:5999/js/Client.js:484:3
    XpraProtocolWorkerHost.prototype.open/< http://xx.xx.xx.xx:5999/js/Protocol.js:46:6
websocket closed:  undefined reason:  failed to parse bencode packet reconnect:  true , reconnect attempt:  0

The following is an excerpt from the server log:

2017-05-11 08:37:39,192 processing packet logging
2017-05-11 08:37:39,192 process non-ui packet logging
2017-05-11 08:37:39,192 client 4: got hello: server version 2.1 accepted our connection
2017-05-11 08:37:39,193 processing packet ping
2017-05-11 08:37:39,193 process non-ui packet ping
2017-05-11 08:37:39,193 processing packet focus
2017-05-11 08:37:39,193 will process ui packet focus
2017-05-11 08:37:39,193 processing packet configure-window
2017-05-11 08:37:39,194 will process ui packet configure-window
2017-05-11 08:37:39,194 Error parsing bencode packet:
2017-05-11 08:37:39,195  invalid literal for long() with base 10: 'NaN'
2017-05-11 08:37:39,195 failed to parse bencode packet: 6c31363a636f6e6669677572652d77696e646f77693165693065694e614e656931393230656931303830656432313a656e636f64696e67732e7267625f666f726d6174736c343a52474258343a52474241656565
2017-05-11 08:37:39,196  invalid literal for long() with base 10: 'NaN'
2017-05-11 08:37:39,196  data: 'l16:configure-windowi1ei0eiNaNei1920ei1080ed21:encodings.rgb_formatsl4:RGBX4:RGBAeee'
2017-05-11 08:37:39,198  packet index=0, packet size=84, buffer size=214
2017-05-11 08:37:39,198 untilConcludes(<bound method SocketConnection.is_active of tcp socket: xx.xx.xx.xx:5999 <- xx.xx.xx.xx:47797>, <built-in method recv of _socket.socket object at 0x7f771cb80c38>, (8192, 2), {}) timed out, retry=socket.timeout
2017-05-11 08:37:39,196 add_packet_to_queue(ping_echo ...)
2017-05-11 08:37:39,200 will process ui packet gibberish
2017-05-11 08:37:39,200 Received uninterpretable nonsense from Protocol(tcp websocket: xx.xx.xx.xx:5999 <- xx.xx.xx.xx:47799): failed to parse bencode packet
2017-05-11 08:37:39,200  data: 'l16:configure-windowi1ei0eiNaNei1920ei1080ed21:encodings.rgb_formatsl4:RGBX4:RGBAeee'
2017-05-11 08:37:39,200 disconnect_client(Protocol(tcp websocket: xx.xx.xx.xx <- xx.xx.xx.xx), failed to parse bencode packet, ())
2017-05-11 08:37:39,200 disconnect_protocol(Protocol(tcp websocket: xx.xx.xx.xx:5999 <- xx.xx.xx.xx:47799), failed to parse bencode packet, ())
2017-05-11 08:37:39,201 Disconnecting client xx.xx.xx.xx:47799:
2017-05-11 08:37:39,201  failed to parse bencode packet
2017-05-11 08:37:39,201 flush_then_close(['disconnect', 'failed to parse bencode packet'], None) closed=False

Server display size is 1366x768, according to my test I got a failure in case the window height is >= 747.

The window is created by running the command on the server:

DISPLAY=:NNN ffmpeg -f lavfi -re -i testsrc=s=WxH -f sdl out

(NNN being the display number of the xpra service).

Change History (6)

comment:1 Changed 2 weeks ago by Antoine Martin

Milestone: 2.1
Owner: changed from Antoine Martin to saste

Please specify the OS and browser used, the exact xpra version and revision.
Is this a regression in trunk? (ie: does this also occur if you run 2.0.x?)

Can you reproduce with this test application: browser/xpra/trunk/src/tests/xpra/test_apps/test_window_fixed_size.py

comment:2 Changed 2 weeks ago by Antoine Martin

Owner: changed from saste to Antoine Martin
Status: newassigned

Never mind, reproduced it with chrome. Fix to follow.

Last edited 2 weeks ago by Antoine Martin (previous) (diff)

comment:3 Changed 2 weeks ago by Antoine Martin

Owner: changed from Antoine Martin to saste
Status: assignednew

Fixed in r15815. (this was caused by the work in #1491)

@saste: please close this ticket if the fix works for you.

Last edited 2 weeks ago by Antoine Martin (previous) (diff)

comment:4 in reply to:  1 Changed 2 weeks ago by saste

Replying to Antoine Martin:

Please specify the OS and browser used, the exact xpra version and revision.

$ xpra --version
xpra v2.1-r15796

Note that today I updated to the latest version (r15814), *but* it is still showing the same version as before.

$ uname -a
Linux 4.11.0-0.rc6.git0.1.fc26.x86_64 #1 SMP Mon Apr 10 19:45:50 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
$ cat  /etc/fedora-release 
Fedora release 26 (Twenty Six)

Is this a regression in trunk? (ie: does this also occur if you run 2.0.x?)


Didn't yet try, will do later.

Can you reproduce with this test application: browser/xpra/trunk/src/tests/xpra/test_apps/test_window_fixed_size.py

It is working fine with the test app. I also tried with glxgears -geometry 1920x1080 and it is working fine as well.

With either ffmpeg or vlc it is failing though, looks like it depends on the X client.

comment:5 Changed 2 weeks ago by Antoine Martin

Note that today I updated to the latest version (r15814), *but* it is still showing the same version as before.

r15817 is available now, r15815 contains the fix.

comment:6 Changed 2 weeks ago by saste

Resolution: fixed
Status: newclosed

Confirm that it's fixed in -r15819, thank you.

Note: See TracTickets for help on using tickets.