未知错误:Chrome无法启动:异常退出(驱动程序信息:chromedriver = 2.9 [英] unknown error: Chrome failed to start: exited abnormally (Driver info: chromedriver=2.9

查看:132
本文介绍了未知错误:Chrome无法启动:异常退出(驱动程序信息:chromedriver = 2.9的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Debian 7上运行Selenium测试,但没有成功.

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

错误是:

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

我有 chromedriver 29 chrome 34.0.1847.76 beta ,它在 Debian 7 32位上运行.我正在使用 selenium-java 2.33.0

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

遵循此链接 chromedriver 29 chrome 34 .而且无论如何,由于glibc版本,以前的版本无法在Debian 7上运行……

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

[更新1]

我尝试使用 java 7 java 6 仍然是相同的问题. 也许我应该尝试使用Java 8 ^^

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

[更新2]

我正在使用此命令测试chrome驱动程序,以确保jenkins不会出现此问题:

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\n  (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.

谢谢

推荐答案

我终于设法在笔记本电脑(服务器)上启动Chrome驱动程序来进行Selenium测试.

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

重要的一点是使用Xvfb.不要问我为什么,但是一旦您接受了这个事实,请按照以下步骤操作(比@Anon回答更详细)

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)

  • 在您的Jenkins设置中添加全局属性

  • In you Jenkins settings add a global property

key : DISPLAY
value:0:0

  • 在您的服务器上,在后台启动Xvfb:

     Xvfb :0 -ac -screen 0 1024x768x24 &
    

  • 这篇关于未知错误:Chrome无法启动:异常退出(驱动程序信息:chromedriver = 2.9的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    相关文章
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆