MacOS/iOS user here facing the same problem.
Restarting the router fixed it.
After the restart, my laptop was assigned a new IP address. I'm not entirely sure what the issue was with the old one, but this resolved the timeout error.
If a simple restart doesn't help, try the following steps:
route -n get default | grep gateway
AP Isolation
(also called SSID Isolation
sometimes)Look for the AP isolation
setting in one of the following sections:
Make sure AP Isolation
is turned off.
This setting prevents devices on the same network from communicating with each other over LAN, which may cause issues with development tools or device discovery.