Just found this thread because I've been having this problem occasionally for the last few weeks. I've been trying to nail down what's triggering it. In my case, it seems to happen when I'm using Firefox, have WiFi & mobile network on. I'll have Firefox open to a page & then shut off the display for a significant amount of time (hour or more?). I then press power to unlock the phone & notice that it won't connect to the local WiFi. Shutting off WiFi allows the mobile network to take over but then WiFi is unable to turn on & reports 'error'. A reboot is the only way to get it back.
Typically, I leave mobile network off until I need it & I don't think I've ever had this problem when its off. I don't know if this will be helpful to anyone else.