SocketException sometimes reports the incorrect port

Hello, I am trying to make a http get request with the following code:

        var uri = new Uri.http('', '/keyboard');
        print("Targeting " + uri.toString());
        http.get(uri).then((response) {

In the console error, I unfortunately get this response:

flutter: Targeting
[] Dart Error: Unhandled exception:
SocketException: OS Error: Operation timed out, errno = 60, address =, port = 56325

I have assigned port 10000, but the error message says port 56325 is rejected. I have specified and seems to change the port number randomly that it’s targeting. Is there a different way I should be specifying the port #?

Note: I am using:

    sdk: flutter
  http: ^0.12.0+1

Author: Fantashit

2 thoughts on “SocketException sometimes reports the incorrect port

  1. none of this actually worked for me :/
    this command worked like magic “adb reverse tcp:5000 tcp:5000” 💯

Comments are closed.