I wrote this a little while ago but after reading through I’m convinced I was just being an idiot so wasn’t going to post it. But if anyone is having the same problem then hopefully this will help!
I had a bit of a weird problem with my phone that took me ages to track down.
Basically, when switching from Wi-fi to mobile data the phone often wouldn’t realise that had happened. I couldn’t browse web pages, Spotify would think I was working offline, WhatsApp wouldn’t sent messages, etc, etc
The problem would happen when manually turning Wi-fi off or when going out of range of whatever network I was connected to.
This would be incredibly frustrating when I’d leave the office and need to use maps to get directions somewhere.
Sometimes just waiting a few minutes would be all that was needed. Toggling flight mode would sometimes help but sometimes I had to do a full restart of the phone to get everything working.
I had no idea how to search for help on that kind of problem!
I waited for updates to be released for Android and by OnePlus but nothing seemed to sort it. It seemed to be DNS related from the error messages I was getting in Chrome but I had no idea what I could do about it.
I was out with the family for something to eat. The place we were at had free Wi-Fi and I was having a hard time connecting to it. (The merits of connecting to free Wi-fi are a separate conversation!)
Then I remembered a lot of free Wi-fi portals want you to use their DNS server.
There is a setting in my phone that allows you to set your own DNS server instead of whichever one is given to you by DHCP on whichever network you’re connected to. It also enables DNS over TLS and is called “Private DNS”
This is from the Android blog describing the feature.
It’s a setting I’ve had in place for ages and would certainly get in the way of connecting to the restaurant Wi-Fi in question if they require you to use their DNS. I set that back to default and was able to connect to the Wi-Fi in question
That was when I had my Eureka moment. The problem I’d been having seemed to be DNS related. Was changing that setting what has caused it all along?
It appears so. All has been fine since.
I’m not really sure why. I could understand if it didn’t work at all. My current theory is that my mobile carrier also wants me to use their DNS or they are blocking DNS over TLS and it takes the phone some time to time out and figure out my custom setting won’t work and falls back to the carrier DNS.
That is just a theory though and could be way off the mark.
But as it’s all fine now I’m sharing in case it helps someone else!