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

解决 WEB 端BUG #1565

Closed
wants to merge 1 commit into from
Closed

解决 WEB 端BUG #1565

wants to merge 1 commit into from

Conversation

wskfjtheqian
Copy link

errors.dart:266 Uncaught (in promise) Error: Bad state: Future already completed
at Object.throw_ [as throw] (errors.dart:266:49)
at _AsyncCompleter.new.completeError (future_impl.dart:15:79)
at browser_adapter.dart:70:22
at _RootZone.runUnary (zone.dart:1653:54)
at _FutureListener.then.handleValue (future_impl.dart:147:18)
at handleValueCallback (future_impl.dart:766:44)
at _Future._propagateToListeners (future_impl.dart:795:13)
at [_complete] (future_impl.dart:557:7)
at future.dart:421:15
at internalCallback (isolate_helper.dart:48:19)

New Pull Request Checklist

  • I have read the Documentation
  • I have searched for a similar pull request in the project and found none
  • I have updated this branch with the latest develop to avoid conflicts (via merge from master or rebase)
  • I have added the required tests to prove the fix/feature I am adding
  • I have updated the documentation (if necessary)
  • I have run the tests and they pass

This merge request fixes / refers to the following issues: ...

Pull Request Description

...

errors.dart:266 Uncaught (in promise) Error: Bad state: Future already completed
    at Object.throw_ [as throw] (errors.dart:266:49)
    at _AsyncCompleter.new.completeError (future_impl.dart:15:79)
    at browser_adapter.dart:70:22
    at _RootZone.runUnary (zone.dart:1653:54)
    at _FutureListener.then.handleValue (future_impl.dart:147:18)
    at handleValueCallback (future_impl.dart:766:44)
    at _Future._propagateToListeners (future_impl.dart:795:13)
    at [_complete] (future_impl.dart:557:7)
    at future.dart:421:15
    at internalCallback (isolate_helper.dart:48:19)
@wskfjtheqian
Copy link
Author

解决BUG

@bitcode92
Copy link

This really needs to be added. Currently, all requests on web will timeout even if it has been completed.

@bitcode92
Copy link

[ERROR] dart-sdk/lib/internal/js_dev_runtime/private/ddc_runtime/errors.dart 251:49 throw
dart-sdk/lib/async/future_impl.dart 15:79 completeError
packages/dio/src/adapters/browser_adapter.dart 70:22
dart-sdk/lib/async/zone.dart 1434:47 _rootRunUnary
dart-sdk/lib/async/zone.dart 1335:19 runUnary
dart-sdk/lib/async/future_impl.dart 147:18 handleValue
dart-sdk/lib/async/future_impl.dart 766:44 handleValueCallback
dart-sdk/lib/async/future_impl.dart 795:13 _propagateToListeners
dart-sdk/lib/async/future_impl.dart 557:7 [_complete]
dart-sdk/lib/async/future.dart 420:15
dart-sdk/lib/async/zone.dart 1418:47 _rootRun
dart-sdk/lib/async/zone.dart 1328:19 run
dart-sdk/lib/async/zone.dart 1236:7 runGuarded
dart-sdk/lib/async/zone.dart 1276:23
dart-sdk/lib/async/zone.dart 1426:13 _rootRun
dart-sdk/lib/async/zone.dart 1328:19 run
dart-sdk/lib/async/zone.dart 1260:23
dart-sdk/lib/_internal/js_dev_runtime/private/isolate_helper.dart 48:19 internalCallback

@AlexV525
Copy link
Member

I saw #1550 #1496 #1470 both fix this.

@AlexV525
Copy link
Member

Hi everyone! We've made our hardfork repo public and published a new version of dio, named diox.
The new package contains the PR of the fix (#1550).
Please refer to https://pub.dev/packages/diox/versions/5.0.0-dev.1 to use the fork.
You can also see why we're working for a hardfork at cfug/diox#29 and #1607.

@AlexV525 AlexV525 closed this Feb 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants