why does the only method that appears is socket?
<-- Please describe your problem here. Be sure to include repro steps. -->
DevTools version: 2.37.3 IDE: VSCode Connected Device: CPU / OS: x64 (64 bit) android Connected app type: Flutter native (debug build) Dart Version: 3.5.3 Flutter Version: 3.24.3 / stable Framework / Engine: 2663184aa7 / 36335019a8
I have the same problem
@bkonyi Was this something you fixed with https://github.com/flutter/devtools/issues/3033? Your changes were included in the 2.37.2 release, so I would have expected this to be fixed.
@Renoldi Could you share a small repro with us and share whichever package you are using to send these requests? Thanks!
@bkonyi Was this something you fixed with #3033? Your changes were included in the 2.37.2 release, so I would have expected this to be fixed.
This is probably WAI, but it depends on what package / library is being used to make HTTP requests. Making an HTTP request involves opening a socket, so these SOCKET entries are always expected when HTTP profiling is enabled. However, if the HTTP library being used isn't using dart:io's HttpClient underneath, those requests won't appear in the profiler.
same issue with dio
Flutter 3.24.4 • channel stable • https://github.com/flutter/flutter.git Framework • revision 603104015d (6 days ago) • 2024-10-24 08:01:25 -0700 Engine • revision db49896cf2 Tools • Dart 3.5.4 • DevTools 2.37.3
@bkonyi I've have been using
- http package v1.2.2
- Flutter v3.24.5
- Dart version 3.5.4
- DevTools version 2.37.3
- MacOS 15.1
- Tested on Android emulator, SDK 35
All I see is SOCKET requests.
Any updates on this still facing the issue in Flutter 3.24.5 • channel stable • https://github.com/flutter/flutter.git Framework • revision dec2ee5c1f (3 weeks ago) • 2024-11-13 11:13:06 -0800 Engine • revision a18df97ca5 Tools • Dart 3.5.4 • DevTools 2.37.3
Same here on several projects, all of which using classic http package (not dio)
@bkonyi Was this something you fixed with #3033? Your changes were included in the 2.37.2 release, so I would have expected this to be fixed.
This is probably WAI, but it depends on what package / library is being used to make HTTP requests. Making an HTTP request involves opening a socket, so these
SOCKETentries are always expected when HTTP profiling is enabled. However, if the HTTP library being used isn't usingdart:io'sHttpClientunderneath, those requests won't appear in the profiler.
@bkonyi http package (v1.2.2) does use dart:io's HttpClient underneath, and the requests are still not shown. I even tried using cronet_http package, and its the same issue. It worked fine 2 or 3 months ago.
how to solve this?
Still facing the same issue with: Flutter 3.24.5 • channel stable • https://github.com/flutter/flutter.git Framework • revision dec2ee5c1f (vor 4 Wochen) • 2024-11-13 11:13:06 -0800 Engine • revision a18df97ca5 Tools • Dart 3.5.4 • DevTools 2.37.3
Requests are performed using Dio 5.2.0
same
This issue has been around for a long time, it seems to have been fixed with 3.24.0 before, and now it is happening again
Still facing the same issue with:
Flutter 3.27.0 • channel stable • https://github.com/flutter/flutter.git Framework • revision 8495dee1fd (2 days ago) • 2024-12-10 14:23:39 -0800 Engine • revision 83bacfc525 Tools • Dart 3.6.0 • DevTools 2.40.2
I can confirm after upgrading Flutter to 3.27.0, the HTTP requests are now visible in the DevTools network tab. I've tried with http package, dio package and cronet_http package and all requests can be visible in the DevTools now.
• Flutter version 3.27.0 on channel stable
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 8495dee1fd (2 days ago), 2024-12-10 14:23:39 -0800
• Engine revision 83bacfc525
• Dart version 3.6.0
• DevTools version 2.40.2
To those still not seeing the requests after upgrading the Flutter, make sure DevTools version is 2.40.2 or higher.
I can confirm after upgrading Flutter to 3.27.0, the HTTP requests are now visible in the DevTools network tab. I've tried with http package, dio package and cronet_http package and all requests can be visible in the DevTools now.
• Flutter version 3.27.0 on channel stable • Upstream repository https://github.com/flutter/flutter.git • Framework revision 8495dee1fd (2 days ago), 2024-12-10 14:23:39 -0800 • Engine revision 83bacfc525 • Dart version 3.6.0 • DevTools version 2.40.2To those still not seeing the requests after upgrading the Flutter, make sure DevTools version is 2.40.2 or higher. Even if it's not 3.27.0, devtools will occasionally display http requests, and sometimes it won't display at all, showing only sockets
I can confirm after upgrading Flutter to 3.27.0, the HTTP requests are now visible in the DevTools network tab. I've tried with http package, dio package and cronet_http package and all requests can be visible in the DevTools now.
I'm using 3.27.0 and DevTools 2.40.2. I tried with http and dio, but it doesn't work, it only shows SOCKET requests.
:(
It seems to work for me now that I have deleted the cookies and website data.
It seems to work for me now that I have deleted the cookies and website data.
I tried the same thing as you, unfortunately it didn't work. I even tried it in a newly installed browser and it didn't work: Firefox. I also tried it in the Network tab of Visual Code and the result was the same.
Issue persists with Flutter 3.27.1, dart 3.6.0, dev tools 2.40.2. Decided to switch back to 3.22.2 stable version. Let's wait for updates, otherwise SDK conflicts are real pain.
I realized what is causing the problem, in my case. Run a project that uses version 3.7.8 of flutter and then run one with version 3.27.0 on the same Android emulator. One solution is to cold boot the emulator when switching to the latest project. I'm using windows.
Just like @Gastongouveia recommended, i cold booted my emulator on Android Studio too and the requrests showed up (using all latest versions)
I realized what is causing the problem, in my case. Run a project that uses version 3.7.8 of flutter and then run one with version 3.27.0 on the same Android emulator. One solution is to cold boot the emulator when switching to the latest project. I'm using windows.
я твои губы целовал
Try to change emulator or build on real device i fixed the problème with this solutions.
https://github.com/flutter/devtools/issues/8798 , issue still persists even after using a new emulator and cold booting it everytime , actually it is an inconsistent bug , ie it sometimes work but most of the times shows only socket , also before doing flutter upgrade it use to work perfectly .
Without the details requested here and here, we cannot answer further. Ben's answer is probably the answer.
Without the details requested here and here, we cannot answer further. Ben's answer is probably the answer.
It's not that, because in my case I'm just using stock official http package and making basic REST requests. And it's a bit random because sometimes it works fine, with the same code, so it's quite hard to share code currently.
I think I've found the cause of this issue and uploaded a fix in https://github.com/flutter/devtools/pull/8860.
TL;DR: it looks like there's a possible race condition that can cause HTTP requests to be missed by DevTools, particularly when the network channel between DevTools and the target application is slow. This is likely why some users seem to encounter the issue consistently where others can't reproduce it.
I hope to land the above PR and get it cherry picked into the next stable release.
Is there any method with which we can downgrade only the DevTools 2.40.2 , as it use to work perfectly in previous version ?
Is there any method with which we can downgrade only the DevTools 2.40.2 , as it use to work perfectly in previous version ?
No, the only way to downgrade DevTools versions is to downgrade your Flutter/Dart SDKs. Hopefully we can get this fix cherry picked into the upcoming stable release so the next stable version of DevTools will include the fix.
Still the issue persists:
Flutter 3.27.1 • channel stable • https://github.com/flutter/flutter.git Framework • revision 17025dd882 (2 months ago) • 2024-12-17 03:23:09 +0900 Engine • revision cb4b5fff73 Tools • Dart 3.6.0 • DevTools 2.40.2