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

Error while connecting to wfreerdp server on Windows side. #9888

Open
8Bit-Cube opened this issue Feb 21, 2024 · 5 comments
Open

Error while connecting to wfreerdp server on Windows side. #9888

8Bit-Cube opened this issue Feb 21, 2024 · 5 comments

Comments

@8Bit-Cube
Copy link

When I am ready to connect after compiling the Windows version of the FreeRDP server, the server pops up an error
[ERROR][com.freerdp.core.peer] - [freerdp_peer_context_new_ex]: ContextNew callback failed
[INFO][com.freerdp.server.windows] - [wf_info_peer_unregister]: Unregistering Peer: id=0, #=-1
[ERROR][com.freerdp.core.peer] - [freerdp_peer_context_new_ex]: ContextNew callback failed
[INFO][com.freerdp.server.windows] - [wf_info_peer_unregister]: Unregistering Peer: id=0, #=-2
In the process of doing debugging to try to find the problem, I found a preprocessing macro definition called WITH_DXGI_1_2, and that macro definition is determined by _WIN32_WINNT >= 0x0602 in other files.
After that I looked for the definition section of the _WIN32_WINNT macro definition in the CMakeLists.txt file and I found that it seems to be determined by the system version again.So I tried adding text to CMakeLists.txt to make my system be judged as WIN10 instead of WIN7, thus making the WITH_DXGI_1_2 value 1. But when I start to compile, I get a linking error:
error LNK2001: unresolved external symbol IID_ID3D11Texture2D
error LNK2001: unresolved external symbol IID_IDXGIAdapter
error LNK2001: unresolved external symbol IID_IDXGIDevice
error LNK2001: unresolved external symbol IID_IDXGIOutput1
error LNK2001: unresolved external symbol IID_IDXGISurface

Environment for reproducing the problem:
Client:
System: Debian12 x64
Bash Output:
[ERROR][com.freerdp.core.transport] - BIO_read returned a system error 104: Connection reset by peer
[ERROR][com.freerdp.core] - transport_read_layer:freerdp_set_last_error_ex ERRCONNECT_CONNECT_TRANSPORT_FAILED [0x0002000D]
[ERROR][com.freerdp.core.transport] - BIO_read returned a system error 104: Connection reset by peer
[ERROR][com.freerdp.core] - transport_read_layer:freerdp_set_last_error_ex ERRCONNECT_CONNECT_TRANSPORT_FAILED [0x0002000D]
[ERROR][com.freerdp.core] - freerdp_post_connect failed
FreeRDP version:
FreeRDP2
Server:
System: Windows 11 x64
Dependencies for CMake Configuration:
avcodec avutil cairo libusb libcrypto SDL2 SDL2_ttf libssl swresample swscale zlib cJSON
Pre:
peer.c
IFCALLRET(client->ContextNew, ret, client, client->context);
if( !ret ) ret is false
wf_info_peer_register(context->info, context)) is false
wf_mirror_driver_activate(wfi) is false
wf_mirror_driver_find_display_device(wfi) is false
_tcscmp(deviceInfo.DeviceString, _T("Mirage Driver")) is not 0
After:
wfreerdp-server wf_fxgi.c
error LNK2001: unresolved external symbol IID_ID3D11Texture2D
error LNK2001: unresolved external symbol IID_IDXGIAdapter
error LNK2001: unresolved external symbol IID_IDXGIDevice
error LNK2001: unresolved external symbol IID_IDXGIOutput1
error LNK2001: unresolved external symbol IID_IDXGISurface

CMake modification section:
    417 | set(CMAKE_WINDOWS_VERSION "WIN7")
                                    to
    417 | set(CMAKE_WINDOWS_VERSION "WIN10")

FreeRDP version:
    Compiled from the latest version
@akallabeth
Copy link
Member

@8Bit-Cube windows shadow and standalone server implementations have not seen updates for years and are unmaintained.
(you should have seen lots of warnings about that during compilation and program startup)

we´re happy to merge pull requests and are looking for a maintainer for such subsystems.

@8Bit-Cube
Copy link
Author

I'll try to modify the CMake and project code related to Windows Server. The last time I committed a CMake code change, there was clang-tidy-review: All jobs have failed. The problem seems to be in the build phase (Annotations: timeout), but there is no problem when building locally with the same configuration, I want to know what happened when clang-tidy-review/build will give an error and how can I fix the code to make it build properly in clang-tidy-review

@akallabeth
Copy link
Member

@8Bit-Cube clang-tidy posts what issues it found in code, just read them?
if you´re referring to #9880 it looks like it passed? sure you read the error right?

still don´t know what you tried to fix there ;)
might sometimes help giving a heads up

@akallabeth
Copy link
Member

@8Bit-Cube also, this is not a CMake thing, but just plain not implemented/maintained at the C code side of things...

@8Bit-Cube
Copy link
Author

Thank you for the lead on this, I will try to read through the code and try to get code to compile properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants