Skip to content

Cypress doesn't work when there is no internet connection, testing to localhost #4763

@jodelasur

Description

@jodelasur

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:

  • It only doesn't work when there is no internet connection.
  • When there's no connection, issue happens with both Chrome and Electron

In the console, I see this:

image

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:

  1. Clone this repo, then npm install. This repo is just create-react-app with a cypress test that visits the home page.
  2. Disconnect internet connection.
  3. npm start to start server. http://localhost:3000 should display the default page for create-react-app.
  4. 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

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions