I'm having the exact same problem as the poster of this question: "connect: Network is unreachable" on a working wlan0 (connected) interface
However, if I try the poster's solution of adding a missing Gateway IP with the following command:
sudo route add default gw (my ip), I will still get an error:
SIOCADDRT: Network is unreachable
Does anyone have an idea of what the problem could be? Thank you!