| Info | Value | |
| ------------------------------ | ----------------------------------------------------- | ---- |
| Platform Name | flutter / ios / android | |
| Platform Version | 9.0 | |
| Dio Version | ^3.0.2 | |
| Android Studio | Android Studio 3.5 | |
| Repro rate | all the time (100%) | |
| Repro with our demo prj | no | |
After adding:
Dio(BaseOptions(
responseType: ResponseType.json
))..httpClientAdapter = Http2Adapter(ConnectionManager())
Error in Console:
I/flutter (10204): HTTP/2 error: Stream error: Stream was terminated by peer (errorCode: 1).
I can confirm having this issue as well, I tried doing multiple HTTP requests to a different set of APIs with no avail :(
the stack trace is as follows:
ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: DioError [DioErrorType.DEFAULT]: HTTP/2 error: Stream error: Stream was terminated by peer (errorCode: 1).
E/flutter (14143): #0 DioMixin._dispatchRequest (package:dio/src/dio.dart:942:7)
E/flutter (14143): <asynchronous suspension>
E/flutter (14143): #1 DioMixin._request._interceptorWrapper.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:dio/src/dio.dart:828:37)
E/flutter (14143): #2 DioMixin.checkIfNeedEnqueue (package:dio/src/dio.dart:1099:22)
E/flutter (14143): #3 DioMixin._request._interceptorWrapper.<anonymous closure>.<anonymous closure> (package:dio/src/dio.dart:825:22)
E/flutter (14143): #4 new Future.<anonymous closure> (dart:async/future.dart:176:37)
E/flutter (14143): #5 _rootRun (dart:async/zone.dart:1120:38)
E/flutter (14143): #6 _CustomZone.run (dart:async/zone.dart:1021:19)
E/flutter (14143): #7 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
E/flutter (14143): #8 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
E/flutter (14143): #9 _rootRun (dart:async/zone.dart:1124:13)
E/flutter (14143): #10 _CustomZone.run (dart:async/zone.dart:1021:19)
E/flutter (14143): #11 _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:947:23)
E/flutter (14143): #12 Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:21:15)
E/flutter (14143): #13 _Timer._runTimers (dart:isolate-patch/timer_impl.dart:382:19)
E/flutter (14143): #14 _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:416:5)
E/flutter (14143): #15 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)
It seems to be an issue when using uppercase in the headers. See https://github.com/dart-lang/http2/issues/49
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.
Same here.
Same here.
it is still an issue that needs to be solved
Same here
same here
it's still an issue
Most helpful comment
it is still an issue that needs to be solved