Threads seem to lose connection sometimes
First of all: great job on this library :)
Every now and then I get the following errors:
cypress.32683 | [80:0228/164642.193174:ERROR:connection.cc(66)] X connection error received.
cypress.32683 | [400:0228/164642.193183:ERROR:connection.cc(66)] X connection error received.
cypress.32683 | [400:0228/164642.193180:ERROR:connection.cc(66)] X connection error received.
cypress.32683 | Gdk-Message: 16:46:42.236: Cypress: Fatal IO error 11 (Resource temporarily unavailable) on X server :99.
cypress.32683 |
cypress.32683 | Thread 1 likely finished with failure count: 0
cypress.32683 | error Command failed with exit code 1.
cypress.32683 | Thread 0 likely finished with failure count: 1
But when I check the mocha results or run again none of the tests should have failed
Cypress version: cypress/included:9.5.0 Running in: docker-compose Command:
yarn run cy:parallel \
--threads 2 \
--reporter mocha-junit-reporter \
--reporterOptions mochaFile="cypress/results/${1}/junit/outcome-[hash].xml" \
--args '"--browser chrome"' \
--verbose
Anything I can log or do to provide more information?
@edwinveldhuizen Can you confirm the OS where you are running these tcs ? I faced the similar issue while running it in linux machine.
@edwinveldhuizen Can you confirm the OS where you are running these tcs ? I faced the similar issue while running it in linux machine.
Yep, it’s on linux
Use 'xvfb-run -a; at the beginning of test scripts. it will work.
I think while running the tcs in parallel in same machine , all threads are using the same port for X11 server by default in linux , hence causing the issue . xvfb-run - a will help to auto assign the available ports to running thread. It is working for me and I hope it works for you as well.
You can refer to this link for more info : https://docs.cypress.io/guides/continuous-integration/introduction#Xvfb