Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.5k views
in Technique[技术] by (71.8m points)

selenium - unknown error: Chrome failed to start: exited abnormally (Driver info: chromedriver=2.9

I am trying to run Selenium tests on Debian 7 but without success.

The error is:

unknown error: Chrome failed to start: exited abnormally   (Driver info: chromedriver=2.9.248316,platform=Linux 3.2.0-4-686-pae x86) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 60.55 seconds Build info: version: '2.33.0', revision: '4ecaf82108b2a6cc6f006aae81961236eba93358', time: '2013-05-22 12:00:17' System info: os.name: 'Linux', os.arch: 'i386', os.version: '3.2.0-4-686-pae', java.version: '1.7.0_25' Driver info: org.openqa.selenium.chrome.ChromeDriver

I have chromedriver 29 with chrome 34.0.1847.76 beta running on Debian 7 32 bits. I am using selenium-java 2.33.0

Following this link, chromedriver 29 is the right version for chrome 34. And anyway, previous versions do not work on Debian 7 because of glibc version …

----------ChromeDriver v2.9 (2014-01-31)----------
Supports Chrome v31-34

[update 1]

I tried with with both java 7 and java 6, still the same problem. May be I should try with java 8 ^^

[update 2]

I am using this command to test the chrome driver, to make sure that is not an issue with jenkins:

curl -X POST -H "Content-Type: application/json; charset=utf-8" -d "{"desiredCapabilities":{"platform":"ANY","browserName":"chrome","chromeOptions":{"args":[],"extensions":[]},"version":"","chrome.switches":[]}}" localhost:12495/session

I am getting the same error message:

{"sessionId":"210f3f837a798ee68cd91f089976d0c2","status":13,"value":{"message":"unknown error: Chrome failed to start: exited abnormally
  (Driver info: chromedriver=2.9.248316,platform=Linux 3.2.0-4-686-pae x86)"}}

Any help to know what is going on would be appreciated.

Thanks

Question&Answers:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I finally managed to get Selenium tests starting the Chrome Driver on my laptop (server).

The important bit is to use Xvfb. Don't ask me why but once you accept this fact follow these steps (more detailed than @Anon answer)

  • In you Jenkins settings add a global property

    key : DISPLAY
    value:0:0
    
  • On your server start Xvfb in the background:

     Xvfb :0 -ac -screen 0 1024x768x24 &
    

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...