-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Cypress doesn't work when there is no internet connection, testing to localhost #4763
Comments
Cypress should most definitely work offline, @flotwig can you take a look at this? |
Justin James @digitaldrummerj has asked about it before https://twitter.com/digitaldrummerj/status/1130898592481316864 |
Couldn't reproduce in Ubuntu 19.04, but in Windows 10 can confirm the issue occurs in Chrome & Electron. Working on the "why" now. |
The root issue appears to be nodejs/node#11320... Node on Windows cannot resolve A fix landed in Node 8.10: nodejs/node#17662, we're on 8.9.3. An interim fix is to intercept calls to |
Nice detective work, Zach
…Sent from my iPhone
On Jul 22, 2019, at 08:52, Zach Bloomquist ***@***.***> wrote:
The root issue appears to be nodejs/node#11320... Node on Windows cannot resolve localhost when there is no active network interface besides 'loopback'.
A fix landed in Node 8.10: nodejs/node#17662, we're on 8.9.3.
An interim fix is to intercept calls to dns.lookup and use os.networkInterfaces() to detect if this problem is going to occur, and if so, strip the problematic flag from dns.lookup. Submitted a PR to fix this (#4774) while we work on upgrading the bundled Node (#3568)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
The code for this is done in cypress-io/cypress#4774, but has yet to be released. |
Released in |
Current behavior:
Cypress will not load tests to localhost server when there is no internet connection. This happens in both GUI (cypress open) and command line (cypress run).
I'm experiencing something similar to #4235, but the differences are:
In the console, I see this:
I'm not in a corporate proxy server.
Desired behavior:
The tests should still run, since I'm only testing a local server.
Steps to reproduce:
npm install
. This repo is just create-react-app with a cypress test that visits the home page.npm start
to start server. http://localhost:3000 should display the default page for create-react-app.npm run cypress:open
to start Cypress. Then run home.spec.js. You'll see that the test doesn't load.I also included my logs in the repo. See
log.txt
.Versions
Cypress 3.4.0, Windows 10, Chrome 75 and Electron 61
The text was updated successfully, but these errors were encountered: