I would like to test the login into the UXPin application.
After clicking the Log in button Testcafe throws an error Error: incorrect header check and stops the test immediately.
I should be able to log in into to the application and the test should pass.
Your website URL (or attach your complete example): https://app.uxpin.com/
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);
});
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)
1.3.3 10.16.0 testcafe chrome login.spec.js Chrome 75.0.3770 Mac OS X 10.14.5 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.