Protractor (Chrome) tests sometimes stalling, blank page when viewed via X VNC


#1

We’ve started using CircleCI v2. We run Protractor E2E tests, which use Selenium (WebDriver) connecting to Chrome.

On CircleCI, our tests stall after the first scenario, eventually failing with a timeout:
https://circleci.com/gh/ltnetwork/digitalstack/2711

However, on one run, the tests passed:
https://circleci.com/gh/ltnetwork/digitalstack/2709

Note that build 2711 is a re-run of 2709! So, no code changes on our end.

I have modified our build to start an X VNC server, as per the instructions for CircleCI v1. When I view the X window via VNC, I can see the browser document appears blank. This was the case in both passing and failing builds. Sometimes, during a stalled build, clicking on the window itself will make the tests “un-stall” and continue to run. I can also open a new tab and access the application normally.

I have also tried logging in via SSH and running our E2E script manually, this worked fine with all tests passing.

Any idea what could cause this issue? Could it be that something is not initializing in time for the tests?


#2

Okay, I think I have a solution. Everything seems to run okay by doing the following:

  • install dbus-x11 as part of the build
  • Pass the “–disable-gpu” arg to Chrome (via our Protractor configuration)

Would the root cause be some difference in the Docker images provided by CircleCI between v1 and v2?


#3

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.