Error: self signed certificate in certificate chain

百般思念 提交于 2020-01-03 04:13:45

问题


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)

回答1:


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



来源:https://stackoverflow.com/questions/43194545/error-self-signed-certificate-in-certificate-chain

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!