Xpra-org / xpra-html5

HTML5 client for Xpra
Mozilla Public License 2.0
209 stars 55 forks source link

bencode parse error #303

Closed Sharpjackv closed 4 months ago

Sharpjackv commented 5 months ago

when attempting to connect to xpra through the web browser I get this error.

2024-04-29 14:28:49,487 Error parsing bencode packet:
2024-04-29 14:28:49,487  invalid b'bencoded string' type identifier: -62 at position 0
2024-04-29 14:28:49,488 Disconnecting client ('127.0.0.1', 51524):
2024-04-29 14:28:49,489  failed to parse bencode packet
2024-04-29 14:28:52,236 Error: http GET request failure for client 127.0.0.1:36754:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/xpra/server/server_core.py", line 1378, in start_http
    WebSocketRequestHandler(sock, frominfo, new_websocket_client,
  File "/usr/lib/python3/dist-packages/xpra/net/websockets/handler.py", line 30, in __init__
    HTTPRequestHandler.__init__(self, sock, addr, web_root, http_headers_dir, script_paths)
  File "/usr/lib/python3/dist-packages/xpra/server/http_handler.py", line 61, in __init__
    BaseHTTPRequestHandler.__init__(self, sock, addr, server)
  File "/usr/lib/python3.10/socketserver.py", line 747, in __init__
    self.handle()
  File "/usr/lib/python3.10/http/server.py", line 433, in handle
    self.handle_one_request()
  File "/usr/lib/python3.10/http/server.py", line 421, in handle_one_request
    method()
  File "/usr/lib/python3/dist-packages/xpra/net/websockets/handler.py", line 75, in do_GET
    HTTPRequestHandler.do_GET(self)
  File "/usr/lib/python3/dist-packages/xpra/server/http_handler.py", line 184, in do_GET
    self.handle_request()
  File "/usr/lib/python3/dist-packages/xpra/net/websockets/handler.py", line 87, in handle_request
    HTTPRequestHandler.handle_request(self)
  File "/usr/lib/python3/dist-packages/xpra/server/http_handler.py", line 189, in handle_request
    self.wfile.write(content)
TypeError: a bytes-like object is required, not 'str'

any help is appreciated.

totaam commented 5 months ago

Please include more details. My guess is that you're using an outdated version. Use a supported version and things will work.

totaam commented 4 months ago

bencode is no longer used, use an up to date version.