-
-
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
download can not get exception info but just holding #1967
Comments
Your bad URI does not return 404, it just does not exist, so it will run into a timeout. What is your timeout set to? |
no matter the bad uri is return 404 or connection can not established (handshake failed),i can not catch the expected exception that i can do some other logics. |
I just set base options below In my case, I should check the uri connectivity first, then download ? but above log, when I hot reload, the dio exception print, why ? |
As I tested in a Flutter app: I/flutter (15586): DioError: DioException [unknown]: null
I/flutter (15586): Error: SocketException: Failed host lookup: 'img.lanrentuku.com.cn' (OS Error: No address associated with hostname, errno = 7) |
@qinjing100 This may be influenced by your Flutter app configuration, zones or error handlers. |
Sorry, it's my problem. I use VS Code debug flutter app, but the Uncaught Exception checkbox tipped automaticlly. Thanks a lot. |
Package
dio
Version
5.3.2
Operating-System
Android, MacOS
Output of
flutter doctor -v
Dart Version
3.1.0
Steps to Reproduce
Expected Result
I/flutter (16130): DioError: DioException [connection timeout]: The request connection took longer than 0:00:03.000000. It was aborted.
Actual Result
when download uri is https://img.lanrentuku.com/img/allimg/1502/46-15022R01Z10-L.jpg, ok;
but when give an bad uri, e.g. https://img.lanrentuku.com.cn/img/allimg/1502/46-15022R01Z10-L.jpg, no DioException log.
when hot reloading, console print the above error.
And can not catch any error when the uri return 404 status.
But in dart cmd script, it works well. when any error occurs, I can get the error message in log.
The text was updated successfully, but these errors were encountered: