mardi 30 août 2016

jenkins chromediver protactor issues

I am curently working in an angularjs project and I build tests with protractor. I would like to automate my tests with Jenkins. I wrote a little shell script to launch my tests and it works well from my terminal. But I have an issue when I try to launch the script from Jenkins. In the jenkins console I can see this error message :

Started by user anonymous
Building in workspace /var/lib/jenkins/workspace/test
[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Done
[test] $ /bin/sh -xe /tmp/hudson2254278298273314957.sh
+ sh /home/test/Desktop/jenkins.sh
[4mRunning "connect:server" (connect) task[24m
[4mRunning "protractor:chrome" (protractor) task[24m
Waiting forever...
Started connect web server on http://localhost:3001
Using ChromeDriver directly...
[launcher] Running 1 instances of WebDriver

waiting... 10 seconds

/home/test/workspace/frontend/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:108
      var template = new Error(this.message);
                     ^
    UnknownError: unknown error: Chrome failed to start: exited abnormally
      (Driver info: chromedriver=2.23.409687 (c46e862757edc04c06b1bd88724d15a5807b84d1),platform=Linux 4.4.0-21-generic x86_64)
        at new bot.Error (/home/test/workspace/frontend/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:108:18)
        at Object.bot.response.checkResponse (/home/test/workspace/frontend/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/response.js:109:9)
        at /home/test/workspace/frontend/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:160:24
        at [object Object].promise.ControlFlow.runInFrame_ (/home/test/workspace/frontend/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:1857:20)
        at [object Object].goog.defineClass.notify (/home/test/workspace/frontend/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:2448:25)
        at [object Object].promise.Promise.notify_ (/home/test/workspace/frontend/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:564:12)
        at Array.forEach (native)
        at [object Object].promise.Promise.notifyAll_ (/home/test/workspace/frontend/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:553:15)
        at goog.async.run.processWorkQueue (/home/test/workspace/frontend/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/async/run.js:130:15)
        at process._tickCallback (node.js:368:9)
    From: Task: WebDriver.createSession()
        at Function.webdriver.WebDriver.acquireSession_ (/home/test/workspace/frontend/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:157:22)
        at Function.webdriver.WebDriver.createSession (/home/test/workspace/frontend/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:131:30)
        at new Driver (/home/test/workspace/frontend/node_modules/protractor/node_modules/selenium-webdriver/chrome.js:810:36)
        at [object Object].DirectDriverProvider.getNewDriver (/home/test/workspace/frontend/node_modules/protractor/lib/driverProviders/direct.js:68:16)
        at [object Object].Runner.createBrowser (/home/test/workspace/frontend/node_modules/protractor/lib/runner.js:182:37)
        at /home/test/workspace/frontend/node_modules/protractor/lib/runner.js:263:21
        at _fulfilled (/home/test/workspace/frontend/node_modules/protractor/node_modules/q/q.js:797:54)
        at self.promiseDispatch.done (/home/test/workspace/frontend/node_modules/protractor/node_modules/q/q.js:826:30)
        at Promise.promise.promiseDispatch (/home/test/workspace/frontend/node_modules/protractor/node_modules/q/q.js:759:13)
        at /home/test/workspace/frontend/node_modules/protractor/node_modules/q/q.js:525:49
        at flush (/home/test/workspace/frontend/node_modules/protractor/node_modules/q/q.js:108:17)
        at nextTickCallbackWith0Args (node.js:419:9)
        at process._tickCallback (node.js:348:13)
        at Function.Module.runMain (module.js:444:11)
        at startup (node.js:136:18)
        at node.js:966:3
    [launcher] Process exited with error code 1
    [31m>> [39m
    [33mWarning: Tests failed, protractor exited with code: 1 [4mUsed --force, continuing.[24m[39m

    [31mDone, but with warnings.[39m
    Process leaked file descriptors. See http://ift.tt/1k6kBQ6 for more information
    Finished: SUCCESS

I am completely blocked because of this problem. Do you have any clue to solve this issue? Thank y'all!

Aucun commentaire:

Enregistrer un commentaire