protractor: Firefox 50.1.0 not working

Bug report

  • Node Version: 6.7.0
  • Protractor Version: 4.0.10
  • Angular Version: 2.1.0
  • Browser(s): Firefox 50.1.0
  • Operating System and Version Win8.1 Enterprise
  • Your protractor configuration file
exports.config = {
    capabilities: {
        'browserName': 'firefox'
    },
    specs: ['**/*.e2e.spec.js'],
    useAllAngular2AppRoots: true,
    baseUrl: 'http://localhost:64065/',
    directConnect : true
};
  • A relevant example test
describe('Expense overview list', function () {

    it('should should have Anakin Skywalker as first entry', function () {
        browser.get('/home');
        expect(browser.getTitle()).toEqual('Angular');

        browser.get('/overview');

        expect(element(by.id('00000000-0000-0000-0000-000000000001')).getText()).toEqual('ANAKIN SKYWALKER');
    });
});
  • Output from running the test
[15:08:27] I/direct - Using FirefoxDriver directly...
[15:08:27] I/launcher - Running 1 instances of WebDriver
[15:09:12] E/launcher - Timed out waiting for the WebDriver server at http://127.0.0.1:60626/hub
[15:09:12] E/launcher - Error: Timed out waiting for the WebDriver server at http://127.0.0.1:60626/hub
    at Error (native)
    at onError (C:\Users\john\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\http\util.js:87:11)
    at ManagedPromise.invokeCallback_ (C:\Users\john\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:1379:14)
    at TaskQueue.execute_ (C:\Users\john\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2913:14)
    at TaskQueue.executeNext_ (C:\Users\john\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2896:21)
    at asyncRun (C:\Users\john\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2775:27)
    at C:\Users\john\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:639:7
    at process._tickCallback (internal/process/next_tick.js:103:7)
From: Task: WebDriver.createSession()
    at Function.createSession (C:\Users\john\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js:329:24)
    at Driver (C:\Users\john\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\firefox\index.js:386:38)
    at Direct.getNewDriver (C:\Users\john\AppData\Roaming\npm\node_modules\protractor\built\driverProviders\direct.js:75:26)
    at Runner.createBrowser (C:\Users\john\AppData\Roaming\npm\node_modules\protractor\built\runner.js:198:43)
    at C:\Users\john\AppData\Roaming\npm\node_modules\protractor\built\runner.js:285:30
    at _fulfilled (C:\Users\john\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:834:54)
    at self.promiseDispatch.done (C:\Users\john\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:863:30)
    at Promise.promise.promiseDispatch (C:\Users\john\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:796:13)
    at C:\Users\john\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:556:49
    at runSingle (C:\Users\john\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:137:13)
[15:09:12] E/launcher - Process exited with error code 199
  • Steps to reproduce the bug just run protractor protractor.conf.js
  • The URL you are running your tests against (if relevant) see protractor.conf.js

Firefox is starting but nothing happens, just an empty screen.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 35 (8 by maintainers)

Most upvoted comments

directConnect:true not working for me on Firefox 52.0 32bit and gecko 15.0 while it works with selenium-standalone 3.3.1 but only when I provide below options and start server manually in another git bash shell.

-Dwebdriver.gecko.driver=./node_modules/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.15.0.exe

see logs here

Thanks @mgiambalvo. It was driving me nuts why during the middle of the day, Protractor/Firefox had been working fine then suddenly Firefox wouldn’t even go to the URL but instead timed out. Looking at Firefox’s update history I discovered it had auto-updated from 50.1.0 to 51.0.1 while I was at lunch!

There were a few extra hoops I personally had to jump through. Some are Mac-specific, but this might help speed up others with the same issues.

1- OSX doesn’t have wget installed by default, but it’s an easy install 2- The webdriver-manager start failed as it expected the JAR in a different location (/Users/esoyke/.nvm/versions/node/v6.2.2/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.0.0-beta4.jar). I manually moved it there. 3- Ran into another error starting Selenium (Exception in thread “main” java.lang.UnsupportedClassVersionError: org/openqa/grid/selenium/GridLauncherV3 : Unsupported major.minor version 52.0 ). The Mac had Java 7 so I upgraded to 8. 4- Was still getting the same error until I removed the “directConnect: true” from my config.

Back in the saddle!

Note that as of Protractor 5.1, we’ll support Firefox 51+ and greater. Older versions of Firefox won’t work with directConnect, but may work with selenium server and marionette: false. A bug was introduced in Selenium 3.0.0 that breaks the JS Firefox driver (SeleniumHQ/selenium#3115) - it’s been fixed, but won’t be available until the next release of selenium server (3.0.2 or greater). So to use the latest Firefox, you’ll need to use selenium server 3.0.0-beta4 like so:

webdriver-manager update
wget http://selenium-release.storage.googleapis.com/3.0-beta4/selenium-server-standalone-3.0.0-beta4.jar -P ./node_modules/webdriver-manager/selenium
webdriver-manager start --versions.standalone 3.0.0-beta4

See https://github.com/angular/protractor/issues/4253 for the issues with directConnect and Firefox 52 in Protractor 5.1.1

@rahulmr @jlin412 Apparently the protractor was not picking up the latest firefox version (52). Now with 52 the tests are running successfully. All it needed was a little nudge. Thanks to you both!

For me I also had to modify the original workaround slightly:

wget http://selenium-release.storage.googleapis.com/3.0-beta4/selenium-server-standalone-3.0.0-beta4.jar -P ./node_modules/protractor/node_modules/webdriver-manager/selenium
./node_modules/.bin/webdriver-manager start --versions.standalone 3.0.0-beta4

@RaviKlair Few checkpoints though.

  1. Firefox version (64 bit or 32 bit) 52 or greater
  2. gecko version

I see this error if you are using firefox less than 52

On Tue, Apr 11, 2017 at 4:31 PM, CodeJockey notifications@github.com wrote:

Right! I’ve added seleniumAddress: ‘http://localhost:4444/wd/hub’ in my conf file. So, now if I run my test, it opens up firefox but closes it after 1 sec and spits out the following error [image: image] https://cloud.githubusercontent.com/assets/24551166/24929535/255a5b1c-1ebb-11e7-8026-564b452eb71f.png

Sorry for spamming this thread

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/angular/protractor/issues/3823#issuecomment-293391254, or mute the thread https://github.com/notifications/unsubscribe-auth/ABF6jUv-oX8f6sxoZ9h_m_qhHOOu6JQ2ks5ru-M-gaJpZM4LM9nn .

Currently, firefox doesn’t work with direct connect with gecko driver 0.15. You need to set --seleniumAddress=

On Tue, Apr 11, 2017 at 3:56 PM, CodeJockey notifications@github.com wrote:

@rahulmr https://github.com/rahulmr Thanks for the detailed response! I’m able to start the server with the mentioned cmd but when I run a spec, its not grabbing the gecko driver present in selenium folder, rather its trying to find it in PATH. Any comments ? [image: image] https://cloud.githubusercontent.com/assets/24551166/24928130/28d9631e-1eb6-11e7-8210-818f25651f8c.png

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/angular/protractor/issues/3823#issuecomment-293381957, or mute the thread https://github.com/notifications/unsubscribe-auth/ABF6jWYAWpXNoLzVFWnsvbEDgH2NdnUXks5ru9rdgaJpZM4LM9nn .

@JoshLipps does ‘directConnect: true’ work for you?