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

SocketException: Connection reset by peer (OS Error: Connection reset by peer, errno = 104), address = XXXX, port = 49440 #2189

Closed
rishuriya opened this issue Apr 15, 2024 · 2 comments

Comments

@rishuriya
Copy link

Package

dio

Version

4.04

Operating-System

Android

Adapter

Default Dio

Output of flutter doctor -v

Flutter (Channel stable, 3.19.5, on macOS 14.4.1 23E224 darwin-x64, locale
    en-US)
    • Flutter version 3.19.5 on channel stable at
      /Users/rishav_a2z/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 300451adae (3 weeks ago), 2024-03-27 21:54:07 -0500
    • Engine revision e76c956498
    • Dart version 3.3.3
    • DevTools version 2.31.1

[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/rishav_a2z/Library/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/macos#android-setup for
      more details.

[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15E204a
    • CocoaPods version 1.15.2

[✗] Chrome - develop for the web (Cannot find Chrome executable at
    /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Android Studio (version 2023.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      17.0.9+0-17.0.9b1087.7-11185874)

[✓] VS Code (version 1.88.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.86.0

[✓] Connected device (2 available)
    • SM M317F (mobile) • RZ8N924CERL • android-arm64 • Android 12 (API 31)
    • macOS (desktop)   • macos       • darwin-x64    • macOS 14.4.1 23E224
      darwin-x64

[✓] Network resources
    • All expected network resources are available.


### Dart Version

3.3.3

### Steps to Reproduce

I didn’t t understand , it came recently when one of my timer constantly pinging the server, and after a while it showing the error

### Expected Result

Expected Result would be to complete the API request

### Actual Result

I/flutter (14760): SocketException: Connection reset by peer (OS Error: Connection reset by peer, errno = 104), address = server.margati.com, port = 49440
I/flutter (14760): Exception occurred: DioError [DioErrorType.other]: SocketException: Connection reset by peer (OS Error: Connection reset by peer, errno = 104), address = server.margati.com, port = 49440
I/flutter (14760): Source stack:
I/flutter (14760): #0 DioMixin.fetch (package:dio/src/dio_mixin.dart:488:35)
I/flutter (14760): #1 DioMixin.request (package:dio/src/dio_mixin.dart:483:12)
I/flutter (14760): #2 DioMixin.post (package:dio/src/dio_mixin.dart:97:12)
I/flutter (14760): #3 LoginApiProvider.getUserData (package:margati/apiProvider/loginApiProvider.dart:239:39)
I/flutter (14760):
I/flutter (14760): #4 UserBloc._getUser. (package:margati/bloc/userBloc/user_bloc.dart:39:45)
I/flutter (14760):
I/flutter (14760): #5 UserBloc._getUser (package:margati/bloc/userBloc/user_bloc.dart:39:7)
I/flutter (14760):
I/flutter (14760): #6 Bloc.on..handleEvent (package:bloc/src/bloc.dart:229:13)
I/flutter (14760):

@rishuriya rishuriya added h: need triage This issue needs to be categorized s: bug Something isn't working labels Apr 15, 2024
@AlexV525
Copy link
Member

We're not providing support for v4 of Dio. Please upgrade and provide minimal reproducible example.

@AlexV525 AlexV525 added h: need more info Further information is requested i: outdated labels Apr 15, 2024
@kjxbyz
Copy link

kjxbyz commented Apr 27, 2024

DioException [connection error]: The connection errored: Connection reset by peer This indicates an error which most likely cannot be solved by the library.
Error: SocketException: Connection reset by peer (OS Error: Connection reset by peer, errno = 54), address = www.googleapis.com, port = 55072

@AlexV525 AlexV525 closed this as not planned Won't fix, can't repro, duplicate, stale May 2, 2024
@AlexV525 AlexV525 removed h: need more info Further information is requested h: need triage This issue needs to be categorized s: bug Something isn't working labels May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants