Skip to content

Cypress is unable to load site in v3.5.0 due to "Parse Error" #5602

@tmonteith

Description

@tmonteith

Current behavior:

When attempting to resolve our site, Cypress throws an error. This was not an issue on older versions of Cypress. Our NGINX config is fairly vanilla and hasnt changed since we deployed it several months ago

error

CypressError: cy.visit() failed trying to load:

https://our-website.test.com/search-page

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: Parse Error

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

The stack trace for this error is:

Error: Parse Error
    at TLSSocket.socketOnData (_http_client.js:451:22)
    at TLSSocket.emit (events.js:194:13)
    at addChunk (_stream_readable.js:296:12)
    at readableAddChunk (_stream_readable.js:277:11)
    at TLSSocket.Readable.push (_stream_readable.js:232:10)
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:165:17)


Because this error occurred during a 'before each' hook we are skipping the remaining tests in the current suite: 'Search Page tests'`

Desired behavior:

Our site loads on newer versions of Cypress (3.5.0) and up.

Steps to reproduce: (app code and test code)

example code:

/// <reference types="Cypress" />
describe('Search Page Tests', () => {
  beforeEach(() => {
    cy.visit('/search')
    })

    cy.get(`[data-qa='tabs-wrapper']`).get(`[data-qa='tab']`).contains('red').as('redButton')    
    cy.get(`[data-qa='tabs-wrapper']`).get('[data-qa="tab"]').contains('blue').as('blueButton')
  })

  it('visit the search page and search for buttons', () => {
    cy.getById('searchGoToHomeButton')
      .should('have.attr', 'href', '/home')
  });

Steps to reproduce.

npx cypress open

Click spec from GUI and let test start. Error is thrown immediately upon attempting to resolve the page.

Versions

v3.5.0

Cypress desktop, v3.5.0, MAcOS 10.13.6, Electron(Chrome v78)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions