Socket hang up error with Cypress (tried 5.4 and 6.0.1)

Viewed 568

I'm trying to use cypress to test an app running on my local linux box. If I manually browse to the test URL (https://localhost:8443) it works fine. If I create a test in Cypress that simply contains nothing more than

describe('my app tests', function () {
  it('does very little', function () {
    cy.visit('https://localhost:8443')
  })
})

Then it fails after a few seconds with:

cy.visit() failed trying to load:

https://localhost:8443/

We attempted to make an http request to this URL but the request failed without a response.

We received this error at the network level:

  > Error: socket hang up

Common situations why this would fail:
  - you don't have internet access
  - you forgot to run / boot your web server
  - your web server isn't accessible
  - you have weird network configuration settings on your computer

Looking in DevTools there are no apparent requests to the test server - just 3 requests (1 document with a 304 status, and 2 xhr requests each with a 200 status) all of which apparently loading the cypress test and support files. Nothing else - no logged request to the test URL.

Can anyone offer any suggestions why I'm seeing this 'dead' test?

0 Answers
Related