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

ClientException with SocketException: Connection reset by peer #1397

Open
kapilsharma-gts opened this issue Nov 4, 2024 · 2 comments
Open
Labels
package:http type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@kapilsharma-gts
Copy link

Description: An error occurs when trying to fetch suggested remedies from the API. The request fails with a ClientException due to a SocketException, resulting in a "Connection reset by peer" error.
Error Details:
Exception: An error occurred: ClientException with SocketException: Connection reset by peer (OS Error: Connection reset by peer, errno = 104)
Stack Trace:
#0 HttpClient.post.<anonymous closure> (package:karmm_customer/http/http_client.dart:230:9) <asynchronous suspension> #1 HttpClient._request (package:karmm_customer/http/http_client.dart:292:18) <asynchronous suspension> #2 HttpClient.post (package:karmm_customer/http/http_client.dart:171:12) <asynchronous suspension> #3 RemediesController.fetchSuggestedRemedies (package:karmm_customer/Features/remedie/controller/remedieController.dart:41:24) <asynchronous suspension>
Steps to Reproduce:

  1. Observe the ClientException error with SocketException.

Additional Information:
HTTP Method: POST
Dart/Flutter Version:
3.16.3 Flutter SDK
3.2.3 (Flutter)Dart SDK
http : ^1.0.0

@kapilsharma-gts kapilsharma-gts added package:http type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Nov 4, 2024
@brianquinlan brianquinlan added the needs-info Additional information needed from the issue author label Nov 7, 2024
@brianquinlan
Copy link
Collaborator

Does this happen on every request? This normally happens when the remote does not recognize the connection that you are transmitting though.

@github-actions github-actions bot removed the needs-info Additional information needed from the issue author label Nov 7, 2024
@kapilsharma-gts
Copy link
Author

Yes, this issue occurs consistently on some attempt to fetch the own api. Based on the error message, it seems to be a "Connection reset by peer" error, which might suggest an issue with how the remote server is handling or recognizing the connection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:http type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

2 participants