0

I am getting this error in my debugger. From what I understood it's an error generated by ip config.

I found this solve here, but i dont understand where should i modify it. where should i change the ip address? Flutter SocketException (SocketException: OS Error: Connection refused, errno = 111, address = localhost, port = 51500)

ERROR - 2021-03-23 18:21:26.074284
PUT /SXUs66yGd7s=/
Error thrown by handler.
SocketException: OS Error: The remote computer refused the network connection.
, errno = 1225, address = 127.0.0.1, port = 59250

Help! Thank you alot

power941
  • 105
  • 3
  • 6
  • 1
    Could you post the part of code that's causing it? – eeqk Mar 23 '21 at 16:54
  • What are you trying to connect to? Post your code with the url you are trying to communicate with. – Huthaifa Muayyad Mar 23 '21 at 16:54
  • How can I identify the part of the code that is causing it? – power941 Mar 23 '21 at 17:13
  • Is this your code throwing the error or is it the debugger itself? If the former, show your code. If the latter, what device/emulator are you trying to run your app on? – Abion47 Mar 23 '21 at 17:52
  • I had 2 vs codes open, and when I was debugging the one that I was working, it was intercalating with the other one. Wired! It has been resolved. Thank you! – power941 Mar 24 '21 at 21:07

2 Answers2

0

I was going through this trouble myself i just disconnect the emulator and restated

0

Not sure what is your environment: for me-> I tried to run windows app with xampp localhost and received this error. then i changed my uri in frontend to

String uri = 'http://127.0.0.1/db-name';

after that, all working. in the emulator the uri is different.

String uri = 'http://your ip addres/db-name';

to get your ip address-> open cmd and run "ipconfig"

use ipv4.

smile675
  • 41
  • 3