-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dio cannot resolve hostname http://127.0.0.1.lambdatest:port #2119
Comments
Me too, when I try to use a Flutter App on LambdaTest using a local backend over UnderPass tunnel, I face the DioExceptions "errno=7" or "errno=111", which are very generic to identify what's the main cause of the problem. |
Is the service running on the device? If not, use the ip of your host device to access. |
Does not work with local device IP. This device is accessed remotely. |
I'm not following here. Is |
We discovered in our tests that using https://pub.dev/packages/native_dio_adapter the problem does not occur. Using native_dio_adapter, we were able to connect the remote mobile device to our QA machine without any problems. However, despite having managed to solve this problem, I believe there is a problem when using http Dart. As native_dio_adapter uses a native library for HTTP requests, the problem does not occur. I suggest carrying out a review at this point. For now, the problem we were having is resolved. |
We cannot make any review until a detailed example is provided. I'm still not sure about the environment as I mentioned above:
|
Package
dio
Version
5.4.1
Operating-System
Android
Output of
flutter doctor -v
Dart Version
3.3.0
Steps to Reproduce
The test form is a little complicated.
We are currently using the Lambdatest tool to perform manual tests using physical devices remotely.
To make the connection, we use a tool they provide called Underpass and in the app we use the url 'http://127.0.0.1.lambdatest:port'. The port refers to our local REST API.
Using this tool we do not obtain results, returning generic errors or timeouts.
We tested creating a native app with Kotlin using the Retrofit library for HTTP connections and we were successful.
Expected Result
A successful return is expected
Actual Result
Unhandled Dio errors or SocketException and Timeout
The text was updated successfully, but these errors were encountered: