I'm getting a "cannot connect to the server" error when I try to use Hangouts on my phone. Every other Google app works. SMS works but not Hangouts messages. All my other devices work with Hangouts messages.
It turns out that this issue is due to the restricted background data setting.
Navigate to Settings -> Data Usage
Find the following apps and make sure "Restrict Background Data" is switched off:
- Hangouts app
- Google Services
- Google Play Store
Go to Settings > Apps > swipe right to "All" > click the menu button of 3 vertical dots > click on "Reset app preferences".