WhatsApp Desktop App failing to establish a web-socket connection on macOS Mojave
It's a problem related to MacOs Mojave (IFF you have a good internet connection for real and everything is working fine).

Grant access to WhatsApp desktop app:

System Preferences -> Security &amp; Privacy -> Privacy -> Full Disk Access

after you open the lock please add WhatsApp app to this list.