After some years of using teamViewer with no problems, yesterday, out of the blue, it started to give a "connection error". Reboot didn't work, but the solution is, actualy, a restart of TeamViewer. So, just open a terminal and type:
sudo teamviewer daemon stop
sudo teamviewer daemon start