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

Mouse control works, but keyboard does not #46

Open
briantully opened this issue Jan 11, 2019 · 30 comments
Open

Mouse control works, but keyboard does not #46

briantully opened this issue Jan 11, 2019 · 30 comments
Labels
bug Verified bug

Comments

@briantully
Copy link

Hi there. I realize Teleport has been abandonware for some time now, but I still use it on a daily basis and haven't found a better replacement.

Sending this out into the ether in case someone else has experienced the following issue and figured out a workaround.

Every now and then, when switching over to control a secondary Mac, the mouse control works as expected but the keyboard control does not. When typing on the keyboard I hear an alert sound on the master computer.

Inspecting the Console when this occurs shows the following:

systemsoundserverd

687: -> Incoming Request : actionID 4096, inClientPID 60998(teleport), inBehavior 1, customVibeDataProvided 0, loop 0, loopPeriod 0.000000, inFlags 0, inClientCompletionToken 48

90: token 375, mActionID 4096, process 60998(teleport), mClientConnection -790570592, mPlayerSynchronizer 0x0, mPlayFlags->ShouldPlayAudio 1, mPlayFlags->ShouldVibe 0, mAudioFinishedPlaying 0, mVibeFinishedPlaying 0, mIsLoopedSound 0, mClientCompletionToken 48, timeSinceClientRequestedStopInMS 0, elapsedTimeInMS 8
teleport (CFNetwork)

Cannot start load of Task <FC67FD2D-FD07-4829-8AFA-C6E1438DC9AF>.<0> since it does not conform to ATS policy

NSURLConnection finished with error - code -1022

Any idea why this is occurring and how to resolve it?

Sometimes if I restart both computers it starts working again.

Alternatively, can anyone recommend an alternative app?

@tomads
Copy link

tomads commented Jan 13, 2019

Hi Brian!

In my case, this problem occurs (sometimes) when Safari is open at the same time.
After I quit Safari, the keystrokes are recognized normally again.
Try it out, maybe it's up to you.
Have fun.

@briantully
Copy link
Author

Thanks for your response, @tomads :)

Unfortunately this is happening for me without Safari open. I've tried restarting both computers, (which seemed to resolve it before) but am still having this issue. No idea why it stopped working.

@briantully
Copy link
Author

FWIW, I gave up trying to get teleport to work like it used to. I just purchased Synergy. Synergy takes a little patience to get it working properly, but once you do it works well. Mouse AND KEYBOARD(!) are now being shared across Macs.

I've been using Synergy for the past couple of hours, and so far the only thing I miss are the visual "bezel" notification showing me which mac I'm controlling. Other than that, everything else seems to be in parity with teleport.

@tchek
Copy link

tchek commented Jan 16, 2019

With Synergy you can not use trackpad gestures and magic trackpad from one screen to another

@briantully
Copy link
Author

Interesting, @tchek
Thankfully I don't using trackpad gestures or a magic trackpad. I do however use a keyboard from one screen to another, which teleport doesn't appear to support anymore. 🤷‍♂️

@tchek
Copy link

tchek commented Jan 16, 2019

This work on mojave

https://github.com/abyssoft/teleport/files/2648694/teleport-1.2.2-build2.zip

From this thread 👍
#42

@johndbritton
Copy link
Owner

Thanks for reporting this issue, glad to see you found a workaround with Synergy. I'm cleaning things up around here and hoping to get teleport into a bit better shape.

@briantully @tomads Are either of you still experiencing this issue? Did you find any workarounds? I haven't had this problem so I'll likely close the issue unless someone can provide steps to reproduce.

@johndbritton johndbritton reopened this Nov 19, 2020
@johndbritton johndbritton added the bug-report Unverified bug report label Nov 19, 2020
@briantully
Copy link
Author

Hi there @johndbritton -- yes I still experience the problem intermittently. Last year I saw that @Grunerd was kind enough to build a patched version to support Mojave ( from #42 ) and have been using that since with some success. But every now and then the keyboard just stops working when switched over to the remote computer. The mouse still works. When this happens I can occasionally resolve it by rebooting both computers. Otherwise I just fall back to using Synergy.

I was surprised to see your comment. Am I to assume that Teleport is once again being maintained or should I curb my enthusiasm? ;)

@johndbritton
Copy link
Owner

Thanks for following up here. The next time it happens can you please follow up on this thread with as much information as you can. Ideally we're looking for steps to reproduce.

I was surprised to see your comment. Am I to assume that Teleport is once again being maintained or should I curb my enthusiasm? ;)

I'm a big fan of Teleport and am going to do my best to maintain the project as I use it every day. I'm not an incredibly skilled macOS developer but I've done my fair share of hacking on Obj-C and Swift for desktop and mobile. My hope is that others will be willing to work on the project now that someone is here to provide code review and ensure that things get merged and released.

So yes, this project is maintained once again and contributions are welcome. My focus is going to be on fixing bugs and improving stability.

@johndbritton johndbritton added bug Verified bug and removed bug-report Unverified bug report labels Nov 20, 2020
@johndbritton
Copy link
Owner

I did some searching of the error message from your console:

since it does not conform to ATS policy

It seems this error message is related to making network requests that are not permitted by the settings of the build. I learned about this in an apple development class, there are some settings in the project file that essentially tell the app what types of network connections are allowed.

I don't know why it would happen intermittently though. Is it possible anything is changing about your network setup? Do you have a wired and wireless connection at the same time? Do you use a VPN? Maybe one of those is experiencing an issue and the traffic changes routes (and thus IP addresses). Just some ideas as to what could be the cause.

If you do have multiple connections, can you try to reproduce the issue by switching network connections while the two computers are paired?

Any other detail you can provide will be helpful.

@johndbritton
Copy link
Owner

Here's the relevant documentation for App Transport Security (ATS): https://developer.apple.com/documentation/bundleresources/information_property_list/nsapptransportsecurity

@johndbritton
Copy link
Owner

build a patched version to support Mojave ( from #42 ) and have been using that since with some success.

What operating system version are you using on each machine? I think the behavior of NSAllowsArbitraryLoads may have changed.

@briantully
Copy link
Author

Thanks for the updates @johndbritton and many thanks for taking Teleport under your wing!

What operating system version are you using on each machine? I think the behavior of NSAllowsArbitraryLoads may have changed.

Both machines are running the latest version of Mojave. In terms of networking, both machines are on the same network managed by my Airport Extreme. The "primary" computer with the mouse/keyboard attached is a MacBook Pro using WiFi. The "secondary" computer that I use Teleport to control is a Mac Pro desktop that is connected via Ethernet and is also running a VPN (Mullvad). Initially when I had these issues I thought that I might need to set up port forwarding in both the Apple Extreme and VPN, but I wasn't able to see what ports Teleport uses and/or if I can change them. But even without port forwarding, Teleport works, so I'm guessing it's not necessary.

For the most part, the latest version of Teleport (1.2.2) is working for me, it's just that every now and then the keyboard stops working on the secondary computer. Rebooting both machines usually resolves it.

Thanks again!

@johndbritton
Copy link
Owner

is also running a VPN (Mullvad)

This jumps out as a potential culprit. I'm not familiar with Mulvad, but ExpressVPN has an option that let's you disable VPN for some apps. Maybe see if there's something similar for your VPN and try that to see if it helps.

Another debugging thing would be to disable the VPN for a few days and see if you can replicate the issue with the VPN disabled so that we can try and eliminate that as a source of the issue.

@briantully
Copy link
Author

So i've had the VPN disabled for the past couple of days, and the issue just occurred again. Again, the mouse works on the remote computer, but the keyboard does not.

I opened Console.app on both computers and searched by "teleport" to see if there was anything obvious getting logged. Surprisingly nothing on the remote computer's log, but on the host computer I see the following messages appear whenever I am controlling the remote computer and pressing a key on the keyboard:

systemsoundserverd

687: -> Incoming Request : actionID 4096, inClientPID 32525(teleport), inBehavior 1, customVibeDataProvided 0, loop 0, loopPeriod 0.000000, inFlags 0, inClientCompletionToken 42

90: token 198, mActionID 4096, process 32525(teleport), mClientConnection 802233392, mPlayerSynchronizer 0x0, mPlayFlags->ShouldPlayAudio 1, mPlayFlags->ShouldVibe 0, mAudioFinishedPlaying 0, mVibeFinishedPlaying 0, mIsLoopedSound 0, mClientCompletionToken 43, timeSinceClientRequestedStopInMS 0, elapsedTimeInMS 1

teleport

NSURLConnection finished with error - code -1001

TIC TCP Conn Cancel [5:0x600001f9c9c0]

[C5 Hostname#e60a2535:80 tcp, url hash: 769d76c9] cancel

[C5 Hostname#e60a2535:80 tcp, url hash: 769d76c9] cancelled

Task <7BF45160-106B-48E5-9710-FC51D541836A>.<0> setting up Connection 5

@johndbritton
Copy link
Owner

Does the keyboard work on the local computer when you move the mouse back or does it stop working on both machines when the issue occurs?

I'm pretty sure the systemsoundserverd is just related to playing the beep sound and isn't actually telling us anything about the error.

NSURLConnection finished with error - code -1001 is a timeout error, see https://developer.apple.com/documentation/foundation/1508628-url_loading_system_error_codes/nsurlerrortimedout

When this happenes again can you check activity monitor on the remote machine and see if teleport is still responsive? I can't figure out why the mouse would continue to work but the keyboard would stop.

Also any information about what you were doing immediately prior to experiencing the issue could be helpful.

Appreciate you taking the time to keep giving detail. If you can figure out how to reproduce the issue reliably that would be a huge help for debugging.

@briantully
Copy link
Author

Hi again -

Yes the keyboard works on the local computer. In fact the issue is observed most times when I am moused over to the remote computer, where the mouse IS working, and on the keyboard I press COMMAND-TAB to bring up the app switcher, but the app switcher appears on the local machine and not the remote machine, even though Teleport is controlling the remote machine. At that point the keyboard only works on the local machine.

When this happened the other day, I did check Activity Monitor, and teleport was normal/responsive (i.e., it wasn't displayed in red text), and the Console logs didn't reveal anything obvious.

I haven't observed a pattern of "things I'm doing when this happens", but I'll certainly be more mindful of this when it happens in the future, so that it might get us a step closer to being able to reproduce this.

@stk0vrfl0w
Copy link

Having used several similar tools (ShareMouse, Synergy, etc.), I've noticed the same symptoms when an application on my host box has turned on SecureInput -- https://www.sharemouse.com/doc/troubleshooting/#secureinput. Unfortunately, tracking down which applications are responsible doesn't appear to be straightforward. Things like keybase, password managers, browsers, etc. can all enable secure input. And if that app is terminated (e.g. force quit) before it disables the request for secure input, the keystrokes won't be sent to target systems.

@briantully
Copy link
Author

Having used several similar tools (ShareMouse, Synergy, etc.), I've noticed the same symptoms when an application on my host box has turned on SecureInput -- sharemouse.com/doc/troubleshooting/#secureinput. Unfortunately, tracking down which applications are responsible doesn't appear to be straightforward. Things like keybase, password managers, browsers, etc. can all enable secure input. And if that app is terminated (e.g. force quit) before it disables the request for secure input, the keystrokes won't be sent to target systems.

@stk0vrfl0w I think you hit the nail on the head! While I haven't force-quit any applications today, I certainly was using my browser and logging into sites using both passwords and yubikey. I also used several password managers (LastPass and 1Password). The keyboard control from host to remote stopped working again today while the mouse still worked. So I'm inclined to believe your theory that SecureInput is involved, and that one of the apps is not releasing it. For now I am logging out of my host Mac when this occurs, and this resolves it. My next step is to not log out, but to quit open apps one at a time until the keyboard works on the remote again. I suspect it's Google Chrome, but I'll post an update if and when I find out more info. Thanks for enlightening me and putting me on the right path!!! 🍺

@tomads
Copy link

tomads commented Dec 2, 2020 via email

@johndbritton
Copy link
Owner

Thanks for sharing all these details.

I have experienced the secure input issue in other apps and agree it would be good to add a feature to teleport to at least detect secure input status, that way we can inform the use as to what is happening.

@briantully please report back if you are able to confirm that secure input is causing the issue.

I would assume that secure input on the controlling computer is the issue, not on the controlled computer.

@johndbritton
Copy link
Owner

Next time this happens run the command ioreg -l -w 0 | grep SecureInput in terminal. That will give you the process id of the application that has secure input enabled.

@reaperhulk
Copy link
Contributor

reaperhulk commented Dec 14, 2020

When this occurs for me the ioreg command points at /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow console. Deliberately locking/unlocking the machine resolves it.

Edit: For programmatically determining this information and displaying it to the user in teleport so they know what is going on https://github.com/phodal/typing/blob/e2e25009fa10c307d963688ceefb4fb70c18ec2b/native/macos/bridge.mm#L61-L85 might be helpful.

@briantully
Copy link
Author

briantully commented Dec 16, 2020

Interesting! So it finally happened for me this week. I was beginning to think it had gone away. Running the ioreg -l -w 0 | grep SecureInput command on the host machine resulted in several calls to kCGSSession related info, including kCGSSessionSecureInputPID. After Googling this, it appears that this is related to when the Mac's screen is locked or on console key, so I suspect it's that the wake from screensaver/unlock Mac that is failing to release the SecureInput correctly.
As a test, rather than my usual fix of logging out or restarting the host machine, I simply forced the screensaver to start and then unlocked it with my Apple Watch (much faster than logging out/in again) -- and presto, Teleport and the keyboard started working again on the remote machine :) Thanks again @johndbritton for the debug command!

@hyperjeff
Copy link

awesome @briantully, that did it for me too! My laptop was unplugged for too long and went into low-power mode, and after juicing up teleport wouldn't accept keyboard input. So, based on your trick, i put the machine into screensaver mode, which requires a fingerprint/pwd to get back in, then it immediately works again. Hooray! was driving me nuts. (Long live teleport!)

@nriley
Copy link

nriley commented Nov 27, 2021

For what it's worth, I just ran into this on a 16ʺ M1 MBP on Monterey, so not fixed yet. ioreg -l -w 0 | grep SecureInput pointed to loginwindow and was resolved using Touch ID to lock and unlock, as suggested in #46 (comment).

@tomads
Copy link

tomads commented Nov 27, 2021

As a sidenote: one can use bettertouchtool to see, if securemode is on - and why …

@briantully
Copy link
Author

For what it's worth, I just ran into this on a 16ʺ M1 MBP on Monterey, so not fixed yet. ioreg -l -w 0 | grep SecureInput pointed to loginwindow and was resolved using Touch ID to lock and unlock, as suggested in #46 (comment).

Ooh! @nriley does that mean that Teleport works on Monterey? I'd been holding off on a new laptop for fear that teleport is not supported on Monterey. Throughout the day I am constantly using teleport to go back and forth from my Macbook (Mojave) to old Mac Pro (Mojave), so I would hate not being able to continue doing that.

Assuming teleport works on Monterey, would it still be able to connect to my old Mac Pro which is forced to run Mojave?

@nriley
Copy link

nriley commented Feb 24, 2022

Yes, Teleport works great on Monterey — I use it between a Monterey and Catalina Mac. There was just a release a few weeks ago in fact!

@johndbritton
Copy link
Owner

It seems we have found the source of this issue. The next step here is to add a feature to Teleport that will detect when SecureInput is activated and causing issues for Teleport. We could update the menubar icon with a warning or something like that.

It's not likely I'll have the time to add this feature, but if someone sends a PR I will happily review and release an update after we get it merged.

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

No branches or pull requests

8 participants