I have an issue, which seems something like a CORS issue. We have a react application which I'm running locally.
When I visit http://localhost:3000 it will redirect to a keycloak authorization page on our development server http://dev.domain/auth. After logging in you will be redirected back to your origin (in this case localhost)
When I run my test in Chrome: npx testcafe chrome features, the browser is started and you can see localhost is visited and the redirect is triggered, but then an error is thrown by testcafe.
Running tests in:
- Chrome 69.0.3497 / Linux 0.0.0
Demo testing the React Demo App
/home/data/react-demo-app/node_modules/testcafe-hammerhead/lib/request-pipeline/connection-reset-guard.js:27
throw err;
^
Error: write EPIPE
at _errnoException (util.js:1003:13)
at WriteWrap.afterWrite (net.js:866:14)
I've tried to run with websecurity disabled
npx testcafe 'chrome --disable-web-security --user-data-dir' features but this did not fix it.
And when I tried running it in Firefox, it ran without any issues.
Running tests in:
- Firefox 61.0.0 / Ubuntu 0.0.0
Demo testing the React Demo App
✓ Login and ...
1 passed (21s)
I suspect some sort of cross domain reference error, because when I run the test against the development server in Chrome, all works fine.
Any thoughts?