mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-15 14:16:02 -06:00
[GH-ISSUE #609] Combo Issue: Failed to connect to desktop path/Open SSL not connecting #479
Labels
No labels
HiDPI
bounty
bsd/freebsd
bsd/openbsd
bug
bug
build-infra
cantfix
critical
doc
duplicate
enhancement
fix-available
from git
from release
good first issue
help wanted
installer/package
invalid
linux
macOS
meta
needs testing
pull-request
query
question
regression
regression
v2.4.0
windows
wontfix
work-in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/barrier#479
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @TheFabled1 on GitHub (Apr 3, 2020).
Original GitHub issue: https://github.com/debauchee/barrier/issues/609
Operating Systems
Server: N0t-y0urs-bt-m1n3
OS Version: Windows 10 Pro ver 1903 ( build 18382.720)
Client: LT1083 (due to privacy cannot provide full screen name)
READ ME, DELETE ME: On Windows, hold the Windows key and press 'r', type 'winver' and hit return to get your OS version. On Mac, hit the Apple menu (top left of the screen) and check 'About this Mac'. Linux users... you know what you're using ;)
Barrier Version
Barrier Version 2.3.2
&
barrier Version 2.3.1-snapshot-58d8f020
https://github.com/debauchee/barrier/
Steps to reproduce bug
Info: OpenSSL 1.0.2L 5/25/2017"
Other info
Here is the error log if need to see:
Server-
[2020-04-03T13:59:53] INFO: starting server
[2020-04-03T13:59:53] INFO: config file: ".../AppData/Local/Temp/Barrier.sBQdMI"
[2020-04-03T13:59:53] INFO: log level: INFO
[2020-04-03T13:59:53] INFO: service command updated
[2020-04-03T13:59:53] INFO: starting new process as privileged user
[2020-04-03T13:59:53] INFO: drag and drop enabled
[2020-04-03T13:59:53] ERROR: failed to get desktop path, no drop target available, error=2
[2020-04-03T13:59:53] NOTE: started server (IPv4/IPv6), waiting for clients
[2020-04-03T13:59:53] INFO: server status: active
Client-
[2020-04-03T14:31:35] NOTE: connecting to '192.168.0.3': 192.168.0.3:24800
[2020-04-03T14:31:35] INFO: OpenSSL 1.0.2l 25 May 2017
@TheFabled1 commented on GitHub (Apr 3, 2020):
IF anyone can look into this issu that would be great, I've been attempting to stop Barrier Service through Services.MSC, fully closing Barrier on both devices, Reload multiple times with no effort.
@ysguy commented on GitHub (Jun 26, 2020):
I have the same issue and i am fairly sure its related to a redirected desktop path. I use OneDrive (business) and redirect my desktop to OneDrive. Pretty sure the path analysis algo is hating the redirect. The correct way to monitor this path would be to read it from the registry.
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
The ready the REG_EXPAND_SZ for the item 'Desktop'
Any other way is wrong, I'm going to rip through the code and see if I can find the way that it is trying to guess the path.
Update
This is the actual code fetching the path:
// SHGetFolderPath is deprecated in vista, but use it for xp support. char desktopPath[MAX_PATH]; if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_DESKTOP, NULL, 0, desktopPath))) { m_desktopPath = std::string(desktopPath); LOG((CLOG_DEBUG "using desktop for drop target: %s", m_desktopPath.c_str())); } else { LOG((CLOG_ERR "failed to get desktop path, no drop target available, error=%d", GetLastError())); }Now you can see that SHGetFolderPath is being called to fetch the CSIDL_DESKTOP path. This function is actually deprecated and calls the replacement: SHGetKnownFolderPath
If you go here: https://stackoverflow.com/questions/7200679/shgetknownfolderpath-environment-getfolderpath-returning-wrong-value-for-pub
You can see in the bottom post that there is a problem with 32-bit compiled apps fetching the path on a 64-bit system. It returns the wrong value. Now i am no windows coder, far from it. So this could all be bunk. I may try digging deeper.
Edit: Just realized it only supports 64-bit systems, so the code should be compiled for 64-bit calls.
So [this ](**https://devblogs.microsoft.com/oldnewthing/20090730-00/?p=17293
**)pretty much proves that the code is correct from a call standpoint. Whether there is a microsoft bug behind the scenes is still a possibility.
OK Final speculation, it appears that the code may not be right for the desktop path.
I suspect this may work, but what do i know.
// SHGetFolderPath is deprecated in vista, but use it for xp support. char desktopPath[MAX_PATH]; if (SUCCEEDED(SHGetKnownFolderPath(FOLDERID_Desktop, 0, NULL, desktopPath))) { m_desktopPath = std::string(desktopPath); LOG((CLOG_DEBUG "using desktop for drop target: %s", m_desktopPath.c_str())); } else { LOG((CLOG_ERR "failed to get desktop path, no drop target available, error=%d", GetLastError())); }Specifically this line: if (SUCCEEDED(SHGetKnownFolderPath(FOLDERID_Desktop, 0, NULL, desktopPath))) {
which is taken from examples here: https://cpp.hotexamples.com/examples/-/-/SHGetKnownFolderPath/cpp-shgetknownfolderpath-function-examples.html
I dont know how to compile it though.. I am no windows coder.
@Chirishman commented on GitHub (Jul 24, 2020):
I'm having this same problem
@shymega commented on GitHub (Jul 24, 2020):
Its a normal error. Not related to this issue. I suspect its simply a network issues...
On this date - Fri, Jun 26, 2020 at 03:32:41PM -0700, ysguy wrote:
--
Kind regards,
Dom Rodriguez (shymega)
@github-actions[bot] commented on GitHub (Sep 25, 2020):
This issue has been automatically marked as stale due to inactivity. It will be closed if no further activity occurs. Thank you for your contributions.
@succeedmr123 commented on GitHub (Oct 13, 2020):
[Workaround SOLUTION, made during investigation:
Find and enter the correct server LAN interface IP manually in client
Root Cause: server faulty autodetect routine, due to not being able to distinguish what VM and WSL virtual network interfaces are, etc, vs. real hardware ports, which are normally wifi and cable network. Due to that fact, it offers faulty choices, and send faulty choices for client to autodetect, and then the connection via IP can not be tunneled due to wrong IP sent to client]
Short desc:
Confirmed - Experiencing the same behaviour, and the system is unusable due to error connecting two machines.
Detailed: the client machine knows the IP of server machine, but when trying to connect, the error occurs;
Setup:
*two Windows 10 64 bit machines. one v1909, the other 2004, although I doubt it really matters
*Barrier installed on both machines
*set them up as server, and client.
*drag drop in server position of a client machine, under, config interactively, and entered windows machine name
*Result: does not work
Observation:
*CLient is under the correct machine name, correctly configured under interactive config screen "board of rectangles"
Investigation instructions:
find that the idea is not directly supported in Barrier front-end, neither in main IP config, nor in Configure server/double click to config machine. Therefore, let us try manually editing barrier config file
7.Result: on my machine it is nonexistent, and do not have docs on file format at the moment
[EDIT: we go to the workaround solution here until the autodetect routine get made to properly distuinguish between real network interface and VM, WSL etc. virtual network local-only NAT interfaces]
Workaround-Solved!
Original log when the machines recognise each other by Machine name, but the client fail to talk back to server on the real network interface IP as wrong server IP was offered to the client, based on a faulty autodetect routine
SERVER LOG:
[2020-10-13T09:38:54] INFO: starting server
[2020-10-13T09:38:54] INFO: config file: C:/Users/[anonymised]/AppData/Local/Temp/Barrier.[anon]
[2020-10-13T09:38:54] INFO: log level: INFO
[2020-10-13T09:38:54] INFO: service command updated
[2020-10-13T09:38:54] INFO: service command updated
[2020-10-13T09:38:54] INFO: got ipc shutdown message
[2020-10-13T09:38:54] NOTE: stopped server
[2020-10-13T09:38:55] INFO: process [anonymised] was shutdown gracefully
[2020-10-13T09:38:56] INFO: starting new process as privileged user
[2020-10-13T09:38:56] INFO: drag and drop enabled
[2020-10-13T09:38:56] ERROR: failed to get desktop path, no drop target available, error=2
started server (IPv4/IPv6), waiting for clients
server status: active
server status: active
CLIENT LOG:
[2020-10-13T09:39:15] WARNING: failed to connect to server: Timed out
[2020-10-13T09:39:16] NOTE: connecting to '[anonymised_server_IP]': [anonymised_server_IP]:[anonymised_server_port]
[2020-10-13T09:39:16] INFO: OpenSSL 1.0.2l 25 May 2017
[2020-10-13T09:39:18] INFO: starting client
[2020-10-13T09:39:18] INFO: config file: C:/Users/[anonymised]/AppData/Local/Temp/Barrier.[anon]
[2020-10-13T09:39:18] INFO: log level: INFO
[2020-10-13T09:39:18] INFO: service command updated
[2020-10-13T09:39:18] INFO: service command updated
[2020-10-13T09:39:19] INFO: got ipc shutdown message
[2020-10-13T09:39:19] NOTE: stopped client
[2020-10-13T09:39:20] INFO: process [anonymised] was shutdown gracefully
[2020-10-13T09:39:20] INFO: starting new process as privileged user
[2020-10-13T09:39:20] INFO: drag and drop enabled
[2020-10-13T09:39:20] ERROR: failed to get desktop path, no drop target available, error=2
[2020-10-13T09:39:20] NOTE: started client
[2020-10-13T09:39:20] NOTE: connecting to '[anonymised_server_IP]': [anonymised_server_IP]:[anonymised_server_port]
[2020-10-13T09:39:20] INFO: OpenSSL 1.0.2l 25 May 2017
server status: active
[2020-10-13T09:39:36] WARNING: failed to connect to server: Timed out
[2020-10-13T09:39:37] NOTE: connecting to '[anonymised_server_IP]': [anonymised_server_IP]:[anonymised_server_port]
[2020-10-13T09:39:37] INFO: OpenSSL 1.0.2l 25 May 2017
[2020-10-13T09:39:52] WARNING: failed to connect to server: Timed out
[2020-10-13T09:39:53] NOTE: connecting to '[anonymised_server_IP]': [anonymised_server_IP]:[anonymised_server_port]
[2020-10-13T09:39:53] INFO: OpenSSL 1.0.2l 25 May 2017
[2020-10-13T09:40:08] WARNING: failed to connect to server: Timed out
[2020-10-13T09:40:09] NOTE: connecting to '[anonymised_server_IP]': [anonymised_server_IP]:[anonymised_server_port]
[2020-10-13T09:40:09] INFO: OpenSSL 1.0.2l 25 May 2017
[2020-10-13T09:40:24] WARNING: failed to connect to server: Timed out
[2020-10-13T09:40:25] NOTE: connecting to '[anonymised_server_IP]': [anonymised_server_IP]:[anonymised_server_port]
[2020-10-13T09:40:25] INFO: OpenSSL 1.0.2l 25 May 2017
[2020-10-13T09:40:40] WARNING: failed to connect to server: Timed out
[2020-10-13T09:40:41] NOTE: connecting to '[anonymised_server_IP]': [anonymised_server_IP]:[anonymised_server_port]
[2020-10-13T09:40:41] INFO: OpenSSL 1.0.2l 25 May 2017
[2020-10-13T09:40:56] WARNING: failed to connect to server: Timed out
[2020-10-13T09:40:57] NOTE: connecting to '[anonymised_server_IP]': [anonymised_server_IP]:[anonymised_server_port]
[2020-10-13T09:40:57] INFO: OpenSSL 1.0.2l 25 May 2017
[2020-10-13T09:41:12] WARNING: failed to connect to server: Timed out
[2020-10-13T09:41:13] NOTE: connecting to '[anonymised_server_IP]': [anonymised_server_IP]:[anonymised_server_port]
[2020-10-13T09:41:13] INFO: OpenSSL 1.0.2l 25 May 2017
[2020-10-13T09:41:28] WARNING: failed to connect to server: Timed out
[2020-10-13T09:41:29] NOTE: connecting to '[anonymised_server_IP]': [anonymised_server_IP]:[anonymised_server_port]
[2020-10-13T09:41:29] INFO: OpenSSL 1.0.2l 25 May 2017
[2020-10-13T09:41:44] WARNING: failed to connect to server: Timed out
[2020-10-13T09:41:45] NOTE: connecting to '[anonymised_server_IP]': [anonymised_server_IP]:[anonymised_server_port]
[2020-10-13T09:41:45] INFO: OpenSSL 1.0.2l 25 May 2017
[2020-10-13T09:42:00] WARNING: failed to connect to server: Timed out
[2020-10-13T09:42:01] NOTE: connecting to '[anonymised_server_IP]': [anonymised_server_IP]:[anonymised_server_port]
[2020-10-13T09:42:01] INFO: OpenSSL 1.0.2l 25 May 2017
[2020-10-13T09:42:16] WARNING: failed to connect to server: Timed out
[2020-10-13T09:42:17] NOTE: connecting to '[anonymised_server_IP]': [anonymised_server_IP]:[anonymised_server_port]
[2020-10-13T09:42:17] INFO: OpenSSL 1.0.2l 25 May 2017
[2020-10-13T09:42:32] WARNING: failed to connect to server: Timed out
[2020-10-13T09:42:33] NOTE: connecting to '[anonymised_server_IP]': [anonymised_server_IP]:[anonymised_server_port]
[2020-10-13T09:42:33] INFO: OpenSSL 1.0.2l 25 May 2017
[2020-10-13T09:42:48] WARNING: failed to connect to server: Timed out
[2020-10-13T09:42:49] NOTE: connecting to '[anonymised_server_IP]': [anonymised_server_IP]:[anonymised_server_port]
[2020-10-13T09:42:49] INFO: OpenSSL 1.0.2l 25 May 2017
[2020-10-13T09:43:04] WARNING: failed to connect to server: Timed out
[2020-10-13T09:43:05] NOTE: connecting to '[anonymised_server_IP]': [anonymised_server_IP]:[anonymised_server_port]
[2020-10-13T09:43:05] INFO: OpenSSL 1.0.2l 25 May 2017
[2020-10-13T09:43:20] WARNING: failed to connect to server: Timed out
[2020-10-13T09:43:21] NOTE: connecting to '[anonymised_server_IP]': [anonymised_server_IP]:[anonymised_server_port]
[2020-10-13T09:43:21] INFO: OpenSSL 1.0.2l 25 May 2017
[2020-10-13T09:43:36] WARNING: failed to connect to server: Timed out
[2020-10-13T09:43:37] NOTE: connecting to '[anonymised_server_IP]': [anonymised_server_IP]:[anonymised_server_port]
[2020-10-13T09:43:37] INFO: OpenSSL 1.0.2l 25 May 2017
[2020-10-13T09:43:52] WARNING: failed to connect to server: Timed out
[2020-10-13T09:43:53] NOTE: connecting to '[anonymised_server_IP]': [anonymised_server_IP]:[anonymised_server_port]
[2020-10-13T09:43:53] INFO: OpenSSL 1.0.2l 25 May 2017
[2020-10-13T09:44:08] WARNING: failed to connect to server: Timed out
[2020-10-13T09:44:09] NOTE: connecting to '[anonymised_server_IP]': [anonymised_server_IP]:[anonymised_server_port]
[2020-10-13T09:44:09] INFO: OpenSSL 1.0.2l 25 May 2017
[2020-10-13T09:44:24] WARNING: failed to connect to server: Timed out
[2020-10-13T09:44:25] NOTE: connecting to '[anonymised_server_IP]': [anonymised_server_IP]:[anonymised_server_port]
[2020-10-13T09:44:25] INFO: OpenSSL 1.0.2l 25 May 2017
[2020-10-13T09:44:40] WARNING: failed to connect to server: Timed out
[2020-10-13T09:44:41] NOTE: connecting to '[anonymised_server_IP]': [anonymised_server_IP]:[anonymised_server_port]
[2020-10-13T09:44:41] INFO: OpenSSL 1.0.2l 25 May 2017
[2020-10-13T09:44:56] WARNING: failed to connect to server: Timed out
[2020-10-13T09:44:57] NOTE: connecting to '[anonymised_server_IP]': [anonymised_server_IP]:[anonymised_server_port]
[2020-10-13T09:44:57] INFO: OpenSSL 1.0.2l 25 May 2017
[2020-10-13T09:45:12] WARNING: failed to connect to server: Timed out
[2020-10-13T09:45:13] NOTE: connecting to '[anonymised_server_IP]': [anonymised_server_IP]:[anonymised_server_port]
[2020-10-13T09:45:13] INFO: OpenSSL 1.0.2l 25 May 2017
[2020-10-13T09:45:28] WARNING: failed to connect to server: Timed out
[2020-10-13T09:45:29] NOTE: connecting to '[anonymised_server_IP]': [anonymised_server_IP]:[anonymised_server_port]
[2020-10-13T09:45:29] INFO: OpenSSL 1.0.2l 25 May 2017
[2020-10-13T09:45:44] WARNING: failed to connect to server: Timed out
[2020-10-13T09:45:45] NOTE: connecting to '[anonymised_server_IP]': [anonymised_server_IP]:[anonymised_server_port]
[2020-10-13T09:45:45] INFO: OpenSSL 1.0.2l 25 May 2017
[2020-10-13T09:46:00] WARNING: failed to connect to server: Timed out
[2020-10-13T09:46:01] NOTE: connecting to '[anonymised_server_IP]': [anonymised_server_IP]:[anonymised_server_port]
[2020-10-13T09:46:01] INFO: OpenSSL 1.0.2l 25 May 2017
[2020-10-13T09:46:16] WARNING: failed to connect to server: Timed out
[2020-10-13T09:46:17] NOTE: connecting to '[anonymised_server_IP]': [anonymised_server_IP]:[anonymised_server_port]
[2020-10-13T09:46:17] INFO: OpenSSL 1.0.2l 25 May 2017