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

Cancelled requests are shown as "Pending" #6642

Closed
ManuelRauber opened this issue Nov 2, 2023 · 3 comments
Closed

Cancelled requests are shown as "Pending" #6642

ManuelRauber opened this issue Nov 2, 2023 · 3 comments
Labels
P3 issues we think are valid but not important screen: network Issues with the Network screen.

Comments

@ManuelRauber
Copy link

Hi,

I use the dio package to make HTTP requests to our API.

Dio provided a feature for canceling requests. Under the hood it uses HttpClientRequest.abort (see here in dio's source.

However, in DevTools it shows the request as Pending:

image

It would be nice if it could show, that the request has been aborted.


DevTools version: 2.25.0
Connected Device:
CPU / OS: arm64 (64 bit) ios
Dart Version: 3.1.3
Flutter Version: 3.13.7 / stable
Framework / Engine: 2f708eb839 / a794cf2681
Connected app type: Flutter native (debug build)

@CoderDake CoderDake added screen: network Issues with the Network screen. P3 issues we think are valid but not important labels Nov 2, 2023
@kenzieschmoll
Copy link
Member

We should see if we get an event for abort() calls and if we do, we should mark the request as cancelled in the UI. If we do not get an event, we should see if that is something we can add in dart-io

@CoderDake
Copy link
Contributor

CoderDake commented May 2, 2024

I found the abort call that appears to be used for cancel: https://github.com/dart-lang/sdk/blob/f5fe3dddcc3401fb4848418f639a6f28187d63ce/sdk/lib/_http/http_impl.dart#L1604

I blindly tried adding _profileData?.finishRequestWithErrorto it, but wasn't able to get those events in devtools so this may require some more thought to figure out how to get the events to propagate

I'll look back into this when I get a bigger chunk of time to research

@kenzieschmoll
Copy link
Member

This should be fixed by https://dart-review.googlesource.com/c/sdk/+/375800

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 issues we think are valid but not important screen: network Issues with the Network screen.
Projects
None yet
Development

No branches or pull requests

3 participants