Skip to content
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

why does the only method that appears is socket? #8380

Open
Renoldi opened this issue Oct 1, 2024 · 21 comments
Open

why does the only method that appears is socket? #8380

Renoldi opened this issue Oct 1, 2024 · 21 comments
Labels
P2 important to work on, but not at the top of the work list. screen: network Issues with the Network screen.

Comments

@Renoldi
Copy link

Renoldi commented Oct 1, 2024

<-- 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

@LiamMarega
Copy link

I have the same problem

@elliette
Copy link
Member

elliette commented Oct 3, 2024

@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.

@elliette elliette added screen: network Issues with the Network screen. P2 important to work on, but not at the top of the work list. labels Oct 3, 2024
@elliette
Copy link
Member

elliette commented Oct 3, 2024

@Renoldi Could you share a small repro with us and share whichever package you are using to send these requests? Thanks!

@bkonyi
Copy link
Contributor

bkonyi commented Oct 4, 2024

@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.

@saeedprogrammer
Copy link

same issue with dio
Screenshot 2024-10-31 at 4 54 11 AM

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

@zigapovhe
Copy link

@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.

@nicks258
Copy link

nicks258 commented Dec 3, 2024

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

@Nico04
Copy link

Nico04 commented Dec 3, 2024

Same here on several projects, all of which using classic http package (not dio)

@zigapovhe
Copy link

zigapovhe commented Dec 4, 2024

@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.

@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.

@chiphan-quickcare
Copy link

how to solve this?

@philitell
Copy link

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

@maxfrees
Copy link

maxfrees commented Dec 11, 2024

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

@petersnoopy
Copy link

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

@zigapovhe
Copy link

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.

@maxfrees
Copy link

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.
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

@Adrek
Copy link

Adrek commented Dec 13, 2024

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.

:(

@petersnoopy
Copy link

It seems to work for me now that I have deleted the cookies and website data.

@Adrek
Copy link

Adrek commented Dec 16, 2024

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.

@mikegitdev
Copy link

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.

@Gastongouveia
Copy link

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.

@kostas95
Copy link

kostas95 commented Jan 7, 2025

Just like @Gastongouveia recommended, i cold booted my emulator on Android Studio too and the requrests showed up (using all latest versions)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 important to work on, but not at the top of the work list. screen: network Issues with the Network screen.
Projects
None yet
Development

No branches or pull requests