Closed zubairshahzadarain closed 3 years ago
please do poc by using any server ip .. just use IP and port in url not domain name .. i have tested with two server all plugins giving me same error .. i have test 3 4 libraries .. and with socket
From the report it looks like the exception is not coming from this package.
i have test 3 4 libraries .. and with socket
If 3-4 libraries exhibit the same behavior the bug is very unlikely to be caused by those libraries. This is more likely an issue with your environment (like ensuring you have internet permissions and can make http
as opposed to https
requests.
The incorrect port in the message is related to https://github.com/dart-lang/sdk/issues/12693
The fact that a SocketException is raised is likely due to permissions or the environment - the flutter team is most likely the resource that can help with that.
If you can consistently reproduce a problem using dart:io
and believe the issue is not the environment you can file an issue with a minimal reproduction on the Dart SDK repo. https://github.com/dart-lang/sdk/issues
@zubairshahzad, did you make any progress on this problem?
i have created web service on my personal server in same network .. this web server is working fine and available on same network . i have test with postman from android device . and i also create one native andorid application using java .its working fine in native android .
but in a flutter, i have test three libraries getting below results please help to fix this issue
static String baseurl ="http://10.183.121.43:5000/";
try { Response response = await Dio().get(constant.baseurl+"hello/"); print(response); } catch (e) { print(e); } try { await RawSocket.connect("10.183.121.43", 5000); } catch (e) { print(e); } var client = new http.Client(); client.post(myurl,headers : { "Content-Type": "application/x-www-form-urlencoded" }, body: { "username": useridcontroler.text, "password": passwordController.text })
Error : SocketException: OS Error: Connection timed out, errno = 110, address = 10.183.121.43, port = 55705
http: 0.12.2 logs: git: url: https://github.com/pq/logs.git ref: master rflutter_alert: 1.0.3 shared_preferences: 0.5.12+4 image_picker: 0.6.7+17 dio: 3.0.10 progress_dialog: 1.2.4 location: 3.0.0
Note : same thing when i am trying using ngrok tool and passing ngrok address its working perfectly in flutter .. but with server ip url its not working