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

shadow does not work on windows: Mega-Issue #4287

Open
stdedos opened this issue Jul 6, 2024 · 16 comments
Open

shadow does not work on windows: Mega-Issue #4287

stdedos opened this issue Jul 6, 2024 · 16 comments
Labels
bug Something isn't working

Comments

@stdedos
Copy link
Collaborator

stdedos commented Jul 6, 2024

Describe the bug
A clear and concise description of what the bug is.

Executing xpra\Xpra-x86_64_6.1-r35869\Xpra-Shadow.exe gives

image

xpra\Xpra-x86_64_6.1-r35869>Xpra_cmd.exe shadow
2024-07-06 10:17:10,996 xpra main error:
Traceback (most recent call last):
  File "E:/xpra/xpra/scripts/main.py", line 139, in main
  File "E:/xpra/xpra/scripts/main.py", line 522, in run_mode
  File "E:/xpra/xpra/scripts/main.py", line 605, in do_run_mode
  File "E:/xpra/xpra/scripts/main.py", line 2115, in run_server
  File "E:/xpra/xpra/scripts/server.py", line 779, in do_run_server
  File "E:/xpra/xpra/scripts/server.py", line 1185, in _do_run_server
ModuleNotFoundError: No module named 'xpra.x11'
  • xpra\Xpra-x86_64_6.1-r35715 is also affected
  • xpra\Xpra-x86_64_6.0-r35620 is working

To Reproduce
Steps to reproduce the behavior:

  1. server command
  2. client command
  3. specific action to trigger the bug

System Information (please complete the following information):

  • Server OS: Ubuntu 20.04.6 LTS
  • Client OS: Microsoft Windows [Version 10.0.18363.836]
  • Xpra Server Version: (see above)
  • Xpra Client Version: (see above)

Additional context
Add any other context about the problem here.
Please see "reporting bugs" in the wiki section.

@stdedos stdedos added the bug Something isn't working label Jul 6, 2024
@totaam
Copy link
Collaborator

totaam commented Jul 6, 2024

Already fixed, is this the latest build available?

@stdedos
Copy link
Collaborator Author

stdedos commented Jul 6, 2024

xpra\Xpra-x86_64_6.1-r35982>Xpra_cmd.exe shadow --bind-ws=0.0.0.0:10000 --no-audio
2024-07-06 10:59:53,359 created ws socket '0.0.0.0:10000'
2024-07-06 10:59:53,361 xpra main error:
Traceback (most recent call last):
  File "E:/xpra/xpra/scripts/main.py", line 139, in main
  File "E:/xpra/xpra/scripts/main.py", line 522, in run_mode
  File "E:/xpra/xpra/scripts/main.py", line 605, in do_run_mode
  File "E:/xpra/xpra/scripts/main.py", line 2115, in run_server
  File "E:/xpra/xpra/scripts/server.py", line 779, in do_run_server
  File "E:/xpra/xpra/scripts/server.py", line 1185, in _do_run_server
ModuleNotFoundError: No module named 'xpra.x11'

@stdedos
Copy link
Collaborator Author

stdedos commented Jul 6, 2024

Is this

2024-07-06 11:03:20,637 CUDA initialization (this may take a few seconds)
2024-07-06 11:03:20,760 CUDA 12.3.0 / PyCUDA 2024.1, found 1 devices:
2024-07-06 11:03:20,760   + NVIDIA GeForce RTX 2080 SUPER @ 0000:01:00.0 (memory: 82% free, compute: 7.5)
2024-07-06 11:03:20,775 NVidia driver version 466.77
2024-07-06 11:03:20,775 Warning: NVidia driver version 466.77 is untested with NVENC
2024-07-06 11:03:20,775  (this encoder has been tested with versions 466.x and later only)
2024-07-06 11:03:20,822  disabling YUV444P and lossless mode
2024-07-06 11:03:20,822  use XPRA_NVENC_YUV444P=1 to force enable
2024-07-06 11:03:20,883  device NVIDIA GeForce RTX 2080 SUPER is not supported: cannot open encoding session: This indicates that an invalid struct version was used by the client., 0 contexts are in use
2024-07-06 11:03:20,884 no valid NVENC devices found
2024-07-06 11:03:21,466 Warning: NvFBC screen capture initialization failed:
2024-07-06 11:03:21,467  NvFBC_GetStatusEx - returned INVALID_TARGET

fixed on the latest version?

(this encoder has been tested with versions 466.x and later only and NVidia driver version 466.77)


Also

2024-07-06 11:07:26,188 Error: failed to create data packet
Traceback (most recent call last):
  File "E:/xpra/xpra/server/window/compress.py", line 2183, in make_data_packet_cb
  File "E:/xpra/xpra/server/window/compress.py", line 2708, in make_data_packet
  File "xpra/codecs/webp/encoder.pyx", line 680, in xpra.codecs.webp.encoder.encode
  File "xpra/codecs/webp/encoder.pyx", line 731, in xpra.codecs.webp.encoder.import_picture
  File "xpra/codecs/webp/encoder.pyx", line 732, in xpra.codecs.webp.encoder.import_picture
AssertionError: pixel buffer is too small: expected at least 27166720 bytes but got 14745600

?


Also

2024-07-06 11:14:14,452  cannot load nvenc (nvenc encoder)
Traceback (most recent call last):
  File "E:/xpra/xpra/codecs/loader.py", line 118, in codec_import_check
  File "xpra/codecs/nvidia/nvenc/encoder.pyx", line 21, in init xpra.codecs.nvidia.nvenc.encoder
  File "E:/xpra/xpra/codecs/nvidia/cuda/context.py", line 37, in <module>
  File "E:/xpra/xpra/util/env.py", line 209, in __enter__
RuntimeError: the numpy import lock is already held by CUDA in thread 91700!
2024-07-06 11:14:18,269 Warning: NvFBC screen capture initialization failed:
2024-07-06 11:14:18,269  NvFBC_GetStatusEx - returned INVALID_TARGET

"lock is held by a thread" that does not exist anymore. Maybe I killed shadow too quickly (because it shot my CPU to 100%, mitigated with --no-audio)
?


Also

2024-07-06 11:17:25,506 2 packets received (5.3K bytes)
2024-07-06 11:17:25,506 2 packets sent (179 bytes)
2024-07-06 11:17:29,532 Error: failed to create SSL socket
2024-07-06 11:17:29,532  from ws socket: <socket.socket fd=3296, family=2, type=1, proto=0, laddr=('192.168.1.4', 10000), raddr=('192.168.1.4', 58414)>
2024-07-06 11:17:29,533  no certificate paths specified
2024-07-06 11:17:29,533  you must specify an 'ssl-cert' file to use ssl sockets
2024-07-06 11:17:29,534 Error: failed to create SSL socket
2024-07-06 11:17:29,534  from ws socket: <socket.socket fd=1280, family=2, type=1, proto=0, laddr=('192.168.1.4', 10000), raddr=('192.168.1.4', 58417)>
2024-07-06 11:17:29,534  no certificate paths specified
2024-07-06 11:17:29,534  you must specify an 'ssl-cert' file to use ssl sockets
2024-07-06 11:17:29,538 Error: failed to create SSL socket
2024-07-06 11:17:29,539  from ws socket: <socket.socket fd=5824, family=2, type=1, proto=0, laddr=('192.168.1.4', 10000), raddr=('192.168.1.4', 58418)>
2024-07-06 11:17:29,539  no certificate paths specified
2024-07-06 11:17:29,539  you must specify an 'ssl-cert' file to use ssl sockets
2024-07-06 11:17:29,539 Error: failed to create SSL socket
2024-07-06 11:17:29,540  from ws socket: <socket.socket fd=5020, family=2, type=1, proto=0, laddr=('192.168.1.4', 10000), raddr=('192.168.1.4', 58419)>
2024-07-06 11:17:29,540 Error: failed to create SSL socket
2024-07-06 11:17:29,540  no certificate paths specified
2024-07-06 11:17:29,540  from ws socket: <socket.socket fd=1528, family=2, type=1, proto=0, laddr=('192.168.1.4', 10000), raddr=('192.168.1.4', 58421)>
2024-07-06 11:17:29,540  you must specify an 'ssl-cert' file to use ssl sockets
2024-07-06 11:17:29,541 Error: failed to create SSL socket
2024-07-06 11:17:29,541  no certificate paths specified
2024-07-06 11:17:29,541  from ws socket: <socket.socket fd=5200, family=2, type=1, proto=0, laddr=('192.168.1.4', 10000), raddr=('192.168.1.4', 58422)>
2024-07-06 11:17:29,541  you must specify an 'ssl-cert' file to use ssl sockets
2024-07-06 11:17:29,541 Error: failed to create SSL socket
2024-07-06 11:17:29,541  no certificate paths specified
2024-07-06 11:17:29,541  from ws socket: <socket.socket fd=6660, family=2, type=1, proto=0, laddr=('192.168.1.4', 10000), raddr=('192.168.1.4', 58424)>
2024-07-06 11:17:29,541 Error: failed to create SSL socket
2024-07-06 11:17:29,542  from ws socket: <socket.socket fd=8120, family=2, type=1, proto=0, laddr=('192.168.1.4', 10000), raddr=('192.168.1.4', 58427)>
2024-07-06 11:17:29,542  no certificate paths specified
2024-07-06 11:17:29,541  you must specify an 'ssl-cert' file to use ssl sockets
2024-07-06 11:17:29,542  no certificate paths specified
2024-07-06 11:17:29,542  you must specify an 'ssl-cert' file to use ssl sockets
2024-07-06 11:17:29,542 Error: failed to create SSL socket
2024-07-06 11:17:29,542  you must specify an 'ssl-cert' file to use ssl sockets
2024-07-06 11:17:29,543  from ws socket: <socket.socket fd=5804, family=2, type=1, proto=0, laddr=('192.168.1.4', 10000), raddr=('192.168.1.4', 58428)>
2024-07-06 11:17:29,543  no certificate paths specified
2024-07-06 11:17:29,543  you must specify an 'ssl-cert' file to use ssl sockets
2024-07-06 11:17:29,544 Error: failed to create SSL socket
2024-07-06 11:17:29,544  from ws socket: <socket.socket fd=5704, family=2, type=1, proto=0, laddr=('192.168.1.4', 10000), raddr=('192.168.1.4', 58430)>
2024-07-06 11:17:29,544  no certificate paths specified
2024-07-06 11:17:29,544  you must specify an 'ssl-cert' file to use ssl sockets
2024-07-06 11:17:43,614 Error: failed to create SSL socket
2024-07-06 11:17:43,614  from ws socket: <socket.socket fd=1404, family=2, type=1, proto=0, laddr=('192.168.1.4', 10000), raddr=('192.168.1.4', 58453)>
2024-07-06 11:17:43,614  no certificate paths specified
2024-07-06 11:17:43,614  you must specify an 'ssl-cert' file to use ssl sockets
2024-07-06 11:17:43,615 Error: failed to create SSL socket
2024-07-06 11:17:43,615  from ws socket: <socket.socket fd=6696, family=2, type=1, proto=0, laddr=('192.168.1.4', 10000), raddr=('192.168.1.4', 58455)>
2024-07-06 11:17:43,616  no certificate paths specified
2024-07-06 11:17:43,616  you must specify an 'ssl-cert' file to use ssl sockets
2024-07-06 11:17:43,620 Error: failed to create SSL socket
2024-07-06 11:17:43,620  from ws socket: <socket.socket fd=4768, family=2, type=1, proto=0, laddr=('192.168.1.4', 10000), raddr=('192.168.1.4', 58456)>
2024-07-06 11:17:43,620 Error: failed to create SSL socket
2024-07-06 11:17:43,620  no certificate paths specified
2024-07-06 11:17:43,621  from ws socket: <socket.socket fd=5576, family=2, type=1, proto=0, laddr=('192.168.1.4', 10000), raddr=('192.168.1.4', 58457)>
2024-07-06 11:17:43,621  no certificate paths specified
2024-07-06 11:17:43,621 Error: failed to create SSL socket
2024-07-06 11:17:43,621  you must specify an 'ssl-cert' file to use ssl sockets
2024-07-06 11:17:43,621  you must specify an 'ssl-cert' file to use ssl sockets
2024-07-06 11:17:43,621 Error: failed to create SSL socket
2024-07-06 11:17:43,621  from ws socket: <socket.socket fd=1284, family=2, type=1, proto=0, laddr=('192.168.1.4', 10000), raddr=('192.168.1.4', 58458)>
2024-07-06 11:17:43,622  from ws socket: <socket.socket fd=7532, family=2, type=1, proto=0, laddr=('192.168.1.4', 10000), raddr=('192.168.1.4', 58462)>
2024-07-06 11:17:43,622  no certificate paths specified
2024-07-06 11:17:43,622  no certificate paths specified
2024-07-06 11:17:43,622  you must specify an 'ssl-cert' file to use ssl sockets
2024-07-06 11:17:43,622  you must specify an 'ssl-cert' file to use ssl sockets
2024-07-06 11:17:43,623 Error: failed to create SSL socket
2024-07-06 11:17:43,623 Error: failed to create SSL socket
2024-07-06 11:17:43,629 Error: failed to create SSL socket
2024-07-06 11:17:43,630  from ws socket: <socket.socket fd=4952, family=2, type=1, proto=0, laddr=('192.168.1.4', 10000), raddr=('192.168.1.4', 58468)>
2024-07-06 11:17:43,630  from ws socket: <socket.socket fd=6016, family=2, type=1, proto=0, laddr=('192.168.1.4', 10000), raddr=('192.168.1.4', 58466)>
2024-07-06 11:17:43,630 Error: failed to create SSL socket
2024-07-06 11:17:43,630  from ws socket: <socket.socket fd=7812, family=2, type=1, proto=0, laddr=('192.168.1.4', 10000), raddr=('192.168.1.4', 58469)>
2024-07-06 11:17:43,630  no certificate paths specified
2024-07-06 11:17:43,630  no certificate paths specified
2024-07-06 11:17:43,629  from ws socket: <socket.socket fd=4768, family=2, type=1, proto=0, laddr=('192.168.1.4', 10000), raddr=('192.168.1.4', 58464)>
2024-07-06 11:17:43,630  no certificate paths specified
2024-07-06 11:17:43,631  you must specify an 'ssl-cert' file to use ssl sockets
2024-07-06 11:17:43,631  you must specify an 'ssl-cert' file to use ssl sockets
2024-07-06 11:17:43,631  no certificate paths specified
2024-07-06 11:17:43,631  you must specify an 'ssl-cert' file to use ssl sockets
2024-07-06 11:17:43,631  you must specify an 'ssl-cert' file to use ssl sockets
2024-07-06 11:17:46,417 Error: failed to create SSL socket
2024-07-06 11:17:46,417  from ws socket: <socket.socket fd=5024, family=2, type=1, proto=0, laddr=('192.168.1.4', 10000), raddr=('192.168.1.4', 58482)>
2024-07-06 11:17:46,417  no certificate paths specified
2024-07-06 11:17:46,418  you must specify an 'ssl-cert' file to use ssl sockets
2024-07-06 11:17:46,419 Error: failed to create SSL socket
2024-07-06 11:17:46,419  from ws socket: <socket.socket fd=6660, family=2, type=1, proto=0, laddr=('192.168.1.4', 10000), raddr=('192.168.1.4', 58483)>
2024-07-06 11:17:46,419  no certificate paths specified
2024-07-06 11:17:46,419  you must specify an 'ssl-cert' file to use ssl sockets
2024-07-06 11:17:46,427 Error: failed to create SSL socket
2024-07-06 11:17:46,427  from ws socket: <socket.socket fd=5200, family=2, type=1, proto=0, laddr=('192.168.1.4', 10000), raddr=('192.168.1.4', 58484)>
2024-07-06 11:17:46,428  no certificate paths specified
2024-07-06 11:17:46,427 Error: failed to create SSL socket
2024-07-06 11:17:46,428  you must specify an 'ssl-cert' file to use ssl sockets
2024-07-06 11:17:46,428 Error: failed to create SSL socket
2024-07-06 11:17:46,428  from ws socket: <socket.socket fd=2816, family=2, type=1, proto=0, laddr=('192.168.1.4', 10000), raddr=('192.168.1.4', 58485)>
2024-07-06 11:17:46,428  from ws socket: <socket.socket fd=3008, family=2, type=1, proto=0, laddr=('192.168.1.4', 10000), raddr=('192.168.1.4', 58487)>
2024-07-06 11:17:46,429  no certificate paths specified
2024-07-06 11:17:46,428  no certificate paths specified
2024-07-06 11:17:46,429  you must specify an 'ssl-cert' file to use ssl sockets
2024-07-06 11:17:46,429 Error: failed to create SSL socket
2024-07-06 11:17:46,429  you must specify an 'ssl-cert' file to use ssl sockets
2024-07-06 11:17:46,428 Error: failed to create SSL socket
2024-07-06 11:17:46,430  from ws socket: <socket.socket fd=5804, family=2, type=1, proto=0, laddr=('192.168.1.4', 10000), raddr=('192.168.1.4', 58490)>
2024-07-06 11:17:46,430  from ws socket: <socket.socket fd=5360, family=2, type=1, proto=0, laddr=('192.168.1.4', 10000), raddr=('192.168.1.4', 58489)>
2024-07-06 11:17:46,430  no certificate paths specified
2024-07-06 11:17:46,431  you must specify an 'ssl-cert' file to use ssl sockets
2024-07-06 11:17:46,431 Error: failed to create SSL socket
2024-07-06 11:17:46,430  no certificate paths specified
2024-07-06 11:17:46,431 Error: failed to create SSL socket
2024-07-06 11:17:46,431  from ws socket: <socket.socket fd=6660, family=2, type=1, proto=0, laddr=('192.168.1.4', 10000), raddr=('192.168.1.4', 58494)>
2024-07-06 11:17:46,431  you must specify an 'ssl-cert' file to use ssl sockets
2024-07-06 11:17:46,431  from ws socket: <socket.socket fd=3008, family=2, type=1, proto=0, laddr=('192.168.1.4', 10000), raddr=('192.168.1.4', 58495)>
2024-07-06 11:17:46,431  no certificate paths specified
2024-07-06 11:17:46,432  no certificate paths specified
2024-07-06 11:17:46,432  you must specify an 'ssl-cert' file to use ssl sockets
2024-07-06 11:17:46,432  you must specify an 'ssl-cert' file to use ssl sockets
2024-07-06 11:17:46,433 Error: failed to create SSL socket
2024-07-06 11:17:46,433  from ws socket: <socket.socket fd=5024, family=2, type=1, proto=0, laddr=('192.168.1.4', 10000), raddr=('192.168.1.4', 58497)>
2024-07-06 11:17:46,433  no certificate paths specified
2024-07-06 11:17:46,433  you must specify an 'ssl-cert' file to use ssl sockets

It's a bit excessive for "just" ticking this once

image

?

@totaam
Copy link
Collaborator

totaam commented Jul 6, 2024

AssertionError: pixel buffer is too small: expected at least 27166720 bytes but got 14745600

Let me try to reproduce this one.
27166720/14745600 = 1.842361111
Could be 24-bit vs 32-bit capture issue, padded to the wrong rowstride.
Does your full shadow log not print the capture backed in use? (it would narrow it down a bit so I don't have to try them all)
Add -d shadow if it doesn't print it.

(this encoder has been tested with versions 466.x and later only and NVidia driver version 466.77)

Derp! c676e35

RuntimeError: the numpy import lock is already held by CUDA in thread 91700!

That's #3483
From now on, the message will be more helpful and should help us figure out which threads are competing for the lock.

Error: failed to create SSL socket

That was already fixed: a9f422e

@stdedos
Copy link
Collaborator Author

stdedos commented Jul 6, 2024

Does your full shadow log not print the capture backed in use? (it would narrow it down a bit so I don't have to try them all)

Do you mean

2024-07-06 12:16:27,463 capture using d3d11screencapturesrc

?

@stdedos
Copy link
Collaborator Author

stdedos commented Jul 6, 2024

Did you miss something

(Xpra_cmd.exe:18984): Gtk-WARNING **: 12:18:19.889: Could not find the icon 'xpra-ms windows-color'. The 'hicolor' theme
was not found either, perhaps you need to install it.
You can get a copy from:
        http://icon-theme.freedesktop.org/releases

or is it "one of those errors"?

@totaam
Copy link
Collaborator

totaam commented Jul 6, 2024

Do you mean
d3d11screencapturesrc

Yes.
Thanks.
Problem is, this one requires real hardware - doesn't work in VirtualBox.
Maybe I can force enable it and still trigger the bug.

@stdedos
Copy link
Collaborator Author

stdedos commented Jul 6, 2024

... Or you need

2024-07-06 12:28:05,860 xpra shadow server version 6.0-r35620 (g79036646b) beta
2024-07-06 12:28:05,861  running with pid 39680 on Microsoft Windows Microsoft Windows 10
2024-07-06 12:28:05,862  cpython 3.11
2024-07-06 12:28:05,862  on display 'Default' of size 4480x1516
2024-07-06 12:28:05,863  with 2 monitors:
2024-07-06 12:28:05,863   DISPLAY23        2560x1440 at    0,0
2024-07-06 12:28:05,863   DISPLAY24        1920x1080 at 2560,436

?

@totaam
Copy link
Collaborator

totaam commented Jul 6, 2024

Could not find the icon 'xpra-ms windows-color'.
The 'hicolor' theme was not found either, perhaps you need to install it.
or is it "one of those errors"?

You guessed well.
The strings xpra-ms and window-color don't exist in the xpra source.
So somewhere GTK is deciding that it really needs those things for something... (and I have absolutely no idea what that could be)

See Gtk-3.0.gir:
set_search_path : Sets the search path for the icon theme object. When looking for an icon theme, GTK+ will search for a subdirectory of one or more of the directories in @path with the same name as the icon theme containing an index.theme file. (Themes from multiple of the path elements are combined to allow themes to be extended by adding icons in the user's home directory.)
In addition if an icon found isn't found either in the current icon theme or the default icon theme, and an image file with the right name is found directly in one of the elements of @path, then that image will be used for the icon name.
(This is legacy feature, and new icons should be put into the fallback icon theme, which is called hicolor, rather than directly on the icon path.)

We have Adwaita in Xpra/share/icons/.
I would rather not bundle hicolor as we used to. It's not huge at 500KB, but that's 38 files in 707 directories...

totaam added a commit that referenced this issue Jul 6, 2024
so we have to decode them before calling LogonUser
@stdedos stdedos changed the title shadow does not work on windows shadow does not work on windows: Mega-Issue Jul 6, 2024
@stdedos
Copy link
Collaborator Author

stdedos commented Jul 6, 2024

I would rather not bundle hicolor as we used to. It's not huge at 500KB, but that's 38 files in 707 directories...

... I don't have any concrete sensible reasons, but I tend to share that sentiment 😓

Idk why it could not be "one big zip-file", load it into memory, and "read it from there"

@aaron26122
Copy link

Having the same SSL bug with you must you must specify an 'ssl-cert' file to use ssl sockets, even though I have given a ssl key and certificate on the server but on windows its a big bug. hope this can be resolved

@totaam
Copy link
Collaborator

totaam commented Jul 8, 2024

@aaron26122 I have no idea what you are talking about, this ticket is not about ssl.

@aaron26122
Copy link

He mentioned something about ticking a box that isn't shown in the client side only the html side, thats for ssl

@totaam
Copy link
Collaborator

totaam commented Jul 8, 2024

@aaron26122 @stdedos 's issue (which was already fixed when reported) is that attempting to connect with SSL enabled to a server which is not configured for SSL triggers the same warning multiple times.
You said "I have given a ssl key..." so this is extremely unlikely to be related.

@aaron26122
Copy link

ok thx

@totaam
Copy link
Collaborator

totaam commented Nov 23, 2024

@stdedos can you help me figure out what still needs doing in this ticket?
(or can we close it?)

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

3 participants