These steps will help you to connect to the Wi-Fi without IP:
At first, go to the System Preferences -> Network -> WIFI
Under the Wi-Fi, it’ll read No IP address then click on Advanced < TCP/IP
Again, choose Renew DHCP Lease in order to assign the fresh IP address.