Testcafe-hammerhead: Incorrect header check.

Created on 23 Jul 2019  ·  4Comments  ·  Source: DevExpress/testcafe-hammerhead

What is your Test Scenario?


I would like to test the login into the UXPin application.

What is the Current behavior?


After clicking the Log in button Testcafe throws an error Error: incorrect header check and stops the test immediately.

What is the Expected behavior?


I should be able to log in into to the application and the test should pass.

What is your web application and your TestCafe test code?

Your website URL (or attach your complete example): https://app.uxpin.com/

Details

Summary

Your complete test code (or attach your test files)

import { ClientFunction } from 'testcafe';

fixture`UXPin`.page`https://app.uxpin.com`;

const DASHBOARD_URL = 'https://app.uxpin.com/dashboard/projects';

const location = ClientFunction(() => {
  return document.location.href;
});

test('Login', async t => {
  await t
    .typeText('#login-login', '[email protected]')
    .typeText('#login-password', 'TestCafe123')
    .click('#loginform_button1')
    .expect(location()).eql(DASHBOARD_URL);
});


Your complete test report

 Running tests in:
 - Chrome 75.0.3770 / Mac OS X 10.14.5

 UXPin
 ✖ Login

   1) A request to "https://app.uxpin.com/dashboard/" has failed.
      Use quarantine mode to perform additional attempts to execute this test.
      You can find troubleshooting information for this issue at
      "https://go.devexpress.com/TestCafe_FAQ_ARequestHasFailed.aspx".

      Error details:
      Error: incorrect header check

      Browser: Chrome 75.0.3770 / Mac OS X 10.14.5

         10 |
         11 |test('Login', async t => {
         12 |  await t
         13 |    .typeText('#login-login', '[email protected]')
         14 |    .typeText('#login-password', 'TestCafe123')
       > 15 |    .click('#loginform_button1')
         16 |    .expect(location()).eql(DASHBOARD_URL);
         17 |});
         18 |

         at click (/Users/michalkowalewski/uxpin-docker/uxpin-test-cafe/specs/getting-started.js:15:6)
         at test (/Users/michalkowalewski/uxpin-docker/uxpin-test-cafe/specs/getting-started.js:11:1)
         at <anonymous>
      (/Users/michalkowalewski/uxpin-docker/uxpin-test-cafe/node_modules/testcafe/src/api/wrap-test-function.js:17:28)
         at TestRun._executeTestFn
      (/Users/michalkowalewski/uxpin-docker/uxpin-test-cafe/node_modules/testcafe/src/test-run/index.js:263:19)
         at TestRun.start
      (/Users/michalkowalewski/uxpin-docker/uxpin-test-cafe/node_modules/testcafe/src/test-run/index.js:312:24)


   2) Unhandled promise rejection:

      Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
      at ServerResponse.setHeader (_http_outgoing.js:470:11)
      at ServerResponse.writeHead (_http_server.js:232:21)
      at RequestPipelineContext.sendResponseHeaders

   (/Users/michalkowalewski/uxpin-docker/uxpin-test-cafe/node_modules/testcafe-hammerhead/lib/request-pipeline/context.js:308:9)
      at Array.<anonymous>

   (/Users/michalkowalewski/uxpin-docker/uxpin-test-cafe/node_modules/testcafe-hammerhead/lib/request-pipeline/index.js:226:9)
      at Generator.next (<anonymous>)
      at asyncGeneratorStep

   (/Users/michalkowalewski/uxpin-docker/uxpin-test-cafe/node_modules/testcafe-hammerhead/lib/request-pipeline/index.js:38:103)
      at _next

   (/Users/michalkowalewski/uxpin-docker/uxpin-test-cafe/node_modules/testcafe-hammerhead/lib/request-pipeline/index.js:40:194)

          Browser: Chrome 75.0.3770 / Mac OS X 10.14.5



 1/1 failed (6s)

Steps to Reproduce

  1. Go to https://app.uxpin.com/
  2. Type login and password in the inputs
  3. Click on the log in button.

Your Environment details

  • testcafe version: 1.3.3
  • node.js version: 10.16.0
  • command-line arguments: testcafe chrome login.spec.js
  • browser name and version: Chrome 75.0.3770
  • platform and version: Mac OS X 10.14.5
server level 1 pipeline bug

All 4 comments

Thank you for reporting this issue. I reproduced it in http-playground getting { Error: incorrect header check     at Zlib.zlibOnError [as onerror] (zlib.js:162:17) errno: -3, code: 'Z_DATA_ERROR' }. This means that the error occurred during the encoding\decoding of the header's content. We'll need some time to research it.

Ok, thank you very much for your help!

We started to see this error after we updated from version 1.2.1 to 1.8.4. It happens fairly frequently, every fifth run or so.

Can't pinpoint what the issue is since re-running the exact same tests under the exact same conditions doesn't produce a consistent result. The tests are runned on ubuntu-18.04.

Hello @ganhammar ,

We have plans to fix this issue. We will update this thread as soon as we have any progress.

Was this page helpful?
0 / 5 - 0 ratings