-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
A request with an interceptor, which produces an error, makes the code stuck. #2138
Comments
It seems I have broken the interface contract. The |
Resolves #2138 ### New Pull Request Checklist - [x] I have read the [Documentation](https://pub.dev/documentation/dio/latest/) - [x] I have searched for a similar pull request in the [project](https://github.com/cfug/dio/pulls) and found none - [x] I have updated this branch with the latest `main` branch to avoid conflicts (via merge from master or rebase) - [x] I have added the required tests to prove the fix/feature I'm adding - [ ] I have updated the documentation (if necessary) - [x] I have run the tests without failures - [x] I have updated the `CHANGELOG.md` in the corresponding package --------- Signed-off-by: CaiJingLong <[email protected]> Co-authored-by: Alex Li <[email protected]>
Reverts #2139 Fixes #2167 Reopen #2138 ### New Pull Request Checklist - [x] I have read the [Documentation](https://pub.dev/documentation/dio/latest/) - [x] I have searched for a similar pull request in the [project](https://github.com/cfug/dio/pulls) and found none - [x] I have updated this branch with the latest `main` branch to avoid conflicts (via merge from master or rebase) - [ ] I have added the required tests to prove the fix/feature I'm adding - [x] I have updated the documentation (if necessary) - [x] I have run the tests without failures - [x] I have updated the `CHANGELOG.md` in the corresponding package ### Additional context and info (if any) Added tests were fake, so they remained effective after the revert.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as duplicate.
This comment was marked as duplicate.
I solved a similar issue, related to interceptors, downgrading to version 5.4.0, was using 5.4.3+1. |
@Slexom what was your issue just wondering? |
This comment was marked as off-topic.
This comment was marked as off-topic.
Please submit reproducible example rather than saying "same issue". The original exception is about mismatched signatures which is not a wide-range behavior. |
The original reproducible example can be reproduced since v4 which literally means from the beginning, so anyone who can workaround by downgrading to any version is invalid. |
did anyone find any workaround to this other than downgrading the package since i know downgrading the package doesn't work as stated by @AlexV525? |
Package
dio
Version
5.4.1
Operating-System
Android
Output of
flutter doctor -v
Dart Version
3.3.1
Steps to Reproduce
Here is a minimal example; I can't understand why the error isn't caught in any way, and everything that follows the request never executes.
tried on Android and macOS
Expected Result
Errors from broken requests must be caught.
Actual Result
The program stops when executing a request, and the subsequent code becomes unreachable.
The text was updated successfully, but these errors were encountered: