-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Dio().fetch() hangs in isolate #2399
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
Labels
Comments
Please try to provide a minimal reproducible example using |
or
|
I found the problem myself. In
The last statement should rather be Because of this the method returned instantly and the isolate was killed in the Therefore I will close this issue. |
Cool, glad you've found the cause without much pain. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Package
dio
Version
5.8.0+1
Operating-System
Windows
Adapter
Default Dio
Output of
flutter doctor -v
Dart Version
Dart SDK version: 3.7.2 (stable) (Tue Mar 11 04:27:50 2025 -0700) on "windows_x64"
Steps to Reproduce
I have created a method to fetch data from http(s) server. When calling this method in the main thread everything works. Unfortunately if I call the very same method in an isolate the last line in the following code snippet
Response response = await responseFuture;
hangs indefinitely. I am unable to debug what exactly causes this problem and therefore would like to get some hints how to find the root cause.Expected Result
Not hanging in an isolate created with
Isolate.spawn
Actual Result
hanging when awaiting the result in the isolate
The text was updated successfully, but these errors were encountered: