You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

在CentOS上运行Protractor脚本时遇WebDriverError: No System TLS问题求助

Fixing the "No System TLS" Error with Protractor 5.3.1 + Node v6.14.1 on CentOS

Hey there, I’ve dealt with this exact error before when working with older Node.js versions on CentOS systems. The root cause is that Node v6.x is extremely outdated (it’s been end-of-life for years) and has limited support for modern system TLS libraries, which clashes with the Selenium WebDriver version that Protractor 5.3.1 depends on. Here are a few proven solutions:

The best long-term fix is to move to a supported Node.js LTS version. Protractor 5.3.1 works well with Node v10.x to v12.x—here’s how to make the switch:

  • Uninstall the old Node.js and npm first:
    sudo yum remove nodejs npm -y
    
  • Use nvm (Node Version Manager) to install a compatible version (let’s go with v10.24.1, a stable LTS):
    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
    source ~/.bashrc
    nvm install 10.24.1
    nvm use 10.24.1
    
  • Reinstall Protractor and update WebDriver:
    npm install -g protractor@5.3.1
    webdriver-manager update
    

2. Force WebDriver to Use Node’s Built-in TLS (Temporary Workaround)

If you can’t upgrade Node right now, you can tweak your Protractor config to bypass system TLS checks and use Node’s internal TLS implementation instead. Note: This disables some security safeguards, so only use this in a test environment.

  • Open your protractor.conf.js file and modify the capabilities and onPrepare sections:
    exports.config = {
      // Your existing config settings...
      capabilities: {
        browserName: 'chrome',
        chromeOptions: {
          args: ['--ignore-certificate-errors', '--disable-web-security']
        }
      },
      onPrepare: function() {
        // Disable TLS rejection checks for the session
        process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
      }
    };
    

3. Update System TLS Libraries

Sometimes the issue stems from an outdated OpenSSL or NSS library on CentOS. Try updating these components:

sudo yum update openssl -y
sudo yum install nss nss-tools -y

After updating, restart your terminal and re-run your Protractor script.


Quick bonus fix: If none of the above work, try downgrading the Selenium WebDriver version to one that’s fully compatible with Node v6.x. Run this in your project directory:

npm install selenium-webdriver@3.6.0 --save-dev

内容的提问来源于stack exchange,提问作者praveena sri

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.22 09:23:42