Skip to content

Unable to Connect to Local Server - net::ERR_CONNECTION_REFUSED on Signup #47

@ajamous

Description

@ajamous

Hello,

I was trying to play around with this, have recently built it using the following commands as instructed by the documentation:

flutter build web --dart-define-from-file=dart_define.json
dart run tool/extenvsubst.dart dart_define.json build/web/index.html
flutter run -d chrome

After successfully building and running the application, I encountered an issue during the signup process. When clicking on the signup button, the application attempts to make a GET request to http://localhost:4000/api/v1/system-info, but it fails with the following error in the console:

GET http://localhost:4000/api/v1/system-info net::ERR_CONNECTION_REFUSED

This error indicates that the application is unable to establish a connection to the local serve running on port 4000r. Here are the details of the environment and steps I have taken:

  • Flutter Version: :

Flutter 3.13.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision ead455963c (35 hours ago) • 2023-09-26 18:28:17 -0700
Engine • revision a794cf2681
Tools • Dart 3.1.3 • DevTools 2.25.0

  • Operating System: macOS 14.0
  • Browser: Google Chrome Version 117.0.5938.92 (Official Build) (arm64)
  • Server Status: I have checked the server localhost:4000 is not running, I also was unable to find out where to run it from.
curl http://localhost:4000
curl: (7) Failed to connect to localhost port 4000 after 6 ms: Couldn't connect to server

Questions:

  1. Server Connection: Is there anything specific commands that needs to be run separately to get the local server on port 4000 to run
  2. Client-Side Configuration: Is there any additional client-side configuration required in the Flutter app to successfully make requests to the local server?
  3. Debugging Suggestions: Are there any additional debugging steps or tools that you would recommend to diagnose and resolve this issue?

Thank you for your time and assistance!

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions