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

DioException: Request Cancelled in listenCancelForAsyncTask #4

Closed
maotou316 opened this issue Oct 23, 2023 · 1 comment
Closed

DioException: Request Cancelled in listenCancelForAsyncTask #4

maotou316 opened this issue Oct 23, 2023 · 1 comment
Labels
bug Something isn't working duplicate This issue or pull request already exists flutter_map_cache

Comments

@maotou316
Copy link

Issue Description
I encountered a DioException with the message [request cancelled]: The request was cancelled while making HTTP requests using the Dio library.

Code Snippet
Here's the code snippet where the issue occurs:

@internal
static Future<T> listenCancelForAsyncTask<T>(
  CancelToken? cancelToken,
  Future<T> future,
) {
  return Future.any([
    if (cancelToken != null) cancelToken.whenCancel.then((e) => throw e),
    future,
  ]);
}

Error Message

DioException (DioException [request cancelled]: The request was cancelled.)

Steps Taken to Resolve
Cleaned and rebuilt the project
Ensured all dependencies are up to date
None of these steps resolved the issue.

Additional Information
Dio Version: (Please provide the version of Dio you are using)
Flutter Version: (Please provide the version of Flutter you are using)
Operating Environment: (e.g., Android, iOS, Web)
Does anyone know how to resolve this issue? Thank you!

@josxha
Copy link
Owner

josxha commented Oct 23, 2023

Hi @maotou316, thanks for submitting an issue.

Your problem is probably a duplicate of #3 which is already fixed in the latest flutter_map_cache version (version 1.3.1).

Please verify that you are using the latest version and if this issue still persists you can reopen this issue.

@josxha josxha closed this as not planned Won't fix, can't repro, duplicate, stale Oct 23, 2023
@josxha josxha added the duplicate This issue or pull request already exists label Oct 23, 2023
@josxha josxha added flutter_map_cache bug Something isn't working labels Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists flutter_map_cache
Projects
None yet
Development

No branches or pull requests

2 participants