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

Update from xpra 3.1.3 to 3.1.4 breaks html5 on Centos 7 #3885

Closed
dirkrydvan opened this issue Jun 7, 2023 · 7 comments
Closed

Update from xpra 3.1.3 to 3.1.4 breaks html5 on Centos 7 #3885

dirkrydvan opened this issue Jun 7, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@dirkrydvan
Copy link

dirkrydvan commented Jun 7, 2023

Describe the bug
After update from:
https://www.xpra.org/dists/CentOS/7/x86_64/xpra-3.1.3-10.0xpra1.el7.x86_64.rpm
to Version:
xpra-3.1.4-10.32985xpra1.el7.x86_64.rpm or xpra-3.1.4-10.32985xpra1.el7.x86_64.rpm
the html5 funktion does not work anymore at Centos 7

To Reproduce
Steps to reproduce the behavior:

  1. server command
sudo yum install xpra
xpra start --start=xterm --bind-tcp=0.0.0.0:8888
  1. client command
ssh user@server  -L 8888:localhost:8888

Browser http://localhost:8888
5. specific action to trigger the bug
Websocket loading bar stops. No windows manager appears. No html5 Menu appears. Only an xterm appears without focus and without window decoration. No input possible.

Steps to Repair

sudo yum remove ffmpeg-xpra.x86_64 libvpx-xpra.x86_64 libwebp-xpra.x86_64 pygtkglext.x86_64 python2-pyopengl.x86_64 python2-rencode.x86_64 python2-xpra.x86_64 python2-xpra-client.x86_64 python2-xpra-server.x86_64 x264-xpra.x86_64 xorg-x11-drv-dummy.x86_64 xpra.x86_64 xpra-common.noarch xpra-common-client.noarch xpra-common-server.noarch xpra-html5.noarch
sudo yum -y install https://www.xpra.org/dists/CentOS/7/x86_64/xpra-3.1.3-10.0xpra1.el7.x86_64.rpm 

System Information (please complete the following information):

  • Server OS: Centos 7
  • Client OS: Windows 11
  • Xpra Server Version: 3.1.4
  • Xpra Client Version: Chrome 113

Additional context
The issue is very well to reproduce with:

  • yum install xpra 3.1.3 (working)
  • yum update to 3.1.4 (not working).
  • yum remove xpra.... and yum install 3.1.3 again (working)

** log**

X.Org X Server 1.20.4
X Protocol Version 11, Revision 0
Build Operating System:  3.10.0-957.1.3.el7.x86_64
Current Operating System: Linux servername 3.10.0-1160.81.1.el7.x86_64 #1 SMP Fri Dec 16 17:29:43 UTC 2022 x86_64
Kernel command line: BOOT_IMAGE=/vmlinuz-3.10.0-1160.81.1.el7.x86_64 root=/dev/mapper/centos_servername-root ro crashkernel=auto rd.lvm.lv=centos_servername/root rd.lvm.lv=centos_servername/swap rhgb quiet LANG=en_US.UTF-8
Build Date: 05 April 2023  01:48:15PM
Build ID: xorg-x11-server 1.20.4-23.el7_9
Current version of pixman: 0.34.0
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(++) Log file: "/run/user/1000/xpra/Xorg.S12161.log", Time: Wed Jun  7 09:21:19 2023
(++) Using config file: "/etc/xpra/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
2023-06-07 09:21:24,145 Warning: some of the sockets are in an unknown state:
2023-06-07 09:21:24,145  /run/user/1000/xpra/servername-0
2023-06-07 09:21:24,146  /home/username/.xpra/servername-0
2023-06-07 09:21:24,147  please wait as we allow the socket probing to timeout
2023-06-07 09:21:30,179 created unix domain socket '/run/user/1000/xpra/servername-0'
2023-06-07 09:21:30,180 cannot create group socket '/run/xpra/servername-0'
2023-06-07 09:21:30,180  [Errno 13] Permission denied
2023-06-07 09:21:30,180 created unix domain socket '/home/username/.xpra/servername-0'
2023-06-07 09:21:30,181 Warning: missing sound module
2023-06-07 09:21:30,297 pointer device emulation using XTest
2023-06-07 09:21:30,329 serving html content from '/usr/share/xpra/www'
2023-06-07 09:21:31,321 OpenGL is supported on display ':0'
2023-06-07 09:21:31,322  using 'llvmpipe (LLVM 7.0, 128 bits)' renderer
2023-06-07 09:21:31,453 D-Bus notification forwarding is available
2023-06-07 09:21:31,536 Warning: webcam forwarding is disabled
2023-06-07 09:21:31,536  the virtual video directory '/sys/devices/virtual/video4linux' was not found
2023-06-07 09:21:31,536  make sure that the 'v4l2loopback' kernel module is installed and loaded
2023-06-07 09:21:31,537 found 0 virtual video devices for webcam forwarding
2023-06-07 09:21:31,687 xpra is ready.
2023-06-07 09:21:31,688 xpra GTK2 X11 version 3.1.4-r3M 64-bit
2023-06-07 09:21:31,706  uid=1000 (username), gid=1000 (username)
2023-06-07 09:21:31,707  running with pid 12170 on Linux CentOS Linux 7.9.2009 Core
2023-06-07 09:21:31,707  connected to X11 display :0 with 24 bit colors
2023-06-07 09:21:31,882 printer forwarding enabled using postscript and pdf
2023-06-07 09:21:31,890 started command 'xterm' with pid 12252
xterm: cannot load font '-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1'
2023-06-07 09:21:31,942 watching for applications menu changes in:
2023-06-07 09:21:31,949  '/usr/local/share/applications'
2023-06-07 09:21:31,949  '/usr/share/applications'
2023-06-07 09:21:31,950  '/var/lib/snapd/desktop/applications'
2023-06-07 09:21:31,952 Error during threaded setup of <class 'xpra.server.mixins.child_command_server.ChildCommandServer'>
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/xpra/server/server_base.py", line 171, in threaded_init
    c.threaded_setup(self)
  File "/usr/lib64/python2.7/site-packages/xpra/server/mixins/child_command_server.py", line 97, in threaded_setup
    load_xdg_menu_data()
  File "/usr/lib64/python2.7/site-packages/xpra/platform/xposix/xdg_helper.py", line 279, in load_xdg_menu_data
    xdg_menu_data = do_load_xdg_menu_data()
  File "/usr/lib64/python2.7/site-packages/xpra/platform/xposix/xdg_helper.py", line 283, in do_load_xdg_menu_data
    if not check_xdg():
  File "/usr/lib64/python2.7/site-packages/xpra/platform/xposix/xdg_helper.py", line 34, in check_xdg
    from xdg.Menu import Menu, MenuEntry
  File "/usr/lib/python2.7/site-packages/xdg/__init__.py", line 1
SyntaxError: Non-ASCII character '\xc2' in file /usr/lib/python2.7/site-packages/xdg/__init__.py on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
2023-06-07 09:21:32,196 ffmpeg: vp8+webm encoding failed: could not open vp8+webm encoder context: Invalid argument
2023-06-07 09:21:32,219 Error importing nvjpeg encoder (enc_nvjpeg)
2023-06-07 09:21:32,219  libnvjpeg.so.11: cannot open shared object file: No such file or directory
2023-06-07 09:21:32,223 125.7GB of system memory
2023-06-07 09:21:42,446 Handshake complete; enabling connection
2023-06-07 09:21:42,463  automatic picture encoding enabled, also available:
2023-06-07 09:21:42,463   jpeg, png, png/P, png/L, rgb32, rgb24, webp, h264
2023-06-07 09:21:42,470 HTML5 Microsoft Windows Chrome client version 5.2-r0
2023-06-07 09:21:42,593 setting keyboard layout to 'de'
2023-06-07 09:21:42,646  client root window size is 2304x1118 with 1 display:
2023-06-07 09:21:42,647   Google Chrome 113 (610x296 mm - DPI: 95x95)
2023-06-07 09:21:42,647     Canvas
2023-06-07 09:21:42,777 server virtual display now set to 2240x1088 (best match for 2304x1118)
2023-06-07 09:21:42,790 Warning: cannot load menu data
2023-06-07 09:21:42,790  No module named Menu
2023-06-07 09:21:42,900 DPI set to 26 x 26 (wanted 96 x 96)
2023-06-07 09:21:42,900  you may experience scaling problems, such as huge or small fonts, etc
2023-06-07 09:21:42,900  to fix this issue, try the dpi switch, or use a patched Xorg dummy driver
@dirkrydvan dirkrydvan added the bug Something isn't working label Jun 7, 2023
@totaam
Copy link
Collaborator

totaam commented Jun 7, 2023

As per your log:

SyntaxError: Non-ASCII character '\xc2' in file /usr/lib/python2.7/site-packages/xdg/__init__.py on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

Please fix this system file and try again.

Please also specify the exact version of the xpra-html5 client in use.

@dirkrydvan
Copy link
Author

This Non-ASCII Character Syntax Error is only a side effect. I tried to install manually the missed xdg with pip2 install xdg. Vut this was not a help.
HTML5 Version xpra-html5-5.2-1.r1.el7.noarch.rpm is in use in both cases.

A working installation with xpra 3.1.3 shows also this Syntax Error message:

2023-06-07 09:53:05,432 Error: cannot enable SSH socket upgrades:
2023-06-07 09:53:05,432  No module named paramiko
2023-06-07 09:53:05,432 created tcp socket '0.0.0.0:8888'
2023-06-07 09:53:05,436 cannot access python uinput module:
2023-06-07 09:53:05,436  No module named uinput

X.Org X Server 1.20.4
X Protocol Version 11, Revision 0
Build Operating System:  3.10.0-957.1.3.el7.x86_64
Current Operating System: Linux servername 3.10.0-1160.81.1.el7.x86_64 #1 SMP Fri Dec 16 17:29:43 UTC 2022 x86_64
Kernel command line: BOOT_IMAGE=/vmlinuz-3.10.0-1160.81.1.el7.x86_64 root=/dev/mapper/centos_servername-root ro crashkernel=auto rd.lvm.lv=centos_servername/root rd.lvm.lv=centos_servername/swap rhgb quiet LANG=en_US.UTF-8
Build Date: 05 April 2023  01:48:15PM
Build ID: xorg-x11-server 1.20.4-23.el7_9
Current version of pixman: 0.34.0
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(++) Log file: "/run/user/1000/xpra/Xorg.S15048.log", Time: Wed Jun  7 09:53:05 2023
(++) Using config file: "/etc/xpra/xorg.conf"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
2023-06-07 09:53:09,815 created unix domain socket '/run/user/1000/xpra/servername-0'
2023-06-07 09:53:09,815 cannot create group socket '/run/xpra/servername-0'
2023-06-07 09:53:09,815  [Errno 13] Permission denied
2023-06-07 09:53:09,815 created unix domain socket '/home/username/.xpra/servername-0'
2023-06-07 09:53:09,816 Warning: missing sound module
2023-06-07 09:53:09,921 pointer device emulation using XTest
2023-06-07 09:53:09,953 serving html content from '/usr/share/xpra/www'
2023-06-07 09:53:10,955 OpenGL is supported on display ':0'
2023-06-07 09:53:10,956  using 'llvmpipe (LLVM 7.0, 128 bits)' renderer
2023-06-07 09:53:11,077 D-Bus notification forwarding is available
2023-06-07 09:53:11,154 Warning: webcam forwarding is disabled
2023-06-07 09:53:11,154  the virtual video directory '/sys/devices/virtual/video4linux' was not found
2023-06-07 09:53:11,154  make sure that the 'v4l2loopback' kernel module is installed and loaded
2023-06-07 09:53:11,155 found 0 virtual video devices for webcam forwarding
2023-06-07 09:53:11,295 xpra is ready.
2023-06-07 09:53:11,296 xpra GTK2 X11 version 3.1.3-r0 64-bit
2023-06-07 09:53:11,317  uid=1000 (username), gid=1000 (username)
2023-06-07 09:53:11,317  running with pid 15057 on Linux CentOS Linux 7.9.2009 Core
2023-06-07 09:53:11,318  connected to X11 display :0 with 24 bit colors
2023-06-07 09:53:11,487 printer forwarding enabled using postscript and pdf
2023-06-07 09:53:11,494 started command 'xterm' with pid 15131
xterm: cannot load font '-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1'
2023-06-07 09:53:11,533 watching for applications menu changes in:
2023-06-07 09:53:11,534  '/usr/local/share/applications'
2023-06-07 09:53:11,534  '/usr/share/applications'
2023-06-07 09:53:11,534  '/var/lib/snapd/desktop/applications'
2023-06-07 09:53:11,535 Error during threaded setup of <class 'xpra.server.mixins.child_command_server.ChildCommandServer'>
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/xpra/server/server_base.py", line 171, in threaded_init
    c.threaded_setup(self)
  File "/usr/lib64/python2.7/site-packages/xpra/server/mixins/child_command_server.py", line 97, in threaded_setup
    load_xdg_menu_data()
  File "/usr/lib64/python2.7/site-packages/xpra/platform/xposix/xdg_helper.py", line 269, in load_xdg_menu_data
    xdg_menu_data = do_load_xdg_menu_data()
  File "/usr/lib64/python2.7/site-packages/xpra/platform/xposix/xdg_helper.py", line 274, in do_load_xdg_menu_data
    from xdg.Menu import parse, Menu, ParsingError
  File "/usr/lib/python2.7/site-packages/xdg/__init__.py", line 1
SyntaxError: Non-ASCII character '\xc2' in file /usr/lib/python2.7/site-packages/xdg/__init__.py on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
2023-06-07 09:53:11,536 Error importing x264 encoder (enc_x264)
2023-06-07 09:53:11,536  libx264.so.163: cannot open shared object file: No such file or directory
2023-06-07 09:53:11,703 ffmpeg: vp8+webm encoding failed: could not open vp8+webm encoder context: Invalid argument
2023-06-07 09:53:11,742 Error importing nvjpeg encoder (enc_nvjpeg)
2023-06-07 09:53:11,742  libnvjpeg.so.11: cannot open shared object file: No such file or directory
2023-06-07 09:53:11,747 125.7GB of system memory
2023-06-07 09:53:24,914 Handshake complete; enabling connection
2023-06-07 09:53:24,930  automatic picture encoding enabled, also available:
2023-06-07 09:53:24,930   jpeg, png, png/P, png/L, rgb32, rgb24, webp
2023-06-07 09:53:24,937 HTML5 Microsoft Windows Chrome client version 5.2-r0
2023-06-07 09:53:25,055 setting keyboard layout to 'de'
2023-06-07 09:53:25,108  client root window size is 2304x1118 with 1 display:
2023-06-07 09:53:25,109   Google Chrome 113 (610x296 mm - DPI: 95x95)
2023-06-07 09:53:25,109     Canvas
2023-06-07 09:53:25,239 server virtual display now set to 2240x1088 (best match for 2304x1118)
2023-06-07 09:53:25,258 Warning: cannot use application menu data:
2023-06-07 09:53:25,258  no python-xdg module
2023-06-07 09:53:25,360 DPI set to 26 x 26 (wanted 96 x 96)
2023-06-07 09:53:25,360  you may experience scaling problems, such as huge or small fonts, etc
2023-06-07 09:53:25,360  to fix this issue, try the dpi switch, or use a patched Xorg dummy driver
2023-06-07 09:53:25,395 client   1 received xdg start menu data
2023-06-07 09:53:25,398 client   1 title= username@servername:~
lpadmin: Forbidden
2023-06-07 09:53:25,403 lpadmin failed and returned error code: 1
2023-06-07 09:53:25,404  verify that user 'username' has all the required permissions
2023-06-07 09:53:25,404  for running: '/usr/sbin/lpadmin'
2023-06-07 09:53:25,404  full command: '/usr/sbin/lpadmin' '-p' 'HTML5-client' '-v' 'xpraforwarder:/tmp?mimetype=application%2Fpdf&socket-path=%2Frun%2Fuser%2F1000%2Fxpra%2Fservername-0&remote-printer=HTML5+client&remote-device-uri=None&source=ee339d4d-f7f2-10be-0a2a-d29cc63f85d7&display=%3A0' '-D' 'Print to PDF in client browser' '-L' 'via xpra' '-E' '-o' 'printer-is-shared=false' '-u' 'allow:username' '-P' '/usr/share/ppd/cupsfilters/Generic-PDF_Printer-PDF.ppd'
2023-06-07 09:53:25,427 client   1 startup complete
2023-06-07 09:53:25,428 client   1 connection-established
2023-06-07 09:53:27,288 client   1 visibilitychange hidden= true connected= true

@totaam
Copy link
Collaborator

totaam commented Jun 7, 2023

A working installation with xpra 3.1.3 shows also this Syntax Error message:

There are many other worrying errors in your server log, which makes me think that this installation was not done correctly.
So I am not going to spend time investigating a bug until I know why that is.

@totaam
Copy link
Collaborator

totaam commented Jun 7, 2023

I don't see any obvious html5 related fixes in the commit log, but I cannot reproduce this problem with the 3.1.5 beta from: https://xpra.org/beta/CentOS/7/

Please try this version first.

totaam added a commit that referenced this issue Jun 8, 2023
the whole str==bytes fiasco makes it impossible for the receiver to correctly distinguish binary data from strings
@totaam
Copy link
Collaborator

totaam commented Jun 8, 2023

Found the problem, not sure why I didn't see it before that.

The commit above fixes that by not using rencodeplus with Python2 builds.
Until 3.1.5 is released, you should be able to use --packet-encoders=bencode to workaround this issue.

@totaam totaam closed this as completed Jun 8, 2023
@totaam
Copy link
Collaborator

totaam commented Jun 8, 2023

This also uncovered some undesired behaviour in the html5 client:

Uncaught TypeError: Cannot read properties of undefined (reading 'toString')
    at Object.s (Utilities.js:453:12)
    at XpraClient._process_hello (Client.js:2385:25)
    at XpraClient._route_packet [as packet_handler] (Client.js:603:3)
    at Worker.<anonymous> (Protocol.js:49:9)
Utilities.js:62 startup complete

That's improved in Xpra-org/xpra-html5@a67f925

@dirkrydvan
Copy link
Author

dirkrydvan commented Jun 9, 2023

Many Thanks!
Yes it works like a charm with the beta version 3.1.5-10.33645xpra1.el7!!!!
An it works also with current version 3.1.4 and the start command
xpra start --start=xterm --bind-tcp=0.0.0.0:8888 --packet-encoders=bencode

Many Thanks!

============================================================================================================================================================================================
 Package                                          Arch                                Version                                              Repository                                   Size
=============================================================================================================================================================================================
Updating:
 python2-xpra                                     x86_64                              3.1.5-10.33645xpra1.el7                              winswitch-beta                              7.2 M
 python2-xpra-client                              x86_64                              3.1.5-10.33645xpra1.el7                              winswitch-beta                              671 k
 python2-xpra-server                              x86_64                              3.1.5-10.33645xpra1.el7                              winswitch-beta                              1.1 M
 xorg-x11-drv-dummy                               x86_64                              0.4.1-1.xpra1.el7                                    winswitch-beta                               13 k
 xpra                                             x86_64                              3.1.5-10.33645xpra1.el7                              winswitch-beta                              104 k
 xpra-common                                      noarch                              3.1.5-10.33645xpra1.el7                              winswitch-beta                              375 k
 xpra-common-client                               noarch                              3.1.5-10.33645xpra1.el7                              winswitch-beta                              108 k
 xpra-common-server                               noarch                              3.1.5-10.33645xpra1.el7                              winswitch-beta                              151 k

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
Development

No branches or pull requests

2 participants