You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cypress can't connect to local HTTPS in 7.4.4 #1907
Hi, we we ran into this problem today where cypress in CI could no longer connect to a local HTTPS vite app with the NODE_TLS_REJECT_UNAUTHORIZED: 0 environment variable. We are running Node 24.20.0
Note, downgrading to 7.4.3 fixed this issue, so the root cause it likely to be the fix for #1869
Run cypress-io/github-action@v7
with:
start: npm run preview
wait-on: https://localhost:8080/root/user/settings/
wait-on-timeout: 180
record: false
browser: chrome
component: false
package-manager-cache: true
publish-summary: true
env:
GITHUB_TOKEN: ***
NODE_TLS_REJECT_UNAUTHORIZED: 0
SPLIT: 3
SPLIT_INDEX: 0
(node:2151) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
(Use `node --trace-warnings ...` to show where the warning was created)
.....
➜ Local: https://localhost:8080/root/user/settings/
https://localhost:8080/root/user/settings/ timed out after 21 retries, elapsed 223214ms, limit 210000ms
Error: self-signed certificate; if the root CA is installed locally, try running Node.js with --use-system-ca
Thanks for your report! Issue sindresorhus/got#2177 indicates that this was a breaking change in got@12, and we have just had to upgrade to got@16 to fix #1873 occurring in Node.js >=24.20.0. got@11 is no longer supported, and therefore there was no fix available for this version to allow it to work with Node.js >=24.20.0.
Under normal circumstances, since cypress-io/github-action@v7.4.4 turns out to be a breaking change for your set up, we should revert the commit that upgraded to got@16#1874 and release a new v7 version. That would however mean that @v7 action users of the simple form of the wait-on parameter on GitHub-hosted runners would find it stops working when the GitHub runner is updated to Node.js >=24.20.0, probably some time later this month.
If value equals '0', certificate validation is disabled for TLS connections. This makes TLS, and HTTPS by extension, insecure. The use of this environment variable is strongly discouraged.
You may also try removing the wait-on parameter completely. Cypress is tolerant of a slightly slower server startup, and it may work without explicitly waiting.
We need to use HTTPS for the dev server due to the app code performing OAUTH logins and all redirect origins must be HTTPS so even localhost has to be on that protocol, even if we then unsafely ignore the certificate.
I will give wait-on a go, as this is clearly not going to be fixed upstream
I was able to reproduce the issue after modifying the vite example to use https.
Creating a self-signed certificate and making it known through NODE_EXTRA_CA_CERTS, instead of trying to bypass a missing certificate with NODE_TLS_REJECT_UNAUTHORIZED, seems to allow this to work.
I'm not experienced in this area though, so I can't say if that would be appropriate for your environment.
I'm sorry that you've also been impacted! Unfortunately we don't have the option to keep the action the way it was previously, so the comments I have given to @steveworkman apply to other users as well.
Node.js is not going to revert the change they made in Node.js 24.20.0 and got is no longer supporting the got@11 version we were previously using.
You can try the workarounds, or you can provide a self-signed certificate through NODE_EXTRA_CA_CERTS.
If there are many reports of this issue I would propose to add an example of vite with https so it's clear how it can work.
This fails to connect in 7.4.4 - it connects in 7.4.3 with the NODE_TLS_REJECT_UNAUTHORIZED flag that is now rejected because of the got update
We have tried using a self-signed certificate. The vite project uses https://github.com/vitejs/vite-plugin-basic-ssl and we now expose the certificate that it creates. We pass that to the NODE_EXTRA_CA_CERTS environment variable for the cypress action, but the server still does not connect to the server.
We now don't have a choice:
stick with version 7.4.3 of this action and continue on HTTPS
Use HTTP in development
I don't think this is a patch change in this action, it's a full breaking change. Self-signed certs are no longer supported
wait-on: "npx wait-on --timeout 60000 https://localhost:8080/root/user/settings/"
This is independent of got. Even though it uses the same text, wait-on executed by npx is calling the separate package wait-on from the npm registry.
I successfully used npx wait-on leaving NODE_TLS_REJECT_UNAUTHORIZED=0 and without setting NODE_EXTRA_CA_CERTS:
> example-wait-on-vite@4.0.0 dev:https
> vite --config vite.config-https.js --host(node:2428) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.(Use `node --trace-warnings ...` to show where the warning was created) VITE v8.3.0 ready in 344 ms ➜ Local: https://localhost:5174/ ➜ Network: https://10.1.0.211:5174/ eth0npm warn exec The following package was not found and will be installed: wait-on@9.1.0(node:2473) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.(Use `node --trace-warnings ...` to show where the warning was created)==================================================================================================== (Run Starting) ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ Cypress: 16.1.0 │ │ Browser: Chrome 152 (headless) │ │ Node Version: v24.19.0 (/home/runner/actions-runner/cached/2.337.0/externals/node24/bin/node │ │ ) │ │ Specs: 1 found (spec.cy.js) │ │ Searched: cypress/e2e/**/*.cy.{js,jsx,ts,tsx} │ └────────────────────────────────────────────────────────────────────────────────────────────────┘
Activity
MikeMcC399 commentedon Sep 18, 2026
Thanks for your report! Issue sindresorhus/got#2177 indicates that this was a breaking change in
got@12, and we have just had to upgrade togot@16to fix #1873 occurring in Node.js >=24.20.0.got@11is no longer supported, and therefore there was no fix available for this version to allow it to work with Node.js >=24.20.0.Under normal circumstances, since cypress-io/github-action@v7.4.4 turns out to be a breaking change for your set up, we should revert the commit that upgraded to
got@16#1874 and release a new v7 version. That would however mean that@v7action users of the simple form of thewait-onparameter on GitHub-hosted runners would find it stops working when the GitHub runner is updated to Node.js >=24.20.0, probably some time later this month.Suggestions
See https://github.com/cypress-io/github-action#wait-on
localhostserver expose alsohttpso that you can do an availability check using:Consider if you can have your vite app use only http for testing purposes
This would correspond to the example https://github.com/cypress-io/github-action/tree/master/examples/wait-on-vite which is tested in https://github.com/cypress-io/github-action/blob/master/.github/workflows/example-wait-on.yml
Note
The Node.js CLI documentation states:
NODE_TLS_REJECT_UNAUTHORIZED=valueIf value equals '0', certificate validation is disabled for TLS connections. This makes TLS, and HTTPS by extension, insecure. The use of this environment variable is strongly discouraged.
MikeMcC399 commentedon Sep 18, 2026
You may also try removing the
wait-onparameter completely. Cypress is tolerant of a slightly slower server startup, and it may work without explicitly waiting.steveworkman commentedon Sep 18, 2026
Thanks for the quick response.
We need to use HTTPS for the dev server due to the app code performing OAUTH logins and all redirect origins must be HTTPS so even localhost has to be on that protocol, even if we then unsafely ignore the certificate.
I will give wait-on a go, as this is clearly not going to be fixed upstream
MikeMcC399 commentedon Sep 18, 2026
I was able to reproduce the issue after modifying the vite example to use https.
Creating a self-signed certificate and making it known through
NODE_EXTRA_CA_CERTS, instead of trying to bypass a missing certificate withNODE_TLS_REJECT_UNAUTHORIZED, seems to allow this to work.I'm not experienced in this area though, so I can't say if that would be appropriate for your environment.
yhy-1 commentedon Sep 18, 2026
We are also experiencing the same issue in our company. Will this be fix or do we also need to implement the wait-on workaround? @MikeMcC399
MikeMcC399 commentedon Sep 18, 2026
@yhy-1
I'm sorry that you've also been impacted! Unfortunately we don't have the option to keep the action the way it was previously, so the comments I have given to @steveworkman apply to other users as well.
Node.js is not going to revert the change they made in Node.js 24.20.0 and
gotis no longer supporting thegot@11version we were previously using.You can try the workarounds, or you can provide a self-signed certificate through
NODE_EXTRA_CA_CERTS.If there are many reports of this issue I would propose to add an example of vite with https so it's clear how it can work.
steveworkman commentedon Sep 22, 2026
@MikeMcC399 I've tried the solutions that you've provided:
wait-onparameter in our yamlThis fails to connect in 7.4.4 - it connects in 7.4.3 with the
NODE_TLS_REJECT_UNAUTHORIZEDflag that is now rejected because of thegotupdateNODE_EXTRA_CA_CERTSenvironment variable for the cypress action, but the server still does not connect to the server.We now don't have a choice:
I don't think this is a patch change in this action, it's a full breaking change. Self-signed certs are no longer supported
MikeMcC399 commentedon Sep 22, 2026
@steveworkman
Did you also try the following?
This is independent of
got. Even though it uses the same text,wait-onexecuted bynpxis calling the separate package wait-on from the npm registry.steveworkman commentedon Sep 22, 2026
Yes, I get the same error, it can't connect
MikeMcC399 commentedon Sep 22, 2026
I successfully used
npx wait-onleavingNODE_TLS_REJECT_UNAUTHORIZED=0and without settingNODE_EXTRA_CA_CERTS:steveworkman commentedon Sep 22, 2026
Can you share the github actions yaml that you used for that?
MikeMcC399 commentedon Sep 22, 2026
It's based on the original example, with non-relevant bits removed. Vite https is added, using
"@vitejs/plugin-basic-ssl": "^2.1.0".The example workflow is on
https://github.com/MikeMcC399/github-action/blob/1907-vite-https-wait-on-util/.github/workflows/example-wait-on.yml
The example project is
https://github.com/MikeMcC399/github-action/tree/1907-vite-https-wait-on-util/examples/wait-on-vite
The workflow log is
https://github.com/MikeMcC399/github-action/actions/runs/35726651113/job/106741834181
steveworkman commentedon Sep 22, 2026
OK, got it, I also needed to move the startup script back into the cypress action. This now works.
MikeMcC399 commentedon Sep 22, 2026
@steveworkman
Good to hear! Congratulations on getting it working again! 🚀
MikeMcC399 commentedon Sep 22, 2026
I suggest to leave this issue open for visibility until GitHub-hosted runners migrate to Node.js >=24.20.0.
actions/runner#4716 shows they've been updated internally to Node.js 24.21.0. If that repo cuts a new release, then that version will start rolling out. Currently the GitHub runner releases list shows v2.337.0 as
latest, withNODE24_VERSION="24.19.0"in https://github.com/actions/runner/blob/397b032cbf865e9c3ddfab89d533ec19325e1273/src/Misc/externals.shMikeMcC399 commentedon Oct 6, 2026
actions/runner@v2.338.0 was released on Oct 6, 2026
https://github.com/actions/runner/blob/197ca027b90de199464dee3bb9ff198a1db60967/src/Misc/externals.sh#L10
sets
NODE24_VERSION="24.21.0"