I wrote this tutorial for anyone who comes across the same issue when connecting via WIFI. This issue is pretty much a wild card, sometimes it happens and sometimes it doesn't. What I mean by that is "it depends on the wi-fi" if this issue happens or not.
If you are facing an issue when connecting to WI-FI and swear a million times that the password you entered is correct but still face an "endless spinner" (see image below) here's what you need to do.
Step 1: Connect to the WIFI via commandline using
This will allow us to check the logs. The command works as follows:
nmcli d wifi connect WIFI_NAME_HERE password PASSWORD_HERE
You should expect the error logs as follows:
Error: Connection activation failed: (15) DHCP client failed to start.
As you can see there's something wrong with DHCP. If these are the exact logs you are seeing, proceed to the next step.
Step 2: Edit the
Add the line
dhcp=dhclient to the NetworkManager.conf
Step 3: Reboot your PC/Laptop
You can choose to restart network manager, I just reboot because I'm lazy.