In initial set-up,"Couldn't connect to the Internet"

My new FP6 has just arrived. I’ve fully charged it and started set-up. I’ve skipped putting a SIM card in as I want to be sure it’s working before I remove the SIM from my old phone. It connects to my WiFi perfectly well but complains “Couldn’t connect to the Internet”. I’ve tried both 3G and 5G WiFi. Everything else on my network has Internet access. I have a few MAC addresses blocked, but obviously not that of the FP6.
What do I do now?

UPDATE: I went through offline set-up. After that, Internet access was fine. So there doesn’t seem to be any problem with the FP6 hardware or my network configuration. I did a factory reset, and the same thing happened again. Am I missing anything important by not doing online set-up?