I recently had this problem but what fixed it for me was
Sudo apt-get install - - reinstall network-manager
I hope this helps,
Some useful commands I've learned along this journey are
// lspci / displays pci //
Lsusb / ports //
Netstat - I /network services //
Ip link show / can display your wlan0 card if not detected by ifconfig
// Lspci also helps //
Rfkill show all / my laptop had a "hard block" button that had an override over my wlan0, pressing ctrl c fixed this for me //
Iwconfig / was used to check the status of my wlan0 card //
Airmon-ng / showed my wlan0 card type as I originally thought it was a driver issue //
Dhclient wlan0 / started a dhcp client as to try to resume connectivity //
//WL-