testcafe: Error: Unable to establish one or more of the specified browser connections. This can be caused by network issues or remote device failure.
Since we upgraded TestCafe to 1.4.0, intermittently we are getting “Unable to establish one or more of the specified browser connections” error. It happens very frequently with latest TestCafe now and occurs mostly with 2+ browser instances.
This command is ran from CircleCI and giving the problem, this issue was never present with TestCafe 1.3.3. Is there any way to retry or recover command from this error? Please fix the issue if possible.
Error:
(node:549) Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0' makes TLS connections and HTTPS requests insecure by disabling certificate verification.
Run command: --path /home/circleci/zm-x-web/tests/testcafe/tests -T Smoke chrome -c 6 -r html-testrail -S -s test-reports/smoke-testcafe-mobile -p ${TEST} - ${QUARANTINE_ATTEMPT}.png --env ZIMBRA8 --device MOBILE --language en_US --performance false --video false --configure true npm run serve
(node:549) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Error: Unable to establish one or more of the specified browser connections. This can be caused by network issues or remote device failure.
at BrowserSet._waitConnectionsOpened (/home/circleci/zm-x-web/node_modules/testcafe/src/runner/browser-set.js:84:30)
at /home/circleci/zm-x-web/node_modules/testcafe/src/runner/browser-set.js:107:35
at invokeCallback (/home/circleci/zm-x-web/node_modules/pinkie/index.js:60:12)
at Array.forEach (<anonymous>)
at publish (/home/circleci/zm-x-web/node_modules/pinkie/index.js:147:32)
at Array.publishFulfillment (/home/circleci/zm-x-web/node_modules/pinkie/index.js:152:2)
at Immediate.asyncFlush (/home/circleci/zm-x-web/node_modules/pinkie/index.js:17:19)
at processImmediate (internal/timers.js:441:21)
at process.topLevelDomainCallback (domain.js:126:23)
Exited with code 1
Your Environment details:
- testcafe version: 1.4.0
- node.js version: 12.8
- chrome version: 76.0
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 10
- Comments: 36 (7 by maintainers)
Like mentioned 12.8 and should work with latest, downgrading node version is not the solution in most of the cases.
Thank you for the information. We are looking into this.
+1 In my case it is happening locally too. As the test starts, the communication between the browser and TestCafé suddenly halts. Note that it is intermittent. I don’t know if this helps, but I can see that the heartbeat requisitions in the Network tab continuously returns 400 (Bad Request) It happens in all the browsers available in my case: Chrome, IE and Firefox.