错误:证书链中的自签名证书 [英] Error: self signed certificate in certificate chain
问题描述
我可以在重新启动 Windows 7 的情况下运行 selenium 服务器.但是,如果我终止服务器并重新启动它,我将收到此错误.有时执行 webdriver-manager update--ignore_ssl
可能会解决问题,但大多数时候它不会解决.有什么想法吗?
我在 Windows 7 x64 上运行它.
C:\Users\...>webdriver-manager start --ignore_ssl事件.js:163扔er;//未处理的错误"事件^错误:证书链中的自签名证书在 TLSSocket.<匿名>(_tls_wrap.js:1084:38)在emitNone (events.js:86:13)在 TLSSocket.emit (events.js:188:7)在 TLSSocket._finishInit (_tls_wrap.js:606:8)在 TLSWrap.ssl.onhandshakedone (_tls_wrap.js:436:38)
大多数时候在 webdriver-manager 更新期间清除缓存并忽略 ssl 可以解决问题
npm 缓存清理网络驱动程序管理器更新 --ignore_ssl
就我而言,我通过在项目中本地更新 webdriver manage 并启动独立服务器来解决
<块引用>package.json
脚本":{"webdrivermanager:update": "节点 node_modules/protractor/bin/webdriver-manager update --versions.standalone=3.2.0 --ignore_ssl","webdrivermanager:clean": "节点 node_modules/protractor/bin/webdriver-manager clean","install": "npm run webdrivermanager:clean && npm run webdrivermanager:update"}
<块引用>
量角器配置文件
seleniumServerJar: 'node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.2.0.jar',
npm install 第一次和每次需要更新你的 webdriver-manager 只需发出命令 protractor protractor.conf.js
I can run the selenium server with fresh rebooting of my Windows 7. However if I kill the server and start it again, I will get this error. Sometimes doing webdriver-manager update--ignore_ssl
may fix the problem, but most of time it won't fix. Any idea?
I am running it on Windows 7 x64.
C:\Users\...> webdriver-manager start --ignore_ssl
events.js:163
throw er; // Unhandled 'error' event
^
Error: self signed certificate in certificate chain
at TLSSocket.<anonymous> (_tls_wrap.js:1084:38)
at emitNone (events.js:86:13)
at TLSSocket.emit (events.js:188:7)
at TLSSocket._finishInit (_tls_wrap.js:606:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:436:38)
Most of the time clearing cache and ignoring ssl during webdriver-manager update would solve the problem
npm cache clean
webdriver-manager update --ignore_ssl
In my case I resolved by updating webdriver manage locally in the project and starting standalone server
package.json
"scripts": {
"webdrivermanager:update": "node node_modules/protractor/bin/webdriver-manager update --versions.standalone=3.2.0 --ignore_ssl",
"webdrivermanager:clean": "node node_modules/protractor/bin/webdriver-manager clean",
"install": "npm run webdrivermanager:clean && npm run webdrivermanager:update"
}
protractor configuration file
seleniumServerJar: 'node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.2.0.jar',
npm install update your webdriver-manager first time and everytime you need just issue the command protractor protractor.conf.js
这篇关于错误:证书链中的自签名证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!