You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[✓] Flutter (Channel stable, 3.10.4, on Ubuntu 22.04.2 LTS 5.19.0-46-generic, locale en_US.UTF-8)
• Flutter version 3.10.4 on channel stable at /home/oleksii/fvm/versions/3.10.4
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 682aa387cf (7 weeks ago), 2023-06-05 18:04:56 -0500
• Engine revision 2a3401c9bb
• Dart version 3.0.3
• DevTools version 2.23.1
[!] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
• Android SDK at /home/oleksii/Android/Sdk
✗ cmdline-tools component is missing
Run path/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run flutter doctor --android-licenses to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/linux#android-setup for more details.
[✓] Chrome - develop for the web
• Chrome at google-chrome
[✓] Linux toolchain - develop for Linux desktop
• Ubuntu clang version 14.0.0-1ubuntu1
• cmake version 3.22.1
• ninja version 1.10.1
• pkg-config version 0.29.2
[!] Android Studio (version 2023.1)
• Android Studio at /home/oleksii/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-1/231.7864.76.2311.10114981
• Flutter plugin version 73.1.1
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
✗ Unable to find bundled Java version.
• Try updating or re-installing Android Studio.
[✓] Android Studio (version 2022.1)
• Android Studio at /home/oleksii/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/221.6008.13.2211.9477386
• Flutter plugin version 72.1.2
• Dart plugin version 221.6096
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
[✓] Android Studio (version 2022.2)
• Android Studio at /home/oleksii/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.9971841
• Flutter plugin version 74.0.2
• Dart plugin version 222.4582
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
[✓] VS Code
• VS Code at /snap/code/current
• Flutter extension version 3.64.0
final someStream = await createStream();
someStream?.data?.stream
.transform(someUnit8Transformer)
.transform(const Utf8Decoder())
.listen((event) async {
// Do something with data
});
Add onError() callback on StreamSubscription (HttpException received only inside onError(), not try-catch)
try {
final someStream = await createStream();
someStream?.data?.stream
.transform(someUnit8Transformer)
.transform(const Utf8Decoder())
.listen((event) async {
// Do something with data
}).catchError((err) {
/// After 20 seconds of idle receive _HttpException: Connection closed while receiving data_ here
print(err);
});
} catch (err) {
/// There are no errors
}
Wait 20 seconds of stream idle. If data received more often than in 20 seconds- everything works fine
Receive HttpException: Connection closed while receiving data
Expected Result
Correct work of stream and receiving all events
Actual Result
After 20 seconds of stream idle, onError() callback throw HttpException: Connection closed while receiving data. If data received more often than in 20 seconds- everything works fine.
Also i can said that i tried to configure dio.options timeouts, but there are no effect.
The text was updated successfully, but these errors were encountered:
Hi,
Could you be more specific. What was the problem on the server side if you can remember? I'm facing the same exception. Server seems to respond from logs on its side, but client says the connection was closed before response was received.
Package
dio
Version
5.1.2
Output of
flutter doctor -v
[✓] Flutter (Channel stable, 3.10.4, on Ubuntu 22.04.2 LTS 5.19.0-46-generic, locale en_US.UTF-8)
• Flutter version 3.10.4 on channel stable at /home/oleksii/fvm/versions/3.10.4
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 682aa387cf (7 weeks ago), 2023-06-05 18:04:56 -0500
• Engine revision 2a3401c9bb
• Dart version 3.0.3
• DevTools version 2.23.1
[!] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
• Android SDK at /home/oleksii/Android/Sdk
✗ cmdline-tools component is missing
Run
path/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run
flutter doctor --android-licenses
to accept the SDK licenses.See https://flutter.dev/docs/get-started/install/linux#android-setup for more details.
[✓] Chrome - develop for the web
• Chrome at google-chrome
[✓] Linux toolchain - develop for Linux desktop
• Ubuntu clang version 14.0.0-1ubuntu1
• cmake version 3.22.1
• ninja version 1.10.1
• pkg-config version 0.29.2
[!] Android Studio (version 2023.1)
• Android Studio at /home/oleksii/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-1/231.7864.76.2311.10114981
• Flutter plugin version 73.1.1
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
✗ Unable to find bundled Java version.
• Try updating or re-installing Android Studio.
[✓] Android Studio (version 2022.1)
• Android Studio at /home/oleksii/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/221.6008.13.2211.9477386
• Flutter plugin version 72.1.2
• Dart plugin version 221.6096
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
[✓] Android Studio (version 2022.2)
• Android Studio at /home/oleksii/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.9971841
• Flutter plugin version 74.0.2
• Dart plugin version 222.4582
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
[✓] VS Code
• VS Code at /snap/code/current
• Flutter extension version 3.64.0
[✓] Connected device (3 available)
• sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64 • Android 13 (API 33) (emulator)
• Linux (desktop) • linux • linux-x64 • Ubuntu 22.04.2 LTS 5.19.0-46-generic
• Chrome (web) • chrome • web-javascript • Google Chrome 113.0.5672.92
[✓] Network resources
• All expected network resources are available.
Dart Version
3.0.3
Steps to Reproduce
Expected Result
Correct work of stream and receiving all events
Actual Result
After 20 seconds of stream idle, onError() callback throw HttpException: Connection closed while receiving data. If data received more often than in 20 seconds- everything works fine.
Also i can said that i tried to configure dio.options timeouts, but there are no effect.
The text was updated successfully, but these errors were encountered: