My phone is suddenly stuck at "Obtaining IP address" when trying to connect to a WiFi. I've tried rebooting, deleting and re-adding the WiFi networks, restarting the router (all other devices connected to the router work fine), to no avail.

I'm running Android 7.0. I'd like to avoid a factory reset, so if anyone has an idea what else I could try, I'd appreciate it.