I had the situation where my router would report the Pi to be connected via Wifi (fixed ip), but the pi would not report an IP address at all. The routers logging would show many ACK commands, basically trying to keep the connection alive, but failing.
For me it helped to switch off wifi power-management:
sudo iwconfig wlan0 power off
I’ve added the same to my rc.locale:
sleep 10 sudo iwconfig wlan0 power off
just before the