[GH-ISSUE #212] OSX as client Error #172

Open
opened 2026-05-05 05:31:05 -06:00 by gitea-mirror · 25 comments
Owner

Originally created by @BananaAcid on GitHub (Dec 28, 2018).
Original GitHub issue: https://github.com/debauchee/barrier/issues/212

Operating Systems

Server: Win 10

Client: OSX 10.13.6

Error in Log:

2018-12-29 00:35:00.118 barrierc[25118:1143315] pid(25118)/euid(501) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
[2018-12-29T00:37:07] WARNING: failed to connect to server: Timed out
[2018-12-29T00:37:08] NOTE: connecting to '192.168.178.53': 192.168.178.53:24800
[2018-12-29T00:37:08] INFO: OpenSSL 1.0.2n  7 Dec 2017

.. it will not connect as a client. But works as a server.

Barrier Version

2.1.0

Originally created by @BananaAcid on GitHub (Dec 28, 2018). Original GitHub issue: https://github.com/debauchee/barrier/issues/212 ### Operating Systems ### Server: Win 10 Client: OSX 10.13.6 Error in Log: ``` 2018-12-29 00:35:00.118 barrierc[25118:1143315] pid(25118)/euid(501) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!! [2018-12-29T00:37:07] WARNING: failed to connect to server: Timed out [2018-12-29T00:37:08] NOTE: connecting to '192.168.178.53': 192.168.178.53:24800 [2018-12-29T00:37:08] INFO: OpenSSL 1.0.2n 7 Dec 2017 ``` .. it will not connect as a client. But works as a server. ### Barrier Version ### 2.1.0
Author
Owner

@wilsonic commented on GitHub (Jan 13, 2019):

I'm having the same issue.

<!-- gh-comment-id:453794431 --> @wilsonic commented on GitHub (Jan 13, 2019): I'm having the same issue.
Author
Owner

@AdrianKoshka commented on GitHub (Jan 14, 2019):

Did you open the port on the windows firewall?
I'm going to assume you've added Barrier in the windows firewall.

<!-- gh-comment-id:454183834 --> @AdrianKoshka commented on GitHub (Jan 14, 2019): Did you open the port on the windows firewall? I'm going to assume you've [added Barrier in the windows firewall](https://github.com/debauchee/barrier/wiki/Adding-Barrier-to-the-Windows-Firewall).
Author
Owner

@BananaAcid commented on GitHub (Jan 16, 2019):

Sure, Firewall was turned of completely for testing.

As the error states, it is an error stating you should not use a background thread: ' ... is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!'

The error happens, regardless of the Server OS used.

This might be of help: https://indiestack.com/2018/08/let-it-rip/

<!-- gh-comment-id:454623979 --> @BananaAcid commented on GitHub (Jan 16, 2019): Sure, Firewall was turned of completely for testing. As the error states, it is an error stating you should not use a background thread: ' ... is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!' The error happens, regardless of the Server OS used. This might be of help: https://indiestack.com/2018/08/let-it-rip/
Author
Owner

@k4lim commented on GitHub (Feb 21, 2019):

I got the same problem.

macOS v10.14.3 as client
Windows 10 as server

barrier_fufdacromn

bildschirmfoto 2019-02-21 um 03 09 03

Windows log when I'm trying to use OSX as server:
barrier_bbopjeici6

<!-- gh-comment-id:465834575 --> @k4lim commented on GitHub (Feb 21, 2019): I got the same problem. macOS v10.14.3 as client Windows 10 as server ![barrier_fufdacromn](https://user-images.githubusercontent.com/35845133/53138547-014a1480-3587-11e9-991f-3a606c7df88b.png) <img width="1508" alt="bildschirmfoto 2019-02-21 um 03 09 03" src="https://user-images.githubusercontent.com/35845133/53138559-10c95d80-3587-11e9-9872-1de11598dac0.png"> Windows log when I'm trying to use OSX as server: ![barrier_bbopjeici6](https://user-images.githubusercontent.com/35845133/53139081-c943d100-3588-11e9-8f16-53a87baa14f1.png)
Author
Owner

@einSelbst commented on GitHub (Feb 25, 2019):

Just want to add, I also have barrier running on MacOS (10.13.6 as server, 10.14.3 as client, I think it also works the other way around) and it's running fine. However, I do see the logs mentioned above:

2019-02-25 10:00:46.048 barriers[459:4538] pid(459)/euid(501) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
[2019-02-25T10:01:44] INFO: switch from "IGox" to "eox" at 11,573
[2019-02-25T10:01:44] INFO: entering screen
[2019-02-25T10:01:44] WARNING: cursor may not be visible
[2019-02-25T10:01:45] INFO: switch from "eox" to "IGox" at 3007,119
[2019-02-25T10:01:45] INFO: leaving screen
[2019-02-25T10:01:45] WARNING: cursor may not be visible
2019-02-25 10:01:45.189 barriers[459:4538] pid(459)/euid(501) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
[2019-02-25T10:02:20] INFO: switch from "IGox" to "eox" at 18,478
[2019-02-25T10:02:20] INFO: entering screen
[2019-02-25T10:02:20] INFO: switch from "eox" to "IGox" at 3007,446
[2019-02-25T10:02:20] INFO: leaving screen
2019-02-25 10:02:20.571 barriers[459:4538] pid(459)/euid(501) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
[2019-02-25T10:03:48] INFO: switch from "IGox" to "eox" at 18,66
[2019-02-25T10:03:48] INFO: entering screen

So I think the TIS/TSM issue is a general issue and not related to Barrier not working correctly on Mac.

TWIMC people say the error might be because something like "...trying to translate key events to characters on a background thread"

https://forums.developer.apple.com/thread/105244

<!-- gh-comment-id:466929846 --> @einSelbst commented on GitHub (Feb 25, 2019): Just want to add, I also have barrier running on MacOS (10.13.6 as server, 10.14.3 as client, I think it also works the other way around) and it's running fine. However, I do see the logs mentioned above: ```bash 2019-02-25 10:00:46.048 barriers[459:4538] pid(459)/euid(501) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!! [2019-02-25T10:01:44] INFO: switch from "IGox" to "eox" at 11,573 [2019-02-25T10:01:44] INFO: entering screen [2019-02-25T10:01:44] WARNING: cursor may not be visible [2019-02-25T10:01:45] INFO: switch from "eox" to "IGox" at 3007,119 [2019-02-25T10:01:45] INFO: leaving screen [2019-02-25T10:01:45] WARNING: cursor may not be visible 2019-02-25 10:01:45.189 barriers[459:4538] pid(459)/euid(501) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!! [2019-02-25T10:02:20] INFO: switch from "IGox" to "eox" at 18,478 [2019-02-25T10:02:20] INFO: entering screen [2019-02-25T10:02:20] INFO: switch from "eox" to "IGox" at 3007,446 [2019-02-25T10:02:20] INFO: leaving screen 2019-02-25 10:02:20.571 barriers[459:4538] pid(459)/euid(501) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!! [2019-02-25T10:03:48] INFO: switch from "IGox" to "eox" at 18,66 [2019-02-25T10:03:48] INFO: entering screen ``` So I think the TIS/TSM issue is a general issue and not related to Barrier not working correctly on Mac. TWIMC people say the error might be because something like "...trying to translate key events to characters on a background thread" https://forums.developer.apple.com/thread/105244
Author
Owner

@earthsound commented on GitHub (Apr 22, 2019):

I was running 2.1.0 on Windows 7 (server) and MacOS 10.13.x (client) with no problems for months until a recent Windows 7 update/reboot. I started getting the same timeout error as in the OP.

Using TCPView on Windows, I saw that barrier wasn't listening on the port the client was trying to connect to.

When I updated the Windows 7 version to 2.2.0 and started barrier, the MacOS 2.1.0 client connected immediately. I didn't change the configuration, edit the firewall settings (they were already set up from a previous barrier installation), or change anything on the client side, either.

<!-- gh-comment-id:485488562 --> @earthsound commented on GitHub (Apr 22, 2019): I was running 2.1.0 on Windows 7 (server) and MacOS 10.13.x (client) with no problems for months until a recent Windows 7 update/reboot. I started getting the same timeout error as in the OP. Using TCPView on Windows, I saw that barrier wasn't listening on the port the client was trying to connect to. When I updated the Windows 7 version to 2.2.0 and started barrier, the MacOS 2.1.0 client connected immediately. I didn't change the configuration, edit the firewall settings (they were already set up from a previous barrier installation), or change anything on the client side, either.
Author
Owner

@nielmistry commented on GitHub (Apr 24, 2019):

I also get the TIM/TSM issue, and it seems to be a common Java problem. Processing also had the issue but decided to suppress warnings because it wasn't affecting anything but freaking out users: https://github.com/processing/processing/issues/5462

I'm also running MacOS as a client and Windows 10 as a server, and although I get the TIM/TSM issue the connection works fine!

<!-- gh-comment-id:486226643 --> @nielmistry commented on GitHub (Apr 24, 2019): I also get the TIM/TSM issue, and it seems to be a common Java problem. Processing also had the issue but decided to suppress warnings because it wasn't affecting anything but freaking out users: https://github.com/processing/processing/issues/5462 I'm also running MacOS as a client and Windows 10 as a server, and although I get the TIM/TSM issue the connection works fine!
Author
Owner

@AdrianKoshka commented on GitHub (Apr 24, 2019):

common Java problem

There is zero java in barrier to my knowledge.

<!-- gh-comment-id:486269177 --> @AdrianKoshka commented on GitHub (Apr 24, 2019): > common Java problem There is zero java in barrier to my knowledge.
Author
Owner

@noisyshape commented on GitHub (Apr 24, 2019):

The TIS/TSM message is a warning, not an error. Maybe the warning should be suppressed and an issue opened for it. I don't think it's relevant to this issue in any case.

<!-- gh-comment-id:486285234 --> @noisyshape commented on GitHub (Apr 24, 2019): The TIS/TSM message is a warning, not an error. Maybe the warning should be suppressed and an issue opened for it. I don't think it's relevant to this issue in any case.
Author
Owner

@AdrianKoshka commented on GitHub (Apr 24, 2019):

Ah.

<!-- gh-comment-id:486329064 --> @AdrianKoshka commented on GitHub (Apr 24, 2019): Ah.
Author
Owner

@earthsound commented on GitHub (Apr 24, 2019):

How Jalkut debugged this same error and resolved it in his app: https://indiestack.com/2018/08/let-it-rip/

<!-- gh-comment-id:486455073 --> @earthsound commented on GitHub (Apr 24, 2019): How Jalkut debugged this same error and resolved it in his app: https://indiestack.com/2018/08/let-it-rip/
Author
Owner

@antonioaltamura commented on GitHub (May 1, 2019):

I've started to face this issue few days ago.. is there a solution?

<!-- gh-comment-id:488342670 --> @antonioaltamura commented on GitHub (May 1, 2019): I've started to face this issue few days ago.. is there a solution?
Author
Owner

@reancool commented on GitHub (Jul 19, 2019):

is there a solution?

<!-- gh-comment-id:513129760 --> @reancool commented on GitHub (Jul 19, 2019): is there a solution?
Author
Owner

@zacharycoon commented on GitHub (Aug 29, 2019):

I had the same problem as the original user. What ended up being wrong for me was that I was that I was connecting to a different network via VPN on my Mac.

Interestingly, if I start Barrier before I connect to the VPN, and then connect to my VPN, Barrier will work just fine until my computer falls asleep, then it starts having this issue above. Also, like the user above, I can use my Mac as a server even when I'm connected to my VPN.

My guess is that you may have a similar networking issue.

<!-- gh-comment-id:526207248 --> @zacharycoon commented on GitHub (Aug 29, 2019): I had the same problem as the original user. What ended up being wrong for me was that I was that I was connecting to a different network via VPN on my Mac. Interestingly, if I start Barrier before I connect to the VPN, and then connect to my VPN, Barrier will work just fine until my computer falls asleep, then it starts having this issue above. Also, like the user above, I can use my Mac as a server even when I'm connected to my VPN. My guess is that you may have a similar networking issue.
Author
Owner

@sgon00 commented on GitHub (May 11, 2020):

I am meeting the same error message. But as a server. This year 2020. The bug is opened at 2018. .. I am wondering if I should open another issue...

<!-- gh-comment-id:626631926 --> @sgon00 commented on GitHub (May 11, 2020): I am meeting the same error message. But as a server. This year 2020. The bug is opened at 2018. .. I am wondering if I should open another issue...
Author
Owner

@simons-public commented on GitHub (May 12, 2020):

@sgon00 That error message has nothing to do with connectivity. It's from TIS/TSM which is Text Input Services/Text Services manager because the barrier server or client runs as a different thread than the main GUI process.

@shymega I put in #653 which fixes this but I think it'll keep popping up in the issues until there's a new release posted. There's been a decent amount of improvements on the MacOS GUI (retina support, high-res icons, etc) there any plans for a 2.3.3 in the near future?

<!-- gh-comment-id:627041512 --> @simons-public commented on GitHub (May 12, 2020): @sgon00 That error message has nothing to do with connectivity. It's from TIS/TSM which is Text Input Services/Text Services manager because the barrier server or client runs as a different thread than the main GUI process. @shymega I put in #653 which fixes this but I think it'll keep popping up in the issues until there's a new release posted. There's been a decent amount of improvements on the MacOS GUI (retina support, high-res icons, etc) there any plans for a 2.3.3 in the near future?
Author
Owner

@sgon00 commented on GitHub (May 12, 2020):

@simons-public yeah, you're right. Thanks a lot for your reply. My situation: I started and used barrier for two days without any problems. But after wifi network changes multiple times (not sure if this is the cause), the barrier server stopped. I was unable to start barrier server. It was just starting/hanging forever. I tried to quit the app and re-launch the app, but no luck. But after I changed the log level from Error to Info and quit and re-launch the app again, it can be started successfully. I have no ideas if the log level is the cause or not. That is just weird. Maybe the cause is something else. I don't know. Because there is NO useful log to determine why it was starting and hanging there forever except this issue's error message. So I solved the issue blindly for now.

<!-- gh-comment-id:627065210 --> @sgon00 commented on GitHub (May 12, 2020): @simons-public yeah, you're right. Thanks a lot for your reply. My situation: I started and used barrier for two days without any problems. But after wifi network changes multiple times (not sure if this is the cause), the barrier server stopped. I was unable to start barrier server. It was just starting/hanging forever. I tried to quit the app and re-launch the app, but no luck. But after I changed the log level from `Error` to `Info` and quit and re-launch the app again, it can be started successfully. I have no ideas if the log level is the cause or not. That is just weird. Maybe the cause is something else. I don't know. Because there is NO useful log to determine why it was starting and hanging there forever except this issue's error message. So I solved the issue blindly for now.
Author
Owner

@simons-public commented on GitHub (May 12, 2020):

@sgon00 No worries, glad it started working for you again. I just got a troubleshooting guide added to the wiki if the issue crops up again, maybe it will be helpful. It sounds like it could have been an orphaned process. The GUI actually starts either a barrierc (client) or barriers (server) process in the background and if the GUI is closed or killed the sometimes it can happen where the background process keeps running and ties up the port.

<!-- gh-comment-id:627070383 --> @simons-public commented on GitHub (May 12, 2020): @sgon00 No worries, glad it started working for you again. I just got a [troubleshooting guide](https://github.com/debauchee/barrier/wiki/Troubleshooting.md) added to the wiki if the issue crops up again, maybe it will be helpful. It sounds like it could have been an orphaned process. The GUI actually starts either a `barrierc` (client) or `barriers` (server) process in the background and if the GUI is closed or killed the sometimes it can happen where the background process keeps running and ties up the port.
Author
Owner

@sgon00 commented on GitHub (May 12, 2020):

@simons-public Are there any other processes will block barrier to start successfully? I am a developer, so at the time it didn't work and quit the app, I did run ps -ef | grep -i barrier to check if there are any frozen processes or not and if so, then kill -9. But I didn't find any processes which contains the chars barrier. So I didn't need to kill. The problem must be something else.

The changes I did to barrier after installation are:
(1) change log level from 'Info' to 'Error'
(2) Porvide a path for Log to file
(3) add a new screen
(4) add two hotkeys.

So that's why I tried to change log level back to Info, and surprisingly, that makes the server started. But it doesn't make sense that solved the problem though.

<!-- gh-comment-id:627073556 --> @sgon00 commented on GitHub (May 12, 2020): @simons-public Are there any other processes will block barrier to start successfully? I am a developer, so at the time it didn't work and quit the app, I did run `ps -ef | grep -i barrier` to check if there are any frozen processes or not and if so, then `kill -9`. But I didn't find any processes which contains the chars `barrier`. So I didn't need to kill. The problem must be something else. The changes I did to barrier after installation are: (1) change log level from 'Info' to 'Error' (2) Porvide a path for `Log to file` (3) add a new screen (4) add two hotkeys. So that's why I tried to change log level back to `Info`, and surprisingly, that makes the server started. But it doesn't make sense that solved the problem though.
Author
Owner

@simons-public commented on GitHub (May 12, 2020):

@sgon00 I don't know of any other processes off the top of my head, but anything binding to 24800 would prevent it from working but not from starting (which hopefully will be an error instead of a warning soon #655).

Actually I just saw that the ERROR level of logging doesn't show the NOTE text started server, which is used to trigger the GUI status, which also makes me realize I was somehow missing that part of the puzzle with what @plessbd was talking about in #516.

I think the barriers command needs to be changed to output started server to stdout regardless of the log level.

Did you set the log level in the text of the config file? I haven't been able to find it in the GUI anywhere and I'm wondering if that was left off the GUI because of the hack there to detect the status.

<!-- gh-comment-id:627083400 --> @simons-public commented on GitHub (May 12, 2020): @sgon00 I don't know of any other processes off the top of my head, but anything binding to 24800 would prevent it from working but not from starting (which hopefully will be an error instead of a warning soon #655). Actually I just saw that the ERROR level of logging doesn't show the NOTE text `started server`, which is [used to trigger the GUI status](https://github.com/debauchee/barrier/blob/b6a1b5742006157c3fe746288961a9d2827a3f26/src/gui/src/MainWindow.cpp#L379-L399), which also makes me realize I was somehow missing that part of the puzzle with what @plessbd was talking about in #516. I think the `barriers` command needs to be changed to output `started server` to stdout regardless of the log level. Did you set the log level in the text of the config file? I haven't been able to find it in the GUI anywhere and I'm wondering if that was left off the GUI because of the hack there to detect the status.
Author
Owner

@sgon00 commented on GitHub (May 12, 2020):

@simons-public I am new to barrier, so I didn't use any config files yet. I configure everything in GUI for now. Restart barrier app will continue to use my old config (it must be stored somewhere).

To configure log level in GUI at MacOS: Top left system panel > Barrier > Change Settings, you will find Logging level and Log to file options.

Last time when I met the issue, I forgot to test if the port is occupied or not. If I meet the issue next time, I will test the port status with telnet localhost 24800.

Thanks.

<!-- gh-comment-id:627091118 --> @sgon00 commented on GitHub (May 12, 2020): @simons-public I am new to barrier, so I didn't use any config files yet. I configure everything in GUI for now. Restart barrier app will continue to use my old config (it must be stored somewhere). To configure log level in GUI at MacOS: `Top left system panel > Barrier > Change Settings`, you will find **Logging level** and **Log to file** options. Last time when I met the issue, I forgot to test if the port is occupied or not. If I meet the issue next time, I will test the port status with `telnet localhost 24800`. Thanks.
Author
Owner

@simons-public commented on GitHub (May 12, 2020):

@sgon00 Thanks, I've been using barrier for years and can't believe I never noticed the logging setting there 👍.

I just made a pull request #664 if you want to see if that fixes the issue for you when logging is set to warning.

<!-- gh-comment-id:627096381 --> @simons-public commented on GitHub (May 12, 2020): @sgon00 Thanks, I've been using barrier for years and can't believe I never noticed the logging setting there 👍. I just made a pull request #664 if you want to see if that fixes the issue for you when logging is set to warning.
Author
Owner

@sgon00 commented on GitHub (May 12, 2020):

@simons-public Got it, thanks a lot for all your help. 😀👍🙏

<!-- gh-comment-id:627110009 --> @sgon00 commented on GitHub (May 12, 2020): @simons-public Got it, thanks a lot for all your help. 😀👍🙏
Author
Owner

@shymega commented on GitHub (May 12, 2020):

@sgon00 Please don't open another issue - it just adds to the list, and we're aware of this bug 👍
@simons-public I'll need to discuss it with the maintainers, but I'm happy to make another release - we've had a fair few merges since the last release, so the time is "ripe"..

<!-- gh-comment-id:627370613 --> @shymega commented on GitHub (May 12, 2020): @sgon00 Please don't open another issue - it just adds to the list, and we're aware of this bug :+1: @simons-public I'll need to discuss it with the maintainers, but I'm happy to make another release - we've had a fair few merges since the last release, so the time is "ripe"..
Author
Owner

@hhstore commented on GitHub (Aug 8, 2020):

@sgon00 Please don't open another issue - it just adds to the list, and we're aware of this bug 👍
@simons-public I'll need to discuss it with the maintainers, but I'm happy to make another release - we've had a fair few merges since the last release, so the time is "ripe"..

@all
@antonioaltamura
@reancool

<!-- gh-comment-id:670970869 --> @hhstore commented on GitHub (Aug 8, 2020): > @sgon00 Please don't open another issue - it just adds to the list, and we're aware of this bug 👍 > @simons-public I'll need to discuss it with the maintainers, but I'm happy to make another release - we've had a fair few merges since the last release, so the time is "ripe".. @all @antonioaltamura @reancool - hey, guys. - here is my solution. it works for me. - https://github.com/hhstore/blog/issues/199#issuecomment-670969228
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#172
No description provided.