http icon indicating copy to clipboard operation
http copied to clipboard

ClientException with SocketException: Connection failed (OS Error: No route to host, errno = 65), address = 192.162.10.1, port = 2018, uri=http://192.162.10.1:2018/wiced_ota_server/ssid_chunk.html?ssid=Beah_bug&pwd=123456

Open E2-Veera opened this issue 1 year ago • 1 comments

I've a flutter iOS app and WiFi IoT device.... I used to connect my mobile and IoT device using my flutter app, Then I have call one GET request to communicate with IoT device. Now the problem is that GET Api give me the following exception

  1. Turn on the IOT device into pairing mode (IOT device start emitting a WiFi connection)
  2. Connect to that IOT device's WiFi using flutter app
  3. Call the GET API request to communicate to IOT device

ClientException with SocketException: Connection failed (OS Error: No route to host, errno = 65), address = 192.168.10.1, port = 2018, uri=http://192.168.10.1:2018/wiced_ota_server/ssid_chunk.html?ssid=Beah_bug&pwd=djdjdjfjfjfjc 2

#0 IOClient.send (package:http/src/io_client.dart:154) #1 BaseClient._sendUnstreamed (package:http/src/base_client.dart:93) #2 _withClient (package:http/http.dart:167) #3 Future.timeout. (dart:async/future_impl.dart:940) #4 _NetworkSetupState.pushWiFiSettingsToBelt (package:aptbelt/WiFiConfiguration/networkSetupPage.dart:459)

Note : Mobile is connected to IoT device, IoT device doesn't have internet connection

GET request should properly work

I've checked the flow manually by connecting to IOT device and call the GET request using chrome.... It's working fine..... in Flutter iOS app it's not working

E2-Veera avatar Jul 30 '24 10:07 E2-Veera

Comigo aconteceu o mesmo problema no iOS, meu aplicativo tenta conectar a API local com IP 192.168.0.100 porta 8070 e não conecta, apenas ocorre o problema na versão publicada (release), debug funciona normalmente.

Testando em outra rede com IP 192.168.254.100 funciona normalmente em todas as versões.

Alguém pode me ajudar?

ProSistemasDev avatar Aug 22 '24 14:08 ProSistemasDev

Hi @E2-Veera, I had the same issue on iOS. Did you include the NSLocalNetworkUsageDescription entry in your info.plist file (ios/Runner/Info.plist) ?

MattiaPispisa avatar Dec 20 '24 13:12 MattiaPispisa