未知错误:Chrome无法启动:退出异常,进程已退出,错误代码为199

时间:2018-01-24 10:16:51

标签: angular google-chrome protractor selenium-chromedriver

ENV: 节点:8.5.0; npm:5.3.0; 量角器:5.2.2; chromedriver:2.35.528139,谷歌浏览器63.0.3239.132 角:

├── @0.0.28
├── @angular/cli@1.6.3
├── UNMET PEER DEPENDENCY @angular/common@5.1.3
├── UNMET PEER DEPENDENCY @angular/compiler@5.1.3
├── @angular/compiler-cli@5.0.1
├── UNMET PEER DEPENDENCY @angular/core@5.1.3
├── @angular/forms@5.1.3
├── UNMET PEER DEPENDENCY @angular/http@5.1.3
├── @angular/platform-browser@5.1.3
├── @angular/platform-browser-dynamic@5.1.3
├── @angular/router@5.1.3
├── @angular/upgrade@5.1.3

os:linux 16.4,

下面的protractor.config.js

exports.config = {
  allScriptsTimeout: 11000,

  specs: [
    'e2e/**/*.js'
  ],

  capabilities: {
    'browserName': 'chrome'
  },

  directConnect: true,

  baseUrl: 'http://localhost:3000/',

  framework: 'jasmine2',
  onPrepare: function() {
      var jasmineReporters = require('jasmine-reporters');
      // If we are running via circleci, then use the CIRCLE_TEST_REPORTS output directory. 
      var outputDir = "test/test_out";
      if (process.env.CIRCLE_TEST_REPORTS) {
        outputDir = process.env.CIRCLE_TEST_REPORTS;
      }

      console.log("Logging Protractor JUnit output to " + outputDir);

      jasmine.getEnv().addReporter(new jasmineReporters.JUnitXmlReporter({
          consolidateAll: true,
          savePath: outputDir,
          filePrefix: 'protractor-xmloutput'
      }));
  },

  jasmineNodeOpts: {
    defaultTimeoutInterval: 30000
  }

};

错误

[09:47:20] E/launcher - unknown error: Chrome failed to start: exited abnormally
  (Driver info: chromedriver=2.35.528139 (70eb799287ce4c2208441fc057053a5b07ceabac),platform=Linux 4.4.0-36-generic x86_64)
[09:47:20] E/launcher - WebDriverError: unknown error: Chrome failed to start: exited abnormally
  (Driver info: chromedriver=2.35.528139 (70eb799287ce4c2208441fc057053a5b07ceabac),platform=Linux 4.4.0-36-generic x86_64)
    at Object.checkLegacyResponse (/var/lib/postgresql/carepilot-web/node_modules/selenium-webdriver/lib/error.js:505:15)
    at parseHttpResponse (/var/lib/postgresql/carepilot-web/node_modules/selenium-webdriver/lib/http.js:509:13)
    at doSend.then.response (/var/lib/postgresql/carepilot-web/node_modules/selenium-webdriver/lib/http.js:440:13)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
From: Task: WebDriver.createSession()
    at Function.createSession (/var/lib/postgresql/carepilot-web/node_modules/selenium-webdriver/lib/webdriver.js:777:24)
    at Function.createSession (/var/lib/postgresql/carepilot-web/node_modules/selenium-webdriver/chrome.js:709:29)
    at Direct.getNewDriver (/var/lib/postgresql/carepilot-web/node_modules/protractor/lib/driverProviders/direct.ts:90:25)
    at Runner.createBrowser (/var/lib/postgresql/carepilot-web/node_modules/protractor/lib/runner.ts:187:39)
    at driverprovider_.setupEnv.then (/var/lib/postgresql/carepilot-web/node_modules/protractor/lib/runner.ts:279:27)
    at _fulfilled (/var/lib/postgresql/carepilot-web/node_modules/protractor/node_modules/q/q.js:834:54)
    at self.promiseDispatch.done (/var/lib/postgresql/carepilot-web/node_modules/protractor/node_modules/q/q.js:863:30)
    at Promise.promise.promiseDispatch (/var/lib/postgresql/carepilot-web/node_modules/protractor/node_modules/q/q.js:796:13)
    at /var/lib/postgresql/carepilot-web/node_modules/protractor/node_modules/q/q.js:556:49
    at runSingle (/var/lib/postgresql/carepilot-web/node_modules/protractor/node_modules/q/q.js:137:13)
[09:47:20] E/launcher - Process exited with error code 199

我在本地运行命令node_modules / .bin / protractor test / e2e / ui_test / protractor_conf_chrome / protractor.conf.js,没关系,但是当我运行远程环境时它会抛出错误;我运行chromedrive和chrome manully,它们正在工作,但是chromdrive开始镀铬错误。 怎么回事?任何人都可以给出一些建议吗?非常感谢! enter image description here

0 个答案:

没有答案