https://cypress.io logo
i got an "Error: connect ECONNREFUSED 127.0.0.1:33...
# i-need-help
d
i was creating this command to run before every test, it should send a request and get a 'response.body.id' that i need to login. the project is up and running well, if i remove "before" the test cases run with no problems but i cant login without this value. this is the console: at (http://localhost:3000/__cypress/runner/cypress_runner.js:139749:78) From previous event: at Context.request (http://localhost:3000/__cypress/runner/cypress_runner.js:139746:15) at wrapped (http://localhost:3000/__cypress/runner/cypress_runner.js:151118:43) From Your Spec Code: at Context.eval (webpack:///./cypress/support/commands.js:28:7) From Node.js Internals: RequestError: Error: connect ECONNREFUSED 127.0.0.1:3333 at new r (:1737:501122) at ee.callback (:1737:507123) at e.callback.s.callback [as _callback] (:1737:506569) at s._callback.s.callback.s.callback (:1955:65115) at ee.emit (node:events:527:28) at ee.onRequestError (:1955:74057) at ClientRequest.emit (node:events:539:35) at Socket.socketErrorListener (node:_http_client:454:9) at Socket.emit (node:events:527:28) at emitErrorNT (node:internal/streams/destroy:157:8) at emitErrorCloseNT (node:internal/streams/destroy:122:3) at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
l
Were you able to get this to work? I had the same issue yesterday. I was just trying to visit the home page too. Using localhost, or
0.0.0.0
, etc were not working. After restarting my server a few times it worked itself out, but it was rather strange and I'm not convinced that it is fixed. Did you follow all the steps in the error? Have you able to visit your
baseUrl
or home page?
d
@little-france-10142 actually its working now, i was with some trouble because i dont code the front or back, i changed how the daemon variable was running the script to up this service on backend's package.json. now it is like this: "scripts": { "start": "nodemon src/index.js localhost 3333" },
l
oh interesting. So you're declaring your src at start up. Nice. Glad it's working!
5 Views