locahost server issue
See original GitHub issueOrb and Docker Image result in localhost server error
I’m sure there is a simple solution to this but have not found a clearcut way to resolve. It seems every time CircleCi runs npm start
it spins up a new server but our Cypress is set up to look for http://localhost:3040
and not a dynamic host
- what version of the orb are you currently using? cypress-io/cypress@1
cypress.json
{
"baseUrl": "http://localhost:3040"
}
CircleCi job using orb
cypress/run:
requires:
- build
command: npx cypress run
record: true
store_artifacts: true
start: npm start
wait-on: 'http://localhost:3040'
CircleCi job using Docker Image
cypress-test:
docker:
- image: cypress/included:6.1.0
environment:
TERM: xterm
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- v1-deps-{{ .Branch }}-{{ checksum "package.json" }}
- v1-deps-{{ .Branch }}
- v1-deps
- run:
name: Install Dependencies
command: npm ci
- save_cache:
key: v1-deps-{{ .Branch }}-{{ checksum "package.json" }}
paths:
- ~/.npm
- ~/.cache
- run:
name: Start Server
command: npm start
- run: $(npm bin)/cypress run
Screenshots of error messages / failed tests
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (5 by maintainers)
Top Results From Across the Web
Localhost Refused to Connect Error: 5 Confirmed Ways to Fix It
Localhost refused to connect error can be caused by an incorrectly configured port, insufficient permissions, or an inoperative web server.
Read more >Localhost Refused to Connect - How to Fix the Error
The server being blocked by the firewall. · Localhost doesn't resolve to 127.0.0.1. · Apache failing to run properly. · DNS failing to...
Read more >Localhost down today December, 2022 ... - UpdownRadar
Localhost website down Today December, 2022? Can't log in? Real-time problems and outages - here you'll see what is going on.
Read more >How to Resolve MAMP's “Localhost Refused to Connect” Error ...
2. Allow Incoming Connections · 3. Check MAMP's Document Root · 4. Change the Port Settings · 5. Verify That Your Apache Web...
Read more >localhost http 500 internal server error - Stack Overflow
2 Answers 2 · I found apache_error file which gives. Child 3528: Starting 150 worker threads. Child 3528: Starting thread to listen on...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Another thread in the react-scripts repo had some sort of solution using docker compose? Seems like web-pack’s issue may be related to the shell needing to stay alive.
The thread is here, but I’m not sure how to configure it using
docker-compose run
on circle-ci: https://github.com/facebook/create-react-app/issues/8688#issuecomment-602149917Please run this command on CI to show the logs from wait-on on CircleCI