devtools icon indicating copy to clipboard operation
devtools copied to clipboard

Network requests in the Devtools network tab can appear to hang

Open navaronbracke opened this issue 8 months ago • 1 comments

I encountered a bug where I was using the Devtools' Network tab to monitor a request, so that I could see what the request body was for the request (since logging it manually was a bit of work).

However, I had a specific request that seemed to hang in the Devtools Network tab. At first I was thinking of a bug in my code, so I added some logging to get the request status code. In my code, I see that the request successfully completes with a 200 status code (as apparent in the attached video).

However, in the Devtools Network tab, the request ends up getting a status code, the socket is closed, but the status of the request still says "Pending". That prevents me from looking at the request body / response body.

Not sure if this is related, but the response body of the actual request (when logged in my code) was null.

Video: https://github.com/user-attachments/assets/6b2c44d6-7e4a-4232-80df-a16777b87a00 Logs: devtools_logs.txt

This is on Devtools 2.42.3

navaronbracke avatar Apr 23 '25 09:04 navaronbracke

Any updates on this? Same thing happening with flutter 3.32.0

davorkomusanac avatar Jun 23 '25 10:06 davorkomusanac

This may be fixed with the DevTools in Flutte 3.35.0 or newer. I fixed a very similar bug in March. https://github.com/dart-lang/sdk/commit/fd3eaa68318850697eb610483b8f8f866c28cdc6

Can you try with a recent Flutter and post whether the problem persists?

srawlins avatar Oct 17 '25 00:10 srawlins

I cannot reproduce this on beta 3.37.0-0.1.pre, so I can assume that this is fixed.

navaronbracke avatar Oct 17 '25 09:10 navaronbracke