Fix macOS Screen Sharing frequent pauses or freezes

Ever since upgrading my Macs to macOS Sierra, there have been one or two times when using Screen Sharing (as part of Back to My Mac) when the session would freeze up, or intermittently pause. It seemed that every 5 or 10 seconds, there would be 10 seconds where the shared screen would stay frozen.

I could enter keystrokes, but things like pasting or clicking was hit-or-miss. This made it extremely annoying to work on one of my headless Macs (without a monitor plugged in), because I could only do work in brief spurts!

I opened up the Console app (in Applications > Utilities) to see what was happening, and quickly found that the following three errors were logged any time the screen would freeze:

error 22:03:06.197195 -0500 sharingd  Request failed <SDActivityPayloadRequestRecord: 0x7fdac1fcc9d0, advertisementPayload:<70627579 70652321>, command:pbtypes, message/requestIdentifier:9C76A140-0B19-4CAD-8860-614ACAF1367F, deviceIdentifier:361CA780-A004-4108-8241-B741CDF4B033, requestCreated:2016-10-29 03:02:55 +0000, hasCompletionHandler:YES, _timeoutTimer:<__NSCFTimer: 0x7fdac1fa3600>, error:Error Domain=com.apple.ids.idssenderrordomain Code=12 "(null)">
error 22:03:06.197790 -0500 useractivityd [PBOARD CONTROLLER] Type payload fetch error: <private>
error 22:03:06.198617 -0500 pboard  [Local Pasteboard] Type Fetch Error: <private>

Seeing the pboard and Local Pasteboard keywords in the errors hinted at a problem with the Screen Sharing session's shared clipboard (which I remember I had enabled recently). As it turns out, if I simply disabled the shared clipboard (inside Screen Sharing, click Edit > Use Shared Clipboard), then everything worked great again, without any freezes! Here's the menu option:

Use Shared Clipboard menu option in Screen Sharing

Comments

There was a long stretch that this was definitely true, but its more to do with the Universal Copy/Paste that was added in there.

It seems to not be happening anymore with 10.12.3, so I'm not sure where along the way this was fixed. But good to know I can keep the shared clipboard active now without causing issues!

This 05/2018 and we are using Sierra 10.13.14 - I enabled ScreenSharing through Remote Management so that option is not available ... we use Real VNC to connect to this Mac and things could be even more unhappy... the service either dies or locks out all incoming connections so I have to keep bouncing the service when anyone wants to connect to the Mac .. and that effectively kills all other connections.

Mirroring your same issues here.
Something I have noticed though is that the connection although frozen or showing black screen continues to transmit mouse and keyboard actions. I was previously using RealVNC without issue and the in built Mac ScreenSharing VNC client. Both seem to have the same issue.

Thanks for the comment and I share your pain... I have other things to do over here at work so I asked IT to install a true VNC server or buy Mac for everyone in the department lol... meanwhile we keep going on and cussing while, occasionally I try something else, but so far, no luck at all. It used to work, not perfect though, much better than this about two or three big updates ago :-(

Thanks. That was starting to get frustrating, all g now!