I've been watching this error for a few years and so far teamviewer has not fixed this issue. It seems like the teamviewer service running on the remote pc is in a bad state. I haven't tried it but it may be possible to restart the teamviewer service. Last night one pc I was working on got this issue so I came up with an alternative. Using a python script running on the remote pc, it checks a webserver for a certain file. If the file exists, reboot the local pc. It isn't elegant but it works for my purpose.
... View more