gpt4 book ai didi

electron - 错误: ChromeDriver did not start within 5000ms

转载 作者:行者123 更新时间:2023-12-02 21:37:54 28 4
gpt4 key购买 nike

我遇到错误

Error: ChromeDriver did not start within 5000ms

在我的特定 GitLab CE 运行器上,尝试使用 Spectron 测试 Electron 应用程序时。

错误堆栈是:

1) Test Example "before each" hook for "opens a window":
Error: ChromeDriver did not start within 5000ms
at Error (native)
at node_modules/spectron/lib/chrome-driver.js:63:25
at Request._callback (node_modules/spectron/lib/chrome-driver.js:120:23)
at self.callback (node_modules/request/request.js:186:22)
at Request.onRequestError (node_modules/request/request.js:845:8)
at Socket.socketErrorListener (_http_client.js:310:9)
at emitErrorNT (net.js:1278:8)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickDomainCallback (internal/process/next_tick.js:122:9)

2) Test Example "after each" hook for "opens a window":
Error: Application not running
at Error (native)
at Application.stop (node_modules/spectron/lib/application.js:56:48)
at Context.<anonymous> (test/startup/title-test.js:33:20)

我之前的脚本是:

before_script:
- export APT_CACHE_DIR=`pwd`/apt-cache && mkdir -pv $APT_CACHE_DIR
- set -xe
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
- echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list
- apt-get update -yqqq && apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -y google-chrome-stable xvfb
- chmod 0777 ./node_modules/.bin/mocha
- export {no_proxy,NO_PROXY}="127.0.0.1"
- apt-get install xvfb libxtst6 libxss1 libgtk2.0-0 -y
- apt-get install libnss3 libasound2 libgconf-2-4 -y

它与之前的 Runner 工作相同,但添加了 - export {no_proxy,NO_PROXY}="127.0.0.1" 因为这是一种解决方案(但对我不起作用)。

我可以做什么来改变这个?

最佳答案

我刚刚删除了那个运行者并开始了新的运行者。 New Runner 在启动时下载了 Spectron 和 ChromeDriver,并且 Chrome 可以正常工作。

关于electron - 错误: ChromeDriver did not start within 5000ms,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41553381/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com