question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

E/launcher - Server terminated early with status 1

See original GitHub issue

Bug report

  • Node Version: 8.1.3
  • Protractor Version: 5.1.2
  • Angular Version: 4.2.6
  • Browser(s): Chrome 59.0.3071.115 (Official Build) (64-bit)
  • Operating System and Version Windows 10 Pro x64
  • Your protractor configuration file
// https://github.com/angular/protractor/blob/master/lib/config.ts

const { SpecReporter } = require('jasmine-spec-reporter');

exports.config = {
  allScriptsTimeout: 11000,
  specs: [
    './e2e/**/*.e2e-spec.ts'
  ],
  capabilities: {
    'browserName': 'chrome'
  },
  directConnect: true,
  framework: 'jasmine',
  jasmineNodeOpts: {
    showColors: true,
    defaultTimeoutInterval: 30000,
    print: function () {
    }
  },
  onPrepare() {
    require('ts-node').register({
      project: 'e2e/tsconfig.e2e.json'
    });
    jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
  }
};
  • A relevant example test
import { browser, element, by } from 'protractor';

export class HomePage {
  navigateTo() {
    return browser.get('/');
  }

  getParagraphTitle() {
    return element(by.css('phx-app h1')).getText();
  }

  getParagraphText() {
    return element(by.css('phx-app p')).getText();
  }
}
import { HomePage } from './app.po';

describe('Phenomenex Home Page', () => {
  let page: HomePage;

  beforeEach(() => {
    page = new HomePage();
  });

  it('h1 tag', () => {
    page.navigateTo();
    expect(page.getParagraphTitle()).toEqual(<any>'This is an example header');
  });

  it('p tag', () => {
    page.navigateTo();
    expect(page.getParagraphText()).toEqual(<any>'This example is a quick exercise to illustrate how the default, static and fixed to top navbar work. It includes the responsive CSS and HTML, so it also adapts to your viewport and device.');
  }); 

});
  • Output from running the test
H:\d>npm run e2e

> d@0.0.0 pree2e H:\d
> webdriver-manager update --versions.chrome=2.24

[09:01:02] I/update - chromedriver: file exists H:\d\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver_2.24.zip
[09:01:02] I/update - chromedriver: unzipping chromedriver_2.24.zip
[09:01:03] I/update - chromedriver: chromedriver_2.24.exe up to date
[09:01:03] I/update - selenium standalone: file exists H:\d\node_modules\protractor\node_modules\webdriver-manager\selenium\selenium-server-standalone-3.4.0.jar
[09:01:03] I/update - selenium standalone: selenium-server-standalone-3.4.0.jar up to date
[09:01:03] I/update - geckodriver: file exists H:\d\node_modules\protractor\node_modules\webdriver-manager\selenium\geckodriver-v0.18.0.zip
[09:01:03] I/update - geckodriver: unzipping geckodriver-v0.18.0.zip
[09:01:04] I/update - geckodriver: geckodriver-v0.18.0.exe up to date

> d@0.0.0 e2e H:\d
> protractor ./protractor.conf.js

(node:17812) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[09:01:15] I/launcher - Running 1 instances of WebDriver
[09:01:15] I/direct - Using ChromeDriver directly...
[09:01:16] E/launcher - Server terminated early with status 1
[09:01:16] E/launcher - Error: Server terminated early with status 1
    at earlyTermination.catch.e (H:\d\node_modules\selenium-webdriver\remote\index.js:252:52)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:169:7)
From: Task: WebDriver.createSession()
    at Function.createSession (H:\d\node_modules\selenium-webdriver\lib\webdriver.js:777:24)
    at Function.createSession (H:\d\node_modules\selenium-webdriver\chrome.js:709:29)
    at Direct.getNewDriver (H:\d\node_modules\protractor\built\driverProviders\direct.js:77:33)
    at Runner.createBrowser (H:\d\node_modules\protractor\built\runner.js:195:43)
    at q.then.then (H:\d\node_modules\protractor\built\runner.js:339:29)
    at _fulfilled (H:\d\node_modules\protractor\node_modules\q\q.js:834:54)
    at self.promiseDispatch.done (H:\d\node_modules\protractor\node_modules\q\q.js:863:30)
    at Promise.promise.promiseDispatch (H:\d\node_modules\protractor\node_modules\q\q.js:796:13)
    at H:\d\node_modules\protractor\node_modules\q\q.js:556:49
    at runSingle (H:\d\node_modules\protractor\node_modules\q\q.js:137:13)
[09:01:16] E/launcher - Process exited with error code 199
npm ERR! code ELIFECYCLE
npm ERR! errno 199
npm ERR! d@0.0.0 e2e: `protractor ./protractor.conf.js`
npm ERR! Exit status 199
npm ERR!
npm ERR! Failed at the d@0.0.0 e2e script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\ChrisR\AppData\Roaming\npm-cache\_logs\2017-07-13T16_01_17_788Z-debug.log
  • Steps to reproduce the bug
npm i -g @angular/cli
ng new t
cd t
ng e2e

I am behind a firewall if that matters, running on localhost.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

22reactions
rakeshnambiarcommented, Jun 28, 2019

@wswebcreation can you give a try with directConnect: true in the protractor.conf.js

0reactions
wendellpereiracommented, Jul 1, 2019

@rakeshnambiar , it worked for me. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error "Server terminated early with status 1" after try perform ...
I solved my problem uninstalling chromedriver package using npm uninstall -g chromedriver and installed again using npm install -g ...
Read more >
Protractor fails in jenkins - Google Groups
[17:01:41] I/launcher - Running 1 instances of WebDriver [17:01:41] E/launcher - Server terminated early with status 1 [17:01:41] E/launcher ...
Read more >
Is it possible to run uiveri5 in BAS? - SAP Community
E/launcher - Server terminated early with status 127. E/launcher - Error: Server terminated early with status 127.
Read more >
angular/protractor - Gitter
[13:58:26] I/local - Starting selenium standalone server... [13:58:26] E/launcher - Error: Error: Server terminated early with status 1 at Error (native)
Read more >
WebDriver.createSession Error in Protractor after Chrome ...
We run our protractor tests in Chrome instance via xvfb server. ... [00:07:03] E/launcher - Server terminated early with status 1 [00:07:03] ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found