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

Error: connect ECONNREFUSED ::1:8081 #918

Closed
bajajcodes opened this issue Feb 7, 2023 · 0 comments
Closed

Error: connect ECONNREFUSED ::1:8081 #918

bajajcodes opened this issue Feb 7, 2023 · 0 comments
Assignees

Comments

@bajajcodes
Copy link
Contributor

bajajcodes commented Feb 7, 2023

On running tests locally getting error messages from a few tests which involve after each hook call.

NPM SCRIPTS
yarn run test
yarn run test-unit
yarn run test-integration
yarn run tdd:watch

Stack Trace

     Error: connect ECONNREFUSED ::1:8081
      at Function.AxiosError.from (node_modules/axios/dist/node/axios.cjs:725:14)
      at RedirectableRequest.handleRequestError (node_modules/axios/dist/node/axios.cjs:2467:25)
      at ClientRequest.eventHandlers.<computed> (node_modules/follow-redirects/index.js:14:24)
      at Socket.socketErrorListener (_http_client.js:475:9)
      at emitErrorNT (internal/streams/destroy.js:106:8)
      at emitErrorCloseNT (internal/streams/destroy.js:74:3)
      at processTicksAndRejections (internal/process/task_queues.js:82:21)

Info

  • OS: MACOS
  • node: 14
  • dev server: working
  • validate-setup: success
yarn run v1.22.19
$ node scripts/validateSetup.js
 GitHub credentials are properly set.
 Firestore config is correct.
 Firestore config is not empty.
 Local development has permission to read and write in firestore.

🎉🎉🎉🎉🎉🎉 Success! The backend was successfully set up 👍. 🎉🎉🎉🎉🎉
  Done in 4.83s.
  • Firebase debug log: Log

Casuse Identified

Feb 08, 2023 6:46:38 AM io.gapi.emulators.netty.HttpVersionRoutingHandler channelRead
INFO: Detected HTTP/2 connection.
  • Firebase debug log, issue acceptance
[debug] [2023-02-07T16:21:41.589Z] [logging] Logging Emulator only supports listening on one address (127.0.0.1). Not listening on ::1

Workaround Tried

  • Changing ports
  • Upgrading firebase cli
  • Installing using npm
  • Worked: Changing host address Change the following inside firebae.json.
Previously firebase.json
{
  "emulators": {
    "firestore": {
      "port": 8081
    },
    "ui": {
      "enabled": true,
      "port": 4000
    }
  }
}
After changes firebase.json
{
  "emulators": {
    "firestore": {
      "host": "0.0.0.0",
      "port": 8081
    },
    "ui": {
      "host": "0.0.0.0",
      "enabled": true,
      "port": 4200
    }
  }
}

Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant