trion-development / docker-ng-cli-e2e

Angular end2end tests inside docker
MIT License
24 stars 11 forks source link

ng e2e earlyTermination error in bitbucket pipeline #1

Closed slav-pilus closed 7 years ago

slav-pilus commented 7 years ago

I'm using this docker image as part of my bitbucket pipeline build. All steps (npm install, ng lint, ng test) are working fine but during ng e2e I'm getting the following:

  • ng e2e NG Live Development Server is listening on localhost:49152, open your browser on http://localhost:49152 Hash: e430f7f504f5f4f0bdf5 Time: 27710ms chunk {0} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 282 kB {4} [initial] [rendered] chunk {1} main.bundle.js, main.bundle.js.map (main) 230 kB {3} [initial] [rendered] chunk {2} styles.bundle.js, styles.bundle.js.map (styles) 366 kB {4} [initial] [rendered] chunk {3} vendor.bundle.js, vendor.bundle.js.map (vendor) 4.23 MB [initial] [rendered] chunk {4} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered] webpack: Compiled successfully. [21:18:11] I/file_manager - creating folder /opt/atlassian/pipelines/agent/build/node_modules/protractor/node_modules/webdriver-manager/selenium [21:18:11] I/update - chromedriver: unzipping chromedriver_2.30.zip [21:18:12] I/update - chromedriver: setting permissions to 0755 for /opt/atlassian/pipelines/agent/build/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.30 [21:18:12] I/launcher - Running 1 instances of WebDriver [21:18:12] I/direct - Using ChromeDriver directly... [21:18:12] E/launcher - Server terminated early with status 127 [21:18:12] E/launcher - Error: Server terminated early with status 127 at Error (native) at earlyTermination.catch.e (/opt/atlassian/pipelines/agent/build/node_modules/selenium-webdriver/remote/index.js:252:52) at process._tickCallback (internal/process/next_tick.js:109:7) From: Task: WebDriver.createSession() at Function.createSession (/opt/atlassian/pipelines/agent/build/node_modules/selenium-webdriver/lib/webdriver.js:777:24) at Function.createSession (/opt/atlassian/pipelines/agent/build/node_modules/selenium-webdriver/chrome.js:709:29) at Direct.getNewDriver (/opt/atlassian/pipelines/agent/build/node_modules/protractor/lib/driverProviders/direct.ts:90:25) at Runner.createBrowser (/opt/atlassian/pipelines/agent/build/node_modules/protractor/lib/runner.ts:225:39) at q.then.then (/opt/atlassian/pipelines/agent/build/node_modules/protractor/lib/runner.ts:391:27) at _fulfilled (/opt/atlassian/pipelines/agent/build/node_modules/protractor/node_modules/q/q.js:834:54) at self.promiseDispatch.done (/opt/atlassian/pipelines/agent/build/node_modules/protractor/node_modules/q/q.js:863:30) at Promise.promise.promiseDispatch (/opt/atlassian/pipelines/agent/build/node_modules/protractor/node_modules/q/q.js:796:13) at ./node_modules/protractor/node_modules/q/q.js:556:49 at runSingle (/opt/atlassian/pipelines/agent/build/node_modules/protractor/node_modules/q/q.js:137:13) at flush (/opt/atlassian/pipelines/agent/build/node_modules/protractor/node_modules/q/q.js:125:13) at _combinedTickCallback (internal/process/next_tick.js:73:7) at process._tickCallback (internal/process/next_tick.js:104:9) [21:18:12] E/launcher - Process exited with error code 199

am I missing any config or there is a bug in current version?

everflux commented 7 years ago

Thank you for reporting the issue, I will look into it. Can you provide an example of the build configuration for bitbucket ci?

slav-pilus commented 7 years ago

here is the content of the bitbucket-pipelines.yml file:

image: trion/ng-cli-e2e

pipelines: default:

  • step: caches:
    • node script: # Modify the commands below to build your repository.
    • npm install
    • ng build
    • ng lint
    • ng test --browsers Chrome_no_sandbox -w false
    • ng e2e

as said before only the last step fails

everflux commented 7 years ago

Thanks, I can reproduce the issue. Reason is that webdriver picks the wrong launcher that does not include the required framebuffer driven X11.

slav-pilus commented 7 years ago

OK, how can we make it to pick the correct launcher?

everflux commented 7 years ago

I discovered that the latest protractor needs Chrome 59 while the base distribution used for this image only provides Chrome 58. I keep working on it. Sorry for the inconvenience and thanks a lot for bringing it up.

everflux commented 7 years ago

Should be fixed in trion/ng-cli-e2e:1.2.0 and :latest, would be great if you could verify it.

slav-pilus commented 7 years ago

it is working now many thanks for sorting this out