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.

Protractor doesn't find webdriver's firefox driver automatically when running local tests.

See original GitHub issue

Description: protractor doesn’t find firefox driver automatically when running local tests. The file https://github.com/angular/protractor/blob/5.3.0/lib/config.ts does say for “geckoDriver” the following:

geckoDriver location is used to help find the gecko binary. This will be passed to the Selenium jar as the system property webdriver.gecko.driver. If the value is not set when launchinglocally, it will use the default values downloaded from webdriver-manager.

So I think my small/basic example should work on firefox as well; in chrome (see output below) it does work automatically and both browser drivers are present in (…)\node_modules\protractor\node_modules\webdriver-manager\selenium

If it is not supposed to work like that then the https://github.com/angular/protractor/blob/5.3.0/lib/config.ts comment needs to be fixed/enhanced for firefox.


  • Node Version: v8.9.4
  • Protractor Version: 5.3.0
  • Angular Version: 1 (using your sample from http://www.protractortest.org/testapp/ng1)
  • Browser(s): firefox
  • Operating System and Version: Windows 10
  • Protractor configuration file:
exports.config = {

	specs : [ "geckoDriverBug_spec.js" ],
	rootElement : 'html',
	maxSessions: 1,
	multiCapabilities : [ { browserName : 'firefox' }, { browserName : 'chrome' } ]

};
  • A relevant example test; file “geckoDriverBug_spec.js”:
describe('geckoDriverBug', function() {
	it('should execute test case without errors', function() {
		browser.get("http://www.protractortest.org/testapp/ng1");

		browser.wait(function() {
			return browser.isElementPresent(element(by.xpath("//*[@id='animals']")));
		}, 8000);

		expect(element(by.xpath("//*[@id='animals']")).isPresent()).toBe(true);
	});
});	
  • Output
(node:18632) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[10:09:51] I/launcher - Running 1 instances of WebDriver
[10:09:54] I/testLogger -
------------------------------------

[10:09:54] I/testLogger - [firefox #01] PID: 4344
[firefox #01] Specs: e:\GitHome_master\git\servoy_test\E2E_tests\geckoDriverBug_spec.js
[firefox #01]
[firefox #01] (node:4344) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[firefox #01] [10:09:52] I/local - Starting selenium standalone server...
[firefox #01] [10:09:54] I/local - Selenium standalone server started at http://192.168.1.5:51226/wd/hub
[firefox #01]
[firefox #01] e:\GitHome_master\git\servoy_test\E2E_tests\node_modules\selenium-webdriver\lib\error.js:546
[firefox #01]         throw new ctor(message);
[firefox #01]               ^
[firefox #01] SessionNotCreatedError: Unable to create new service: GeckoDriverService
[firefox #01] Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:32.194Z'
[firefox #01] System info: host: 'DEEPGRAY', ip: '192.168.1.5', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_162'
[firefox #01] Driver info: driver.version: unknown
[firefox #01]     at Object.checkLegacyResponse (e:\GitHome_master\git\servoy_test\E2E_tests\node_modules\selenium-webdriver\lib\error.js:546:15)
[firefox #01]     at parseHttpResponse (e:\GitHome_master\git\servoy_test\E2E_tests\node_modules\selenium-webdriver\lib\http.js:509:13)
[firefox #01]     at doSend.then.response (e:\GitHome_master\git\servoy_test\E2E_tests\node_modules\selenium-webdriver\lib\http.js:441:30)
[firefox #01]     at <anonymous>
[firefox #01]     at process._tickCallback (internal/process/next_tick.js:188:7)
[firefox #01] From: Task: WebDriver.createSession()
[firefox #01]     at Function.createSession (e:\GitHome_master\git\servoy_test\E2E_tests\node_modules\selenium-webdriver\lib\webdriver.js:769:24)
[firefox #01]     at Function.createSession (e:\GitHome_master\git\servoy_test\E2E_tests\node_modules\selenium-webdriver\firefox\index.js:521:41)
[firefox #01]     at createDriver (e:\GitHome_master\git\servoy_test\E2E_tests\node_modules\selenium-webdriver\index.js:170:33)
[firefox #01]     at Builder.build (e:\GitHome_master\git\servoy_test\E2E_tests\node_modules\selenium-webdriver\index.js:632:16)
[firefox #01]     at Local.getNewDriver (e:\GitHome_master\git\servoy_test\E2E_tests\node_modules\protractor\built\driverProviders\driverProvider.js:53:33)
[firefox #01]     at Runner.createBrowser (e:\GitHome_master\git\servoy_test\E2E_tests\node_modules\protractor\built\runner.js:195:43)
[firefox #01]     at q.then.then (e:\GitHome_master\git\servoy_test\E2E_tests\node_modules\protractor\built\runner.js:339:29)
[firefox #01]     at _fulfilled (e:\GitHome_master\git\servoy_test\E2E_tests\node_modules\q\q.js:834:54)
[firefox #01]     at self.promiseDispatch.done (e:\GitHome_master\git\servoy_test\E2E_tests\node_modules\q\q.js:863:30)
[firefox #01]     at Promise.promise.promiseDispatch (e:\GitHome_master\git\servoy_test\E2E_tests\node_modules\q\q.js:796:13)

[10:09:54] I/testLogger -

[10:09:54] E/launcher - Runner process exited unexpectedly with error code: 1
[10:09:54] I/launcher - 1 instance(s) of WebDriver still running
.[10:10:00] I/testLogger -
------------------------------------

[10:10:00] I/testLogger - [chrome #11] PID: 19952
[chrome #11] Specs: e:\GitHome_master\git\servoy_test\E2E_tests\geckoDriverBug_spec.js
[chrome #11]
[chrome #11] (node:19952) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[chrome #11] [10:09:55] I/local - Starting selenium standalone server...
[chrome #11] [10:09:56] I/local - Selenium standalone server started at http://192.168.1.5:55207/wd/hub
[chrome #11] Started
[chrome #11] .
[chrome #11]
[chrome #11]
[chrome #11] 1 spec, 0 failures
[chrome #11] Finished in 1.43 seconds
[chrome #11]
[chrome #11] [10:10:00] I/local - Shutting down selenium standalone server.

[10:10:00] I/testLogger -

[10:10:00] I/launcher - 0 instance(s) of WebDriver still running
[10:10:00] I/launcher - firefox #01 failed with exit code: 1
[10:10:00] I/launcher - chrome #11 passed
[10:10:00] I/launcher - overall: 1 process(es) failed to complete
[10:10:00] E/launcher - Process exited with error code 100

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:20 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
cooleiwhistlescommented, Jan 22, 2019

Thanks @CrispusDH, will do that.

1reaction
bdellegraziecommented, Jun 6, 2018

Just FYI, #4502 is now merged so this should solve this problem too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Firefox on Protractor launching but not running - Stack Overflow
I'm using Protractor v5.2.0, geckodriver v0.19.1, Firefox v52.5.2. This is my protractor.conf.js : const { SpecReporter } = ...
Read more >
Intercept Service - WebdriverIO
Capture and assert HTTP ajax calls in webdriver.io. This is a plugin for webdriver.io. If you don't know it yet, check it out,...
Read more >
Setting up your own test automation environment
In this article, we will teach you how to install your own automation environment and run your own tests using Selenium/WebDriver and a ......
Read more >
Run Selenium tests with Protractor | BrowserStack Docs
You need to have BrowserStack Username and Access key, which you can find in your account settings. If you have not created an...
Read more >
Test Configuration Options - Sauce Labs Documentation
You can use this for dynamic device allocation. Values are not case-sensitive (i.e., "ios" is the same as "iOS" ). See the WebDriver...
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