question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Error: incorrect header check" Cypress 6.2.1

See original GitHub issue

I made a request using Cypress 6.3.0 and received an error.

I can make this same request using Postman or curl with no issues.

Current behavior

I make a request and receive the following error: Error: incorrect header check

image

Desired behavior

200 OK should be returned as a response

Test code to reproduce

cy.request('https://www.cmmiinstitute.com/');

Versions

Cypress 6.3.0 Windows 10 Enterprise

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
bahmutovcommented, Jan 22, 2021

Since the problem seems to be in gzipped response, let’s disable gzip using https://on.cypress.io/request options

/// <reference types="cypress" />
describe('Cypress Request to our page', () => {
  it('causes an incorrect header check exception to be thrown', () => {
    // https://on.cypress.io/request
    cy.request({
      url: 'https://cmmiinstitute.com/',
      gzip: false
    });
  });
});

Working!

Final solution

If cy.request is getting error “incorrect header check” use gzip: true option

1reaction
bahmutovcommented, Jan 21, 2021

Can we have a reproducible example to debug this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Marc Myers on Twitter: "@Cypress_io I was hoping this would fix the ...
@Cypress_io · github.com. "Error: incorrect header check" Cypress 6.2.1 · Issue #14540 · cypress-io/cypress. I made a request using Cypress 6.3.0 and ...
Read more >
Changelog - Cypress Documentation
Fixed as issue where browser-skipped tests were incorrectly recorded to the Dashboard which resulted in the Dashboard marking the test as "new" or...
Read more >
Incorrect header check error - node.js - Stack Overflow
I am passing my own gzipped url in the code. Any help will be really useful. Thanks. node.js · http · request ·...
Read more >
cypress-io/cypress - Gitter
in cypress error says unidentified is exist, is visibletc. i tried setup again cypress-if, update node, downgrade node.
Read more >
Cypress cy.intercept Problems - Gleb Bahmutov
Thus I test how the application handles 404 or 500 errors rather than a generic "Server is not responding" network error. 1 2...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found