Comments (7)
Change http-get://localhost:3000
to https-get://localhost:3000
this should resolve your issue.
If not try following script:
START_SERVER_AND_TEST_INSECURE=1 start-server-and-test start http-get://localhost:3000 cy:open
.
from start-server-and-test.
Change http-get://localhost:3000 to https-get://localhost:3000 this should resolve your issue.
If not try following script:
START_SERVER_AND_TEST_INSECURE=1 start-server-and-test start http-get://localhost:3000 cy:open.
I can confirm this works for me:
// package.json
"start": "HTTPS=true PORT=3001 react-app-rewired start",
"cy:run": "cypress run",
"cy:ci": "START_SERVER_AND_TEST_INSECURE=1 start-server-and-test start:ci https-get://localhost:3001 cy:run",
@praneetha-ck-robo , can you try this and tell if it works?
from start-server-and-test.
Piggybacking on this thread.
Does that mean @rajzik that if I have two servers...
{
"scripts": {
"test": "node src/test",
"start:api": "node src/api",
"start:server": "node src/server",
"start:server-and-api": "start-test start:api 7600 start:server",
"test:all": "start-test start:server-and-api http-get://localhost:3000 test"
}
}
If I do this I get...
TypeError: Cannot read property 'indexOf' of undefined
[./node_modules/webpack-dev-server/client/index.js?http://localhost:5555] (webpack)-dev-server/client?http://localhost:5555 8.1 KiB {main} [built]
+ 1202 hidden modules
ℹ 「wdm」: Compiled successfully.
TypeError: Cannot read property 'indexOf' of undefined
My server starts at http://localhost:3000/#/
do I need to include the hash?
from start-server-and-test.
@rodoabad
The error comes from where?
If you have some sort of routing inside of your application and you get redirected from /
to /#/
it shouldn't be problem.
start-test
waiting for response from sever
. Also it looks like something running on port 5555, maybe it's only debugging port.
There might be problem with timing of your servers.
start-test
waits only for one server.
from start-server-and-test.
@rodoabad you can try to isolate what is causing the error. Try each command separately:
"scripts": {
"test": "node src/test",
"start:api": "node src/api",
"start:server": "node src/server",
"start:server-and-api": "start-test start:api 7600 start:server",
"test:all": "start-test start:server-and-api http-get://localhost:3000 test"
}
this is step 1, to validate the problem is actually in test:all
.
If your server runs on https
, see my previous comment
from start-server-and-test.
I'm also having this problem with CRA (react-scripts v3.4.3).
The way my HTTPS is set is in my .env
file:
HTTPS=true
SSL_CRT_FILE=./.cert/cert.pem
SSL_KEY_FILE=./.cert/key.pem
I've tried the answer you suggested @goldylucks, however it seems that when the Webpack server starts it hijacks / overrides the rest of the script.
My workaround was to execute this script:
HTTPS=false start-server-and-test start:pwa http-get://localhost:3000 cy:run
from start-server-and-test.
Just chipping in to add that I was trying to run end-to-end tests on my Create React App on localhost with https enabled. Initially the server would start but then the test would not get triggered, but by adding the command START_SERVER_AND_TEST_INSECURE=1
before running start-server-and-test
it worked perfectly.
from start-server-and-test.
Related Issues (20)
- Startup message "is responding with HTTP status code NaN" HOT 5
- ERR_INVALID_ARG_TYPE has thrown
- Misleading minimum Node version in README HOT 6
- start-server-and-test failure wait for localhost of react-app Node.js 18 HOT 6
- start-server-and-test failure wait for localhost of react-app Node.js 18 (update) HOT 5
- Unexpected freezing and infinite loop when using `localhost` instead of `127.0.0.1` HOT 7
- How to disable insecure with multiple dev environments? Why is it not an argument? HOT 4
- Expand scope to waiting for port-forwarding processes
- start-server-and-test ends in ambiguous error after tests run HOT 1
- `http-server --silent` flag is ignored
- Heads up for the URL to ping when on node version above 17 HOT 1
- Interactive shell in the test process is erratic due to stdin being piped to both the server and the test processes HOT 1
- assume http protocol for localhost HOT 1
- Timed out waiting for a url HOT 7
- README on npm broken HOT 2
- Is there a way to stop browserslist update, and is it start-server-and-test dependent update?
- request: Start server only if it is not running. HOT 2
- How to allow user input from CLI? HOT 2
- Dynamic port
- Error: kill EPERM
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from start-server-and-test.