[GH-ISSUE #81] Zeroconf defaults to address not available to clients #63

Closed
opened 2026-05-05 04:53:47 -06:00 by gitea-mirror · 11 comments
Owner

Originally created by @thirdwheel on GitHub (Jul 2, 2018).
Original GitHub issue: https://github.com/debauchee/barrier/issues/81

Operating Systems

Server: Windows 10 Pro

Client: Mac OS X 10.13.5

Barrier Version

2.1.0

Steps to reproduce bug

Barrier lists the IP addresses in its interface, the one in bold is the one that zeroconf uses.

  1. Set client to auto config.
  2. Note that client attempts to connect to the IP address in bold
  3. Check address, note that it is not assigned to either the LAN or WiFi interfaces

Other info

I can work around this by setting the server IP in the client, but this is not an ideal scenario for me since DHCP is used across the board.

image

IP in green box is my LAN IP (ideal), dark yellow is my WiFi IP (OK but rather not) and red is the IP address of my Surface Pro's virtual WiFi adapter for Miracast (can't use!)

image

Log from Barrier showing it attempt to connect to the miracast IP and failing as it's not available outside my laptop

Originally created by @thirdwheel on GitHub (Jul 2, 2018). Original GitHub issue: https://github.com/debauchee/barrier/issues/81 ### Operating Systems ### Server: Windows 10 Pro Client: Mac OS X 10.13.5 ### Barrier Version ### 2.1.0 ### Steps to reproduce bug ### Barrier lists the IP addresses in its interface, the one in bold is the one that zeroconf uses. 1. Set client to auto config. 2. Note that client attempts to connect to the IP address in bold 3. Check address, note that it is not assigned to either the LAN or WiFi interfaces ### Other info ### I can work around this by setting the server IP in the client, but this is not an ideal scenario for me since DHCP is used across the board. ![image](https://user-images.githubusercontent.com/160601/42141335-dfd6d62e-7deb-11e8-898b-49e7b3ee228f.png) IP in green box is my LAN IP (ideal), dark yellow is my WiFi IP (OK but rather not) and red is the IP address of my Surface Pro's virtual WiFi adapter for Miracast (can't use!) ![image](https://user-images.githubusercontent.com/160601/42141469-c9523c94-7dec-11e8-8a0f-f52f976be942.png) Log from Barrier showing it attempt to connect to the miracast IP and failing as it's not available outside my laptop
Author
Owner

@walker0643 commented on GitHub (Jul 2, 2018):

Hi @thirdwheel - This is definitely a problem and I did start to work on it tonight. You're welcome to try the smartzeroconf branch and see if it fixes your issue. Unfortunately I have to be up in a few hours for work and I won't have time to test or implement the unix side, so let this be fair warning that it probably won't work yet!

Commit: 2d7818fe49

<!-- gh-comment-id:401670455 --> @walker0643 commented on GitHub (Jul 2, 2018): Hi @thirdwheel - This is definitely a problem and I did start to work on it tonight. You're welcome to try the smartzeroconf branch and see if it fixes your issue. Unfortunately I have to be up in a few hours for work and I won't have time to test or implement the unix side, so let this be fair warning that it probably won't work yet! Commit: https://github.com/debauchee/barrier/commit/2d7818fe49ddc9b7d1a97b5afc643ee5f48790c8
Author
Owner

@walker0643 commented on GitHub (Jul 11, 2018):

@thirdwheel - are you able to test the smartzeroconf branch to see if it fixes your problem?

<!-- gh-comment-id:404010701 --> @walker0643 commented on GitHub (Jul 11, 2018): @thirdwheel - are you able to test the smartzeroconf branch to see if it fixes your problem?
Author
Owner

@thirdwheel commented on GitHub (Jul 12, 2018):

Haven't had a chance to test it as yet, haven't been able to build it on Mac OS X:

Developer:barrier-smartzeroconf developer$ ./clean_build.sh
Modifying environment for Barrier build.../usr/local/bin/brew
Detected Homebrewdone
Starting Barrier Debug build...
CMake Warning at /usr/local/Cellar/cmake/3.11.4/share/cmake/Modules/Platform/Darwin-Initialize.cmake:121 (message):
  Ignoring CMAKE_OSX_SYSROOT value:

   /Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk

  because the directory does not exist.
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.11.4/share/cmake/Modules/CMakeSystemSpecificInitialize.cmake:8 (include)
  CMakeLists.txt:19 (project)


-- The C compiler identification is AppleClang 9.1.0.9020039
-- The CXX compiler identification is AppleClang 9.1.0.9020039
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
fatal: Not a git repository (or any of the parent directories): .git
CMake Warning at cmake/Version.cmake:62 (message):
  revision not found.  setting to 00000000
Call Stack (most recent call first):
  CMakeLists.txt:34 (include)


-- Full Barrier version string is '2.1.0-snapshot-snapshot.b1-00000000'
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Looking for C++ include istream
-- Looking for C++ include istream - found
-- Looking for C++ include ostream
-- Looking for C++ include ostream - found
-- Looking for C++ include sstream
-- Looking for C++ include sstream - found
-- Looking for include file inttypes.h
-- Looking for include file inttypes.h - found
-- Looking for include file locale.h
-- Looking for include file locale.h - found
-- Looking for include file memory.h
-- Looking for include file memory.h - found
-- Looking for include file stdlib.h
-- Looking for include file stdlib.h - found
-- Looking for include file strings.h
-- Looking for include file strings.h - found
-- Looking for include file string.h
-- Looking for include file string.h - found
-- Looking for include file sys/select.h
-- Looking for include file sys/select.h - found
-- Looking for include file sys/socket.h
-- Looking for include file sys/socket.h - found
-- Looking for include file sys/stat.h
-- Looking for include file sys/stat.h - found
-- Looking for include file sys/time.h
-- Looking for include file sys/time.h - found
-- Looking for include file sys/utsname.h
-- Looking for include file sys/utsname.h - found
-- Looking for include file unistd.h
-- Looking for include file unistd.h - found
-- Looking for include file wchar.h
-- Looking for include file wchar.h - found
-- Looking for getpwuid_r
-- Looking for getpwuid_r - found
-- Looking for gmtime_r
-- Looking for gmtime_r - found
-- Looking for nanosleep
-- Looking for nanosleep - found
-- Looking for poll
-- Looking for poll - found
-- Looking for sigwait
-- Looking for sigwait - found
-- Looking for strftime
-- Looking for strftime - found
-- Looking for vsnprintf
-- Looking for vsnprintf - found
-- Looking for inet_aton
-- Looking for inet_aton - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of char
-- Check size of char - done
-- Check size of int
-- Check size of int - done
-- Check size of long
-- Check size of long - done
-- Check size of short
-- Check size of short - done
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found CURL: /usr/lib/libcurl.dylib (found version "7.54.0")
-- Configuring directory /Users/developer/Downloads/barrier-smartzeroconf/build/bundle
-- Copying file Barrier.app/Contents/PkgInfo
-- Copying file Barrier.app/Contents/Resources/Barrier.icns
-- Copying file reref_dylibs.sh
-- Configuring file Barrier.app/Contents/Info.plist
-- Configuring file build_installer.sh
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/developer/Downloads/barrier-smartzeroconf/build
Scanning dependencies of target arch
[  0%] Building CXX object src/lib/arch/CMakeFiles/arch.dir/Arch.cpp.o
In file included from /Users/developer/Downloads/barrier-smartzeroconf/src/lib/arch/Arch.cpp:19:
In file included from /Users/developer/Downloads/barrier-smartzeroconf/src/./lib/arch/Arch.h:38:
/Users/developer/Downloads/barrier-smartzeroconf/src/./lib/common/common.h:47:10: fatal error: 'assert.h' file not found
#include <assert.h>
         ^~~~~~~~~~
1 error generated.
make[2]: *** [src/lib/arch/CMakeFiles/arch.dir/Arch.cpp.o] Error 1
make[1]: *** [src/lib/arch/CMakeFiles/arch.dir/all] Error 2
make: *** [all] Error 2

<!-- gh-comment-id:404361564 --> @thirdwheel commented on GitHub (Jul 12, 2018): Haven't had a chance to test it as yet, haven't been able to build it on Mac OS X: ``` Developer:barrier-smartzeroconf developer$ ./clean_build.sh Modifying environment for Barrier build.../usr/local/bin/brew Detected Homebrewdone Starting Barrier Debug build... CMake Warning at /usr/local/Cellar/cmake/3.11.4/share/cmake/Modules/Platform/Darwin-Initialize.cmake:121 (message): Ignoring CMAKE_OSX_SYSROOT value: /Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk because the directory does not exist. Call Stack (most recent call first): /usr/local/Cellar/cmake/3.11.4/share/cmake/Modules/CMakeSystemSpecificInitialize.cmake:8 (include) CMakeLists.txt:19 (project) -- The C compiler identification is AppleClang 9.1.0.9020039 -- The CXX compiler identification is AppleClang 9.1.0.9020039 -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done fatal: Not a git repository (or any of the parent directories): .git CMake Warning at cmake/Version.cmake:62 (message): revision not found. setting to 00000000 Call Stack (most recent call first): CMakeLists.txt:34 (include) -- Full Barrier version string is '2.1.0-snapshot-snapshot.b1-00000000' -- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) -- Looking for C++ include istream -- Looking for C++ include istream - found -- Looking for C++ include ostream -- Looking for C++ include ostream - found -- Looking for C++ include sstream -- Looking for C++ include sstream - found -- Looking for include file inttypes.h -- Looking for include file inttypes.h - found -- Looking for include file locale.h -- Looking for include file locale.h - found -- Looking for include file memory.h -- Looking for include file memory.h - found -- Looking for include file stdlib.h -- Looking for include file stdlib.h - found -- Looking for include file strings.h -- Looking for include file strings.h - found -- Looking for include file string.h -- Looking for include file string.h - found -- Looking for include file sys/select.h -- Looking for include file sys/select.h - found -- Looking for include file sys/socket.h -- Looking for include file sys/socket.h - found -- Looking for include file sys/stat.h -- Looking for include file sys/stat.h - found -- Looking for include file sys/time.h -- Looking for include file sys/time.h - found -- Looking for include file sys/utsname.h -- Looking for include file sys/utsname.h - found -- Looking for include file unistd.h -- Looking for include file unistd.h - found -- Looking for include file wchar.h -- Looking for include file wchar.h - found -- Looking for getpwuid_r -- Looking for getpwuid_r - found -- Looking for gmtime_r -- Looking for gmtime_r - found -- Looking for nanosleep -- Looking for nanosleep - found -- Looking for poll -- Looking for poll - found -- Looking for sigwait -- Looking for sigwait - found -- Looking for strftime -- Looking for strftime - found -- Looking for vsnprintf -- Looking for vsnprintf - found -- Looking for inet_aton -- Looking for inet_aton - found -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of char -- Check size of char - done -- Check size of int -- Check size of int - done -- Check size of long -- Check size of long - done -- Check size of short -- Check size of short - done -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found CURL: /usr/lib/libcurl.dylib (found version "7.54.0") -- Configuring directory /Users/developer/Downloads/barrier-smartzeroconf/build/bundle -- Copying file Barrier.app/Contents/PkgInfo -- Copying file Barrier.app/Contents/Resources/Barrier.icns -- Copying file reref_dylibs.sh -- Configuring file Barrier.app/Contents/Info.plist -- Configuring file build_installer.sh -- Configuring done -- Generating done -- Build files have been written to: /Users/developer/Downloads/barrier-smartzeroconf/build Scanning dependencies of target arch [ 0%] Building CXX object src/lib/arch/CMakeFiles/arch.dir/Arch.cpp.o In file included from /Users/developer/Downloads/barrier-smartzeroconf/src/lib/arch/Arch.cpp:19: In file included from /Users/developer/Downloads/barrier-smartzeroconf/src/./lib/arch/Arch.h:38: /Users/developer/Downloads/barrier-smartzeroconf/src/./lib/common/common.h:47:10: fatal error: 'assert.h' file not found #include <assert.h> ^~~~~~~~~~ 1 error generated. make[2]: *** [src/lib/arch/CMakeFiles/arch.dir/Arch.cpp.o] Error 1 make[1]: *** [src/lib/arch/CMakeFiles/arch.dir/all] Error 2 make: *** [all] Error 2 ```
Author
Owner

@p12tic commented on GitHub (Jul 12, 2018):

Do you have Xcode and Xcode command line tools installed? The latter is installed automatically the first time you open Xcode IIRC.

<!-- gh-comment-id:404515717 --> @p12tic commented on GitHub (Jul 12, 2018): Do you have Xcode and Xcode command line tools installed? The latter is installed automatically the first time you open Xcode IIRC.
Author
Owner

@thirdwheel commented on GitHub (Jul 12, 2018):

@p12tic Yes. I'm running the beta at the moment (because I'm developing a mobile app and my phone is running iOS 12) so I don't know if that's likely to cause issues.

<!-- gh-comment-id:404517931 --> @thirdwheel commented on GitHub (Jul 12, 2018): @p12tic Yes. I'm running the beta at the moment (because I'm developing a mobile app and my phone is running iOS 12) so I don't know if that's likely to cause issues.
Author
Owner

@p12tic commented on GitHub (Jul 12, 2018):

Could it be that you're hit by this one? https://stackoverflow.com/questions/32720564/cmake-broken-after-update-to-xcode-7-0#32721456

<!-- gh-comment-id:404518821 --> @p12tic commented on GitHub (Jul 12, 2018): Could it be that you're hit by this one? https://stackoverflow.com/questions/32720564/cmake-broken-after-update-to-xcode-7-0#32721456
Author
Owner

@thirdwheel commented on GitHub (Jul 13, 2018):

@p12tic No good sadly, followed the suggestion and the same error came up

<!-- gh-comment-id:404695748 --> @thirdwheel commented on GitHub (Jul 13, 2018): @p12tic No good sadly, followed the suggestion and the same error came up
Author
Owner

@walker0643 commented on GitHub (Sep 8, 2018):

Closing for now. Please reopen if you have anything to add. Thanks!

<!-- gh-comment-id:419674188 --> @walker0643 commented on GitHub (Sep 8, 2018): Closing for now. Please reopen if you have anything to add. Thanks!
Author
Owner

@ghost commented on GitHub (Feb 15, 2019):

I have the same issue with the binary; I'll try building from the smarter zeroconf branch in a few.

In my case, Barrier ignores the auto conf setting and always uses whatever address was in the text field when the auto conf option was selected. If I clear the text field and set auto conf I get a message saying "Please fill in a hostname for the barrier client to connect to" when I hit the Start button. I'm guessing this means that the client can't figure out the server information from zeroconf, but who knows; the error message doesn't say why I need to fill in the field, and there's nothing in the logs about the error.

<!-- gh-comment-id:464048910 --> @ghost commented on GitHub (Feb 15, 2019): I have the same issue with the binary; I'll try building from the smarter zeroconf branch in a few. In my case, Barrier ignores the `auto conf` setting and always uses whatever address was in the text field when the `auto conf` option was selected. If I clear the text field and set `auto conf` I get a message saying "Please fill in a hostname for the barrier client to connect to" when I hit the `Start` button. I'm guessing this means that the client can't figure out the server information from zeroconf, but who knows; the error message doesn't say *why* I need to fill in the field, and there's nothing in the logs about the error.
Author
Owner

@ghost commented on GitHub (Feb 15, 2019):

@walker0643 Confirmed that the smartzeroconf does auto-discovery on OSX correctly, now. Any plans to merge that branch into default?

<!-- gh-comment-id:464079548 --> @ghost commented on GitHub (Feb 15, 2019): @walker0643 Confirmed that the `smartzeroconf` does auto-discovery on OSX correctly, now. Any plans to merge that branch into default?
Author
Owner

@theofficialgman commented on GitHub (Dec 22, 2020):

Just wanted to bump this and say that this is still a desirable addition.

<!-- gh-comment-id:749314517 --> @theofficialgman commented on GitHub (Dec 22, 2020): Just wanted to bump this and say that this is still a desirable addition.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/barrier#63
No description provided.