Hi,

I am getting "cannot find Chrome binary" when running step of a pipeline 
which runs protractor e2e test. Below is the full error log.

When running the same command at command prompt under the jenkins workspace 
folder, it works fine. 

I have google-chrome installed at /usr/bin/. Any idea how to resolve this 
problem?

[Pipeline] }[Pipeline] // stage[Pipeline] stage[Pipeline] { (test)[Pipeline] sh

[e2e_master-3KI5EHQHBLITI5WIC2ZWJEWJP35AENTM5ILI6HE62TNWQ7BRRVRA] Running shell 
script
+ ./ng e2e

** NG Live Development Server is listening on localhost:49152, open your 
browser on http://localhost:49152/ **

 [0mDate:  [1m [37m2018-05-04T03:25:34.067Z [39m [22m [0m
 [0mHash:  [1m [37m07a7011210f50a1406eb [39m [22m [0m
 [0mTime:  [1m [37m12224 [39m [22mms [0m
 [0mchunk { [1m [33minline [39m [22m}  [1m [32minline.bundle.js, 
inline.bundle.js.map [39m [22m (inline) 3.89 kB  [1m [33m[entry] [39m [22m [1m 
[32m [rendered] [39m [22m [0m
 [0mchunk { [1m [33mmain [39m [22m}  [1m [32mmain.bundle.js, main.bundle.js.map 
[39m [22m (main) 8.15 kB  [1m [33m[initial] [39m [22m [1m [32m [rendered] [39m 
[22m [0m
 [0mchunk { [1m [33mpolyfills [39m [22m}  [1m [32mpolyfills.bundle.js, 
polyfills.bundle.js.map [39m [22m (polyfills) 204 kB  [1m [33m[initial] [39m 
[22m [1m [32m [rendered] [39m [22m [0m
 [0mchunk { [1m [33mstyles [39m [22m}  [1m [32mstyles.bundle.js, 
styles.bundle.js.map [39m [22m (styles) 14.5 kB  [1m [33m[initial] [39m [22m 
[1m [32m [rendered] [39m [22m [0m
 [0mchunk { [1m [33mvendor [39m [22m}  [1m [32mvendor.bundle.js, 
vendor.bundle.js.map [39m [22m (vendor) 2.76 MB  [1m [33m[initial] [39m [22m 
[1m [32m [rendered] [39m [22m [0m
(node:482) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use 
os.tmpdir() instead.

webpack: Compiled successfully.
[03:25:34] I/file_manager - creating folder 
/var/jenkins_home/workspace/e2e_master-3KI5EHQHBLITI5WIC2ZWJEWJP35AENTM5ILI6HE62TNWQ7BRRVRA/node_modules/protractor/node_modules/webdriver-manager/selenium
[03:25:34] I/update - chromedriver: unzipping chromedriver_2.38.zip
[03:25:35] I/update - chromedriver: setting permissions to 0755 for 
/var/jenkins_home/workspace/e2e_master-3KI5EHQHBLITI5WIC2ZWJEWJP35AENTM5ILI6HE62TNWQ7BRRVRA/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.38
[03:25:35] I/launcher - Running 1 instances of WebDriver
[03:25:35] I/direct - Using ChromeDriver directly...
[03:25:36] E/launcher - unknown error: cannot find Chrome binary
  (Driver info: chromedriver=2.38.552522 
(437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 4.10.0-42-generic 
x86_64)
[03:25:36] E/launcher - WebDriverError: unknown error: cannot find Chrome binary
  (Driver info: chromedriver=2.38.552522 
(437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Linux 4.10.0-42-generic 
x86_64)
    at Object.checkLegacyResponse 
(/var/jenkins_home/workspace/e2e_master-3KI5EHQHBLITI5WIC2ZWJEWJP35AENTM5ILI6HE62TNWQ7BRRVRA/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:546:15)
    at parseHttpResponse 
(/var/jenkins_home/workspace/e2e_master-3KI5EHQHBLITI5WIC2ZWJEWJP35AENTM5ILI6HE62TNWQ7BRRVRA/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:509:13)
    at doSend.then.response 
(/var/jenkins_home/workspace/e2e_master-3KI5EHQHBLITI5WIC2ZWJEWJP35AENTM5ILI6HE62TNWQ7BRRVRA/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:441:30)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
From: Task: WebDriver.createSession()
    at Function.createSession 
(/var/jenkins_home/workspace/e2e_master-3KI5EHQHBLITI5WIC2ZWJEWJP35AENTM5ILI6HE62TNWQ7BRRVRA/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:769:24)
    at Function.createSession 
(/var/jenkins_home/workspace/e2e_master-3KI5EHQHBLITI5WIC2ZWJEWJP35AENTM5ILI6HE62TNWQ7BRRVRA/node_modules/protractor/node_modules/selenium-webdriver/chrome.js:761:15)
    at Direct.getNewDriver 
(/var/jenkins_home/workspace/e2e_master-3KI5EHQHBLITI5WIC2ZWJEWJP35AENTM5ILI6HE62TNWQ7BRRVRA/node_modules/protractor/built/driverProviders/direct.js:77:33)
    at Runner.createBrowser 
(/var/jenkins_home/workspace/e2e_master-3KI5EHQHBLITI5WIC2ZWJEWJP35AENTM5ILI6HE62TNWQ7BRRVRA/node_modules/protractor/built/runner.js:195:43)
    at q.then.then 
(/var/jenkins_home/workspace/e2e_master-3KI5EHQHBLITI5WIC2ZWJEWJP35AENTM5ILI6HE62TNWQ7BRRVRA/node_modules/protractor/built/runner.js:339:29)
    at _fulfilled 
(/var/jenkins_home/workspace/e2e_master-3KI5EHQHBLITI5WIC2ZWJEWJP35AENTM5ILI6HE62TNWQ7BRRVRA/node_modules/q/q.js:834:54)
    at self.promiseDispatch.done 
(/var/jenkins_home/workspace/e2e_master-3KI5EHQHBLITI5WIC2ZWJEWJP35AENTM5ILI6HE62TNWQ7BRRVRA/node_modules/q/q.js:863:30)
    at Promise.promise.promiseDispatch 
(/var/jenkins_home/workspace/e2e_master-3KI5EHQHBLITI5WIC2ZWJEWJP35AENTM5ILI6HE62TNWQ7BRRVRA/node_modules/q/q.js:796:13)
    at 
/var/jenkins_home/workspace/e2e_master-3KI5EHQHBLITI5WIC2ZWJEWJP35AENTM5ILI6HE62TNWQ7BRRVRA/node_modules/q/q.js:556:49
    at runSingle 
(/var/jenkins_home/workspace/e2e_master-3KI5EHQHBLITI5WIC2ZWJEWJP35AENTM5ILI6HE62TNWQ7BRRVRA/node_modules/q/q.js:137:13)
    at flush 
(/var/jenkins_home/workspace/e2e_master-3KI5EHQHBLITI5WIC2ZWJEWJP35AENTM5ILI6HE62TNWQ7BRRVRA/node_modules/q/q.js:125:13)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)
[03:25:36] E/launcher - Process exited with error code 199

[Pipeline] }[Pipeline] // stage

[Pipeline] }$ docker stop --time=1 
4b77d2abf9d3806521b8bcc59467b2e4bf3b0bdb13d8acd64c375c3aa826cf00
$ docker rm -f 
4b77d2abf9d3806521b8bcc59467b2e4bf3b0bdb13d8acd64c375c3aa826cf00[Pipeline] // 
withDockerContainer[Pipeline] }[Pipeline] // withEnv[Pipeline] }[Pipeline] // 
node[Pipeline] End of Pipeline



*When running ./ng e2e at command prompt:*

root@3c69d3959e7b:/var/jenkins_home/workspace/e2e_master-3KI5EHQHBLITI5WIC2ZWJEWJP35AENTM5ILI6HE62TNWQ7BRRVRA#
 
./ng e2e
** NG Live Development Server is listening on localhost:49152, open your 
browser on http://localhost:49152/ **
Date: 2018-05-04T03:28:53.309Z
Hash: 07a7011210f50a1406eb
Time: 9747ms
chunk {inline} inline.bundle.js, inline.bundle.js.map (inline) 3.89 kB 
[entry] [rendered]
chunk {main} main.bundle.js, main.bundle.js.map (main) 8.15 kB [initial] 
[rendered]
chunk {polyfills} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 
204 kB [initial] [rendered]
chunk {styles} styles.bundle.js, styles.bundle.js.map (styles) 14.5 kB 
[initial] [rendered]
chunk {vendor} vendor.bundle.js, vendor.bundle.js.map (vendor) 2.76 MB 
[initial] [rendered]
(node:487) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use 
os.tmpdir() instead.

webpack: Compiled successfully.
[03:28:54] I/update - chromedriver: file exists 
/var/jenkins_home/workspace/e2e_master-3KI5EHQHBLITI5WIC2ZWJEWJP35AENTM5ILI6HE62TNWQ7BRRVRA/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.38.zip
[03:28:54] I/update - chromedriver: unzipping chromedriver_2.38.zip
[03:28:54] I/update - chromedriver: setting permissions to 0755 for 
/var/jenkins_home/workspace/e2e_master-3KI5EHQHBLITI5WIC2ZWJEWJP35AENTM5ILI6HE62TNWQ7BRRVRA/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.38
[03:28:54] I/update - chromedriver: chromedriver_2.38 up to date
[03:28:54] I/launcher - Running 1 instances of WebDriver
[03:28:54] I/direct - Using ChromeDriver directly...
Jasmine started

  ui App
    ✓ should display welcome message

Executed 1 of 1 spec SUCCESS in 2 secs.
[03:29:10] I/launcher - 0 instance(s) of WebDriver still running
[03:29:10] I/launcher - chrome #01 passed



Regards,
Nick Wong

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/07cdbd3e-fac7-446f-98aa-bacd55678e3a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to