You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this is still an issue, please make sure it is up to date and if so, add a comment that this is still an issue to keep it open. Thank you for your contributions.
I can also reproduce this issue. It seems to be the case that downloading works, but after the defined receive timeout is reached the timeout exception is thrown.
I am also using transfer-encoding: chunked on the server.
New Issue Checklist
Issue Info
Issue Description and Steps
正常网络情况下下载文件。服务器正常响应,并返回数据。dio能够正常请求,但是会马上抛出DioErrorType.RECEIVE_TIMEOUT异常。下面是请求日志和抓包截图
'2019-11-25 11:05:41.029721+0800 Runner[2127:1361742] flutter: *** Request ***
2019-11-25 11:05:41.030279+0800 Runner[2127:1361742] flutter: uri: http://serverpathbalabala
2019-11-25 11:05:41.030376+0800 Runner[2127:1361742] flutter: method: GET
2019-11-25 11:05:41.030636+0800 Runner[2127:1361742] flutter: responseType: ResponseType.stream
2019-11-25 11:05:41.030923+0800 Runner[2127:1361742] flutter: followRedirects: true
2019-11-25 11:05:41.031154+0800 Runner[2127:1361742] flutter: connectTimeout: 5000
2019-11-25 11:05:41.031387+0800 Runner[2127:1361742] flutter: receiveTimeout: 20000
2019-11-25 11:05:41.031766+0800 Runner[2127:1361742] flutter: extra: {}
2019-11-25 11:05:41.032036+0800 Runner[2127:1361742] flutter: headers:
2019-11-25 11:05:41.032296+0800 Runner[2127:1361742] flutter: content-type: application/json; charset=utf-8
2019-11-25 11:05:41.034007+0800 Runner[2127:1361742] flutter: DeviceType: Iphone6
2019-11-25 11:05:41.035334+0800 Runner[2127:1361742] flutter:
2019-11-25 11:05:41.341540+0800 Runner[2127:1361742] flutter: *** Response ***
2019-11-25 11:05:41.341915+0800 Runner[2127:1361742] flutter: uri: http://192.168.6.229:8080/telemedicine-server/file/security/visit/3144462
2019-11-25 11:05:41.342109+0800 Runner[2127:1361742] flutter: statusCode: 200
2019-11-25 11:05:41.342300+0800 Runner[2127:1361742] flutter: headers:
2019-11-25 11:05:41.342476+0800 Runner[2127:1361742] flutter: connection: close
2019-11-25 11:05:41.342815+0800 Runner[2127:1361742] flutter: content-type: application/octet-stream;charset=UTF-8
2019-11-25 11:05:41.343135+0800 Runner[2127:1361742] flutter: date: Mon, 25 Nov 2019 03:05:40 GMT
2019-11-25 11:05:41.343418+0800 Runner[2127:1361742] flutter: transfer-encoding: chunked
2019-11-25 11:05:41.343491+0800 Runner[2127:1361742] flutter: server: Apache-Coyote/1.1
2019-11-25 11:05:41.343771+0800 Runner[2127:1361742] flutter: Response Text:
2019-11-25 11:05:41.344359+0800 Runner[2127:1361742] flutter: Instance of 'ResponseBody'
2019-11-25 11:05:41.344410+0800 Runner[2127:1361742] flutter:
2019-11-25 11:05:41.377176+0800 Runner[2127:1361742] flutter: download file:2220/-1
2019-11-25 11:05:41.492829+0800 Runner[2127:1361742] [VERBOSE-2:ui_dart_state.cc(148)] Unhandled Exception: DioError [DioErrorType.RECEIVE_TIMEOUT]: Receiving data timeout[20000ms]
#0 DioForNative.download. (package:dio/src/entry/dio_for_native.dart:211:9)
#1 _rootRunUnary (dart:async/zone.dart:1132:38)
#2 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#3 _FutureListener.handleError (dart:async/future_impl.dart:155:20)
#4 Future._propagateToListeners.handleError (dart:async/future_impl.dart:690:47)
#5 Future._propagateToListeners (dart:async/future_impl.dart:711:24)
#6 Future._completeError (dart:async/future_impl.dart:530:5)
#7 Future.timeout. (dart:async/future_impl.dart:781:16)
#8 _rootRunBinary (dart:async/zone.dart:1144:38)
#9 _CustomZone.runBinary (dart:async/zone.dart:1037:19)
#10 _FutureListener.handleError (dart:async/future_impl.dart:151:20)
#11 Future._propagateToListeners.handleError (dart:async/future_impl.dart:690:47)
#12 Future._propagateToListeners (dart:async/future_impl.dart:711:24)
#13 Future._completeError (dart:async/future_impl.dart:530:5)
#14 Future._asyncCompleteError. (dart:async/future_impl.dart:578:7)
#15 _rootRun (dart:async/zone.dart:1124:13)
#16 _CustomZone.run (dart:async/zone.dart:1021:19)
#17 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#18 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:963:23)
#19 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#20 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)'
The text was updated successfully, but these errors were encountered: