-
-
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
Failed host lookup error at every request after disconnecting and reconnecting to internet. #2179
Comments
You can verify if the behavior occurred when using |
Thanks for the reply. How can I verify this?
|
By writing a minimal example to make requests using them. |
I found out it was a problem I my code logic, when there was no connection available. Closing the issue. |
@albe-jj what was the error? I'm kinda having a similar problem to this. |
I have the same problem, how should I solve it? |
I have the same problem in ios, how should i solve it? |
Package
dio
Version
5.1.2
Operating-System
Windows
Adapter
Default Dio
Output of
flutter doctor -v
Dart Version
3.4.0-222.0.dev
Steps to Reproduce
The application every once in a while (once every two days) throws me a
Failed host lookup
and cannot send any further request although there is internet connection and the host can be resolved. Most of the time the connection is interrupted and I get theFailed host lookup
error then the app continues working as expected after connecting back to the internet. But when I get this issue the dio instance keeps throwing theFailed host lookup
error at every subsequent request although connection is available and host can be resolved. By restarting the application I can again send requests as normal.DioException [connection error]: The connection errored: Failed host lookup: '<myhost.com>' This indicates an error which most likely cannot be solved by the library.
Error: SocketException: Failed host lookup: '<myhost.com>' (OS Error: No such host is known.
, errno = 11001)
#0 DioMixin.fetch. (package:dio/src/dio_mixin.dart:510)
#1 _rootRunUnary (dart:async/zone.dart:1407)
#2 _CustomZone.runUnary (dart:async/zone.dart:1308)
#3 _FutureListener.handleError (dart:async/future_impl.dart:181)
#4 Future._propagateToListeners.handleError (dart:async/future_impl.dart:859)
#5 Future._propagateToListeners (dart:async/future_impl.dart:880)
#6 Future._completeError (dart:async/future_impl.dart:660)
#7 _SyncCompleter._completeError (dart:async/future_impl.dart:63)
07:53:07.841 (+9:07:44.900048)
The text was updated successfully, but these errors were encountered: