Isolate hangs when responding to large json
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- dart, flutter
- Domain
- mobile-dev, networking
Research direction
Start by reproducing the Dio request on Android with a large JSON response, locking and unlocking the screen, then inspect the default adapter's isolate behavior after the device is lost. Compare the result with Dart's official http library; done means the request returns the configured receive timeout instead of hanging.
Written by the indexing model from the issue text.
Description
Package
dio
Version
5.8.0+1
Operating-System
Android
Adapter
Default Dio
Output of flutter doctor -v
Flutter (Channel stable, 3.35.1, on macOS 15.5 24F74 darwin-arm64, locale zh-Hans-MO) [337ms]
• Flutter version 3.35.1 on channel stable at /Users/xxx/fvm/versions/stable
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 20f8274939 (5 weeks ago), 2025-08-14 10:53:09 -0700
• Engine revision 1e9a811bf8
• Dart version 3.9.0
• DevTools version 2.48.0
• Feature flags: no-enable-web, no-enable-linux-desktop, no-enable-macos-desktop, no-enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-lldb-debugging
Dart Version
3.9.0
Steps to Reproduce
1.open app
2.Mobile lock screen
3.Wait a moment,Unlock screen,send a dio request with response body size Larger, The specific threshold is unclear ,and response type is json,content-type is json
4.this dio request no result,
Expected Result
over the receiveTimeount should be return
I found ,the lock screen caused "Lost Device",then back app use isolate will hang.
I don't have this problem when I use the official dart http library
Actual Result
No results
- Dominant language
- Dart
- Stars
- 12.8k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cfug/dio
-
h: need triage s: bug
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
e: performance p: http2_adapter platform: io s: bug
-
e: performance p: native_dio_adapter platform: io s: bug
-
e: performance p: http2_adapter platform: io s: bug
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bus
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100