Xpra-org / xpra

Persistent remote applications for X11; screen sharing for X11, MacOS and MSWindows.
https://xpra.org/
GNU General Public License v2.0
1.94k stars 169 forks source link

xpra html5 client is broken in xenial PPA - 2.1.1-r16658-1 #1626

Closed totaam closed 7 years ago

totaam commented 7 years ago

Issue migrated from trac ticket # 1626

component: html5 | priority: major | resolution: invalid

2017-08-16 18:23:21: schwim created the issue


I updated from the PPA last week and noticed the html5 client no longer works. I just get an empty white screen instead of windows loading. I was able to fix this by copying the /usr/share/xpra/www folder from a system that had a prior working install on it.

A hint may be here:

Files www.broken/connect.html and www/connect.html differ
Only in www.broken: connect.html.br
Only in www.broken: connect.html.gz
Common subdirectories: www.broken/css and www/css
Only in www.broken: favicon.ico.br
Only in www.broken: favicon.ico.gz
Files www.broken/favicon.png and www/favicon.png differ
Common subdirectories: www.broken/icons and www/icons
Files www.broken/index.html and www/index.html differ
Only in www.broken: index.html.br
Only in www.broken: index.html.gz
Common subdirectories: www.broken/js and www/js
totaam commented 7 years ago

2017-08-16 18:25:18: antoine changed owner from antoine to Greg Schwimer

totaam commented 7 years ago

2017-08-16 18:25:18: antoine commented


Just tested and could not reproduce any problems whatsoever with both the 2.1 (stable) version and 2.2 beta.

Please see ReportingBugs, in particular in your case: the browser, etc.. Maybe also the javascript console output, server log, etc.

You may also want to see if deleting all the ".gz" and ".br" files helps. Those are optional anyway.

totaam commented 7 years ago

2017-08-16 19:00:59: schwim commented


This is with Google Chrome Version 60.0.3112.90 and Safari 10.1.2 on OSX 10.12.6 Sierra.

I'm able to reproduce on two xenial systems (Linux Mint) when upgrading from PPA.

Javascript console output shows errors with the broken code:

index.html:20 GET http://172.16.254.254:9999/js/lib/jquery.js 
index.html:20 GET http://172.16.254.254:9999/js/lib/jquery.js 
jquery-ui.js:14 Uncaught ReferenceError: jQuery is not defined
    at jquery-ui.js:14
    at jquery-ui.js:16
(anonymous) @ jquery-ui.js:14
(anonymous) @ jquery-ui.js:16
Notifications.js:10 Uncaught ReferenceError: $ is not defined
    at Notifications.js:10
(anonymous) @ Notifications.js:10
index.html?server=172.16.254.254&port=9999&encoding=auto&keyboard_layout=us&submit=true&clipboard=true:117 Uncaught ReferenceError: $ is not defined
    at index.html?server=172.16.254.254&port=9999&encoding=auto&keyboard_layout=us&submit=true&clipboard=true:117
(anonymous) @ index.html?server=172.16.254.254&port=9999&encoding=auto&keyboard_layout=us&submit=true&clipboard=true:117
totaam commented 7 years ago

2017-08-16 19:03:15: schwim commented


xpra is being started as follows:

xpra start :99 --bind-tcp=0.0.0.0:9999 --html=on --start-child mate-terminal

xpra showconfig output:

add-printer-options            = '-E', '-o printer-is-shared=false', '-u allow:$USER'
attach                         = None
auth                           = ''
auto-refresh-delay             = 0.15
av-sync                        = True
bell                           = True
bind                           = 'auto'
bind-ssl                       = []
bind-tcp                       = []
bind-vsock                     = []
border                         = 'auto,5:off'
chdir                          = ''
clipboard                      = 'yes'
clipboard-direction            = 'both'
clipboard-filter-file           = ''
compression_level              = 1
compressors                    = 'lz4', 'lzo', 'zlib'
csc-modules                    = 'swscale'
cursors                        = True
daemon                         = True
dbus-control                   = True
dbus-launch                    = 'dbus-launch --close-stderr'
dbus-proxy                     = True
debug                          = ''
delay-tray                     = False
desktop-fullscreen             = False
desktop-scaling                = 'auto'
display                        = ''
download-path                  = '~'
dpi                            = 0
encoding                       = ''
encodings                      = 'h264', 'vp9', 'vp8', 'mpeg4', 'mpeg4+mp4', 'h264+mp4', 'mpeg4+mp4', 'vp8+webm', 'vp9+webm', 'png', 'png/P', 'png/L', 'rgb', 'rgb24', 'rgb32', 'jpeg', 'h265'
encryption                     = ''
encryption-keyfile             = ''
env                            = []
exec-wrapper                   = ''
exit-ssh                       = True
exit-with-children             = False
exit-with-client               = False
fake-xinerama                  = True
file-size-limit                = 100
file-transfer                  = True
gid                            = 0
global-menus                   = True
html                           = 'auto'
idle-timeout                   = 0
input-devices                  = 'auto'
input-method                   = 'none'
key-shortcut                   = 'Control+Menu:toggle_keyboard_grab', 'Shift+Menu:toggle_pointer_grab', 'Shift+F11:toggle_fullscreen', 'Meta+Shift+F1:show_menu', 'Meta+Shift+F2:show_start_new_command', 'Meta+Shift+F3:show_bug_report', 'Meta+Shift+F4:quit', 'Meta+Shift+F5:increase_quality', 'Meta+Shift+F6:decrease_quality', 'Meta+Shift+F7:increase_speed', 'Meta+Shift+F8:decrease_speed', 'Meta+Shift+F10:magic_key', 'Meta+Shift+F11:show_session_info', 'Meta+Shift+F12:toggle_debug', 'Meta+Shift+plus:scaleup', 'Meta+Shift+minus:scaledown', 'Meta+Shift+underscore:scaledown', 'Meta+Shift+KP_Add:scaleup', 'Meta+Shift+KP_Subtract:scaledown', 'Meta+Shift+KP_Multiply:scalereset', 'Meta+Shift+bar:scalereset', 'Meta+Shift+question:scalingoff'
keyboard-layout                = ''
keyboard-layouts               = []
keyboard-options               = ''
keyboard-raw                   = False
keyboard-sync                  = True
keyboard-variant               = ''
keyboard-variants              = []
local-clipboard                = 'CLIPBOARD'
log-dir                        = 'auto'
log-file                       = '$DISPLAY.log'
lpadmin                        = '/usr/sbin/lpadmin'
lpinfo                         = '/usr/sbin/lpinfo'
max-size                       = ''
mdns                           = True
microphone                     = 'off'
microphone-codec               = []
min-quality                    = 30
min-speed                      = 30
mmap                           = 'yes'
mmap-group                     = False
mousewheel                     = 'on'
notifications                  = True
open-command                   = 'xdg-open'
open-files                     = False
opengl                         = None
packet-encoders                = 'rencode', 'bencode', 'yaml'
password                       = ''
password-file                  = ''
pdf-printer           (used)   = ''                                <type 'str'>
pdf-printer          (default) = '/usr/share/ppd/cupsfilters/Generic-PDF_Printer-PDF.ppd'  <type 'str'>
pidfile                        = ''
pings                          = 5
pixel-depth                    = 0
postscript-printer             = 'drv:///sample.drv/generic.ppd'
printing                       = True
proxy-start-sessions           = True
proxy-video-encoders           = []
pulseaudio                     = None
pulseaudio-command             = 'pulseaudio --start -n --daemonize=false --system=false --exit-idle-time=-1 --load=module-suspend-on-idle '--load=module-null-sink sink_name="Xpra-Speaker" sink_properties=device.description="Xpra\ Speaker"' '--load=module-null-sink sink_name="Xpra-Microphone" sink_properties=device.description="Xpra\ Microphone"' --load=module-native-protocol-unix --load=module-dbus-protocol --log-level=2 --log-target=stderr'
pulseaudio-configure-commands           = 'pactl set-default-sink Xpra-Speaker', 'pactl set-default-source Xpra-Microphone.monitor'
quality                        = 0
readonly                       = False
remote-clipboard               = 'CLIPBOARD'
remote-logging                 = 'both'
remote-xpra                    = '~/.xpra/run-xpra', '$XDG_RUNTIME_DIR/xpra/run-xpra', 'xpra', '/usr/local/bin/xpra'
resize_display                 = True
server-idle-timeout            = 0
session-name                   = ''
sharing                        = False
socket-dir                     = ''
socket-dirs           (used)   = '/run/user/$UID/xpra', '~/.xpra', '/run/xpra'  <type 'list'>
socket-dirs          (default) = '/run/user/$UID/xpra', '/run/xpra'  <type 'list'>
socket-permissions             = '600'
sound-source                   = ''
speaker                        = 'on'
speaker-codec                  = []
speed                          = 0
ssh                            = 'ssh -x'
ssl                            = 'auto'
ssl-auth                       = ''
ssl-ca-certs                   = 'default'
ssl-ca-data                    = ''
ssl-cert                       = ''
ssl-check-hostname             = False
ssl-ciphers                    = 'DEFAULT'
ssl-client-verify-mode           = 'optional'
ssl-key                        = ''
ssl-options                    = 'ALL,NO_COMPRESSION'
ssl-protocol                   = 'TLSv1_2'
ssl-server-hostname            = 'localhost'
ssl-server-verify-mode           = 'required'
ssl-verify-flags               = 'X509_STRICT'
start                          = []
start-after-connect            = []
start-child                    = []
start-child-after-connect           = []
start-child-on-connect           = []
start-env                      = '#avoid Ubuntu's global menu, which is a mess and cannot be forwarded:', 'UBUNTU_MENUPROXY=', 'QT_X11_NO_NATIVE_MENUBAR=1', '#fix for MainSoft's MainWin buggy window management:', 'MWNOCAPTURE=true', 'MWNO_RIT=true', 'MWWM=allwm', '#force GTK3 applications to use X11 so we can intercept them:', 'GDK_BACKEND=x11'
start-new-commands             = False
start-on-connect               = []
start-via-proxy                = None
sync-xvfb                      = 0
system-proxy-socket            = '/run/xpra/system'
system-tray                    = True
systemd-run                    = 'auto'
systemd-run-args               = ''
tcp-auth                       = ''
tcp-encryption                 = ''
tcp-encryption-keyfile           = ''
tcp-proxy                      = ''
terminate-children             = False
title                          = '@title@ on @client-machine@'
tray                           = True
tray-icon                      = ''
uid                            = 0
use-display                    = False
username                       = 'root'
video-decoders                 = 'avcodec2', 'vpx'
video-encoders                 = 'x264', 'vpx', 'nvenc', 'ffmpeg'
video-scaling                  = 1
vsock-auth                     = ''
webcam                         = 'auto'
window-close                   = 'auto'
window-icon                    = ''
windows                        = True
wm-name                        = 'Xpra'
xsettings                      = True
xvfb                  (used)   = 'Xvfb +extension Composite -screen 0 5760x2560x24+32 -dpi 96 -nolisten tcp -noreset -auth $XAUTHORITY'  <type 'str'>
xvfb                 (default) = '/usr/lib/xorg/Xorg -noreset -novtswitch -nolisten tcp +extension GLX +extension RANDR +extension RENDER -auth $XAUTHORITY -logfile ${XPRA_LOG_DIR}/Xorg.${DISPLAY}.log -configdir ${HOME}/.xpra/xorg.conf.d -config /etc/xpra/xorg.conf'  <type 'str'>
totaam commented 7 years ago

2017-08-16 22:46:43: schwim removed owner (was Greg Schwimer)

totaam commented 7 years ago

2017-08-16 22:46:43: schwim commented


Looks like the problem is with the jquery.js. The problem may be in /usr/share/xpra/www/js/lib where jquery.js is linked to a non-existing file on these new installs:

lrwxrwxrwx 1 root root     39 Aug  7 14:32 jquery.js -> ../../../../javascript/jquery/jquery.js

placing a copy of jquery.js directly in the /usr/share/xpra/www/js/lib folder seems to fix things.

totaam commented 7 years ago

2017-08-17 06:36:54: antoine changed status from new to closed

totaam commented 7 years ago

2017-08-17 06:36:54: antoine set resolution to invalid

totaam commented 7 years ago

2017-08-17 06:36:54: antoine commented


libjs-jquery is a recommended package when you install xpra and should have been installed automatically. You must have changed your default apt system configuration or used a special installation command to ignore this dependency and that's why you're missing this file. Don't do that. You should mention that in your bug reports in the future as per ReportingBugs to save everyone some time.

totaam commented 7 years ago

2017-08-18 05:27:49: schwim commented


Correct. libjs-jquery is indeed a recommended package as I can see from "apt-get show xpra". It does not install by default on the (now) three Linux Mint systems I have tried this on because the default is to not install recommended packages. I don't know if this is correct behavior for the distribution, but it is what it is.

I'm documenting this here in case it is helpful to others.

From /etc/apt/apt.conf.d/00recommends:

APT::Install-Recommends "false";

So, libjs-jquery will not install as a recommended package. Perhaps it should be a dependency to ensure it will be installed since it is required.

totaam commented 7 years ago

2017-08-18 14:50:03: antoine commented


  • mint is not a [/wiki/Platforms supported platform] though xenial is (this ticket is a good example of why that is)
  • debian packages have 3 types of dependencies (depends, recommends, suggests) and this is the correct setting for functionality that is optional
  • with r16704 onwards you will get a warning telling you to install jquery