Return the app to the desktop, then switch to Wi Fi in the system. After switching to Wi Fi, click on the desktop app icon to enter the app. At this point, there is an exception when sending network requests. This is highly likely to occur on Ios
jyljames opened this issue · comments
Package
dio
Version
5.5.0+1
Operating-System
iOS
Adapter
Default Dio
Output of flutter doctor -v
No response
Dart Version
3.3.4
Steps to Reproduce
- enter into app
- Return the app to the desktop
- switch to Wi Fi in the system
- click on the desktop app icon to enter the app
- tap button to request api, then dio return error
Expected Result
should be Successful
Actual Result
Error: HttpException: Operation timed out, uri = https://binding/check,
stackTrace: #0 DioMixin.fetch. (package:dio/src/dio_mixin.dart:507)
#1 _FutureListener.handleError (dart:async/future_impl.dart:180)
#2 Future._propagateToListeners.handleError (dart:async/future_impl.dart:850)
#3 Future._propagateToListeners (dart:async/future_impl.dart:871)
#4 Future._completeError (dart:async/future_impl.dart:651)
#5 _SyncCompleter._completeError (dart:async/future_impl.dart:63)
#6 _Completer.completeError (dart:async/future_impl.dart:27)
#7 Future.any.onError (dart:async/future.dart:613)
#8 _RootZone.runBinary (dart:async/zone.dart:1666)
#9 _FutureListener.handleError (dart:async/future_impl.dart:177)
#10 Future._propagateToListeners.handleError (dart:async/future_impl.dart:850)
#11 Future._propagateToListeners (dart:async/future_impl.dart:871)
#12 Future._completeError (dart:async/future_impl.dart:651)
#13 Future._chainForeignFuture. (dart:async/future_impl.dart:556)
#14 _microtaskLoop (dart:async/schedule_microtask.dart:40)
#15 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49)
Please verify if the issue exists when using the HttpClient
alone or the package:http
. There is a good chance that it's a dart:io
issue.
我遇到同样的情况,
dart-lang/sdk#53040
请问dio是否支持网络更改
Please verify if the issue exists when using the
HttpClient
alone or thepackage:http
. There is a good chance that it's adart:io
issue.
我遇到同样的情况,
dart-lang/sdk#53040
请问dio是否支持网络更改
If cupertino_http
supports network switching, using native_dio_adapter
in dio will also gain the ability.