-
-
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
Is it a problem that the Dio library cannot be viewed using the Networks view in Flutter's devtools to view the requests made by Dio? #2326
Comments
Are you using |
indeterminacy,But the httpClientAdapter parameter is not configured |
Could you write a minimal reproducible example? |
好的。 |
https://github.com/xhc-code/my_flutter_network_problem.git The code here includes both HTTP and sockets when using Dio to request linked data. Moreover, the number of socket and get requests is not equal. The code in the project has not been fully reproduced (only socket requests appear), and there may be additional configurations for the Dio in the project, but I need to check again. |
As far as I know, there is no guarantee of the equality of HTTP requests and socket connections. Your example shows HTTP requests in the DevTools, meaning the inspection works out of the box. Closing as not related and please check if your adapter has been changed during the runtime. |
Package
dio
Version
dio: ^5.4.3+1
Operating-System
Android
Adapter
Default Dio
Output of
flutter doctor -v
• Flutter version 3.24.3 on channel stable • Upstream repository https://github.com/flutter/flutter.git • Framework revision 2663184aa7 (9 weeks ago), 2024-09-11 16:27:48 -0500 • Engine revision 36335019a8 • Dart version 3.5.3 • DevTools version 2.37.3 [✓] Windows Version (Installed version of Windows is version 10 or higher) [✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) • Platform android-35, build-tools 35.0.0 • Java version OpenJDK Runtime Environment (build 17.0.11+0--11852314) • All Android licenses accepted. [✓] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.11.5) • Visual Studio Community 2022 version 17.11.35327.3 • Windows 10 SDK version 10.0.22621.0 [✓] Network resources • All expected network resources are available.
Dart Version
3.5.3
Steps to Reproduce
The HTTP interface requests sent cannot be displayed and are all displayed as sockets.
Expected Result
Actual display of the request address and parameter information of the interface
Actual Result
Cannot display the true information of the request sent.
In the issue of devtool, many people have also encountered such problems, and the final conclusion is that Dio may not have used the basic request library provided by Flutter, which resulted in devtool being unable to capture requests sent through Dio.
flutter/devtools#8518
The text was updated successfully, but these errors were encountered: