Protractor: Unable to run protractor with firefox both directly connect or selenium server on latest

Created on 24 Mar 2017  ·  20Comments  ·  Source: angular/protractor

I have tried running firefox on both directConnect or selenium Server.
Both failed with different error:

With directConnect, error response:

I/direct - Using FirefoxDriver directly...
Ignoring uncaught error WebDriverError: Unable to parse new session response: {"value": {"sessionId":"d81ef6c2-716d-cd40-92ed-06074e92e5ad","value":{"acceptInsecureCerts":false,"browserName":"firefox","browserVersion":"52.0","moz:accessibilityChecks":false,"moz:processID":78446,"moz:profile":"/var/folders/h_/9whk89t96qx1vg3kn2f56z9r197k29/T/rust_mozprofile.XRiJ573zqmWm","pageLoadStrategy":"normal","platformName":"darwin","platformVersion":"15.6.0","rotatable":false,"specificationLevel":0,"timeouts":{"implicit":0,"page load":300000,"script":30000}}}}
[13:04:41] E/launcher - BUG: launcher exited with 1 tasks remaining

With selenium server 3.3.1, error response:

Ignoring uncaught error WebDriverError: Cannot find firefox binary version 'ANY' in PATH
Build info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800'
System info: host: 'CDLVDIW700982', ip: '51.16.105.196', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_121'
Driver info: driver.version: FirefoxDriver
[13:18:17] E/launcher - BUG: launcher exited with 1 tasks remaining

Bug report

  • Node Version: 6.9.4
  • Protractor Version: 5.1.1
  • Angular Version: hybrid of 1.5 and 2
  • Browser(s): firefox
  • Operating System and Version Mac
  • Your protractor configuration file
  • A relevant example test
  • Output from running the test
  • Steps to reproduce the bug
  • The URL you are running your tests against (if relevant)
external bug filed

Most helpful comment

@matt328

I've got it working with

  • FF 55.0.3
  • Node 6.11.1
  • Protractor 5.1.2
  • geckodriver: 0.18.0
  • Selenium: 3.5.2

but only when I use a standalone webdriver-manager.

With directConnect I get this error

npm run test.example

> [email protected] test.example /Users/wswebcreation/contributions/protractor
> node ./bin/protractor example/conf.js

[08:28:49] I/launcher - Running 1 instances of WebDriver
[08:28:49] I/local - Starting selenium standalone server...
[08:28:50] I/local - Selenium standalone server started at http://192.168.1.17:54140/wd/hub
[08:28:50] E/launcher - Unable to create new service: GeckoDriverService
Build info: version: '3.5.2', revision: '10229a9020', time: '2017-08-21T17:54:21.164Z'
System info: host: 'MacBook-Pro-2.local', ip: 'fe80:0:0:0:d7:c484:75bf:69ef%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_25'
Driver info: driver.version: unknown
[08:28:50] E/launcher - SessionNotCreatedError: Unable to create new service: GeckoDriverService
Build info: version: '3.5.2', revision: '10229a9020', time: '2017-08-21T17:54:21.164Z'
System info: host: 'MacBook-Pro-2.local', ip: 'fe80:0:0:0:d7:c484:75bf:69ef%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_25'

Can you check again?

All 20 comments

I think that this was solved here: https://github.com/SeleniumHQ/selenium/commit/5234b325d586517e40d57c763d59c5b4caec09bf

Updating to selenium-webdriver 3.3.1 should fix the issue

@benitogf Do I need to go back selenium 3.3.0? I have 3.3.1

not sure, I made some changes to this file https://github.com/SeleniumHQ/selenium/blob/master/javascript/node/selenium-webdriver/lib/http.js and got it working for v3.0.1 which is the current one here https://github.com/angular/protractor/blob/master/package.json#L26 surely it will be fixed soon

@benitogf I move it back 3.0.1 selenium but I still got the same error for firefox.

I get the same problem with directConnect and Firefox 52.0.1 (64-bit) on OS X El Capitan.

Standalone works fine though.

@pawelus Do you set anything else in capabilities other than browserName?

image

This change works for v3.0.1 with chrome/firefox capabilities, but surely this will be fixed soon in selenium 3.3.x 👍

@jlin412 My capabilities are as follows:

capabilities: {
    browserName: 'firefox',
    acceptSslCerts: true,
    shardTestFiles: false,
    maxInstances: 1
}

I also tried with marionette: true but that doesn't really change anything

Did some checking in the geckodriver repo issues and they have this one:
https://github.com/mozilla/geckodriver/issues/529
So our problems should be gone as soon as the new version of geckodriver will be released

Able to move pass to my angular site with standalone server. I see a new error now. Similar to this stackoverflow page:
http://stackoverflow.com/questions/42760973/unable-to-use-firefox-v52-0-with-protractor

   Message:
     WebDriverError: Error: Permission denied to access property "invoke"
     Build info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800'
     System info: host: 'ROSELCDV0001W25', ip: '26.41.226.13', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.3', java.version: '1.8.0_121'
     Driver info: org.openqa.selenium.firefox.FirefoxDriver
     Capabilities [{moz:profile=/var/folders/h_/9whk89t96qx1vg3kn2f56z9r197k29/T/rust_mozprofile.nu0Y7BY5LWJC, rotatable=false, timeouts={implicit=0, page load=300000, script=30000}, pageLoadStrategy=normal, platform=ANY, specificationLevel=0, moz:accessibilityChecks=false, acceptInsecureCerts=false, browserVersion=52.0, platformVersion=16.4.0, moz:processID=58502, browserName=firefox, platformName=darwin}]
     Session ID: 7b8f4037-3324-7f42-8d8f-5e2b9e36bd5c
         at WebDriverError (/Users/linj/redbox_spa/redbox_angular/node_modules/selenium-webdriver/lib/error.js:27:5)
         at Object.checkLegacyResponse (/Users/linj/redbox_spa/redbox_angular/node_modules/selenium-webdriver/lib/error.js:505:15)
         at parseHttpResponse (/Users/linj/redbox_spa/redbox_angular/node_modules/selenium-webdriver/lib/http.js:509:13)
         at doSend.then.response (/Users/linj/redbox_spa/redbox_angular/node_modules/selenium-webdriver/lib/http.js:440:13)
         at process._tickCallback (internal/process/next_tick.js:103:7)
     From: Task: Protractor.waitForAngular() - Locator: By(css selector, input[name='user'],[name='orgoid'])
         at thenableWebDriverProxy.schedule (/Users/linj/redbox_spa/redbox_angular/node_modules/selenium-webdriver/lib/webdriver.js:816:17)
         at ProtractorBrowser.executeAsyncScript_ (/Users/linj/redbox_spa/redbox_angular/node_modules/protractor/lib/browser.ts:608:24)
         at angularAppRoot.then (/Users/linj/redbox_spa/redbox_angular/node_modules/protractor/lib/browser.ts:642:23)
         at ManagedPromise.invokeCallback_ (/Users/linj/redbox_spa/redbox_angular/node_modules/selenium-webdriver/lib/promise.js:1366:14)
         at TaskQueue.execute_ (/Users/linj/redbox_spa/redbox_angular/node_modules/selenium-webdriver/lib/promise.js:2970:14)
         at TaskQueue.executeNext_ (/Users/linj/redbox_spa/redbox_angular/node_modules/selenium-webdriver/lib/promise.js:2953:27)
         at asyncRun (/Users/linj/redbox_spa/redbox_angular/node_modules/selenium-webdriver/lib/promise.js:2813:27)
         at /Users/linj/redbox_spa/redbox_angular/node_modules/selenium-webdriver/lib/promise.js:676:7Error
         at ElementArrayFinder.applyAction_ (/Users/linj/redbox_spa/redbox_angular/node_modules/protractor/lib/element.ts:482:23)
         at ElementArrayFinder.(anonymous function) [as clear] (/Users/linj/redbox_spa/redbox_angular/node_modules/protractor/lib/element.ts:96:21)
         at ElementFinder.(anonymous function) [as clear] (/Users/linj/redbox_spa/redbox_angular/node_modules/protractor/lib/element.ts:873:14)
         at setOrgidOrUsername (/Users/linj/redbox_spa/redbox_angular/test/e2e/page_objects/log_in_page.js:277:21)
         at LoginPage.iEloginWithUserJson (/Users/linj/redbox_spa/redbox_angular/test/e2e/page_objects/log_in_page.js:116:5)
         at LoginPage.loginSkipBrowserGet (/Users/linj/redbox_spa/redbox_angular/test/e2e/page_objects/log_in_page.js:149:10)
         at loginWithUserJson (/Users/linj/redbox_spa/redbox_angular/test/e2e/page_objects/log_in_page.js:129:17)
         at LoginPage.login (/Users/linj/redbox_spa/redbox_angular/test/e2e/page_objects/log_in_page.js:222:14)
         at World.<anonymous> (/Users/linj/redbox_spa/redbox_angular/test/e2e/features/time/step_definitions/time_login_steps.js:40:22)

Anyone see this error before and know how to resolve it?

@jlin412 That's a known issue (https://github.com/angular/zone.js/issues/616) in zone.js. Unfortunately, it breaks webdriver testing with Firefox. There is a fix, it'll go out in the next release.

Testing firefox with Angular 2+ is fixed as of Zone.js 0.8.7. The issue with directConnect still persists, you need to use selenium standalone instead of directConnect. See https://github.com/angular/protractor/issues/4253

Firefox Version : 45.x,
Protractor Vesion : 5.1.1

code in conf.js:

multiCapabilities:[
{
'browserName': 'internet explorer',
},
{
'browserName' : 'chrome',
},
{
'browserName' : 'firefox',
},
]

Able to run in IE and Chrome but "not able to run my protractor test on firefox"
What is the solution?

@makwanaparth94 , maybe first upgrade Firefox to the latest version and then try again

I am currently facing this issue, where the protractor tests are failing due to error is :WebDriverError: Error: Permission denied to access property "invoke" on Mac .

System - Mac-OS-Sierra 10.12.4
FF - 53.0.3 (64 bit)
Node version - 7.7.1
Protractor version - 5.1.2
Running against an Angular 2 web app.

Here is my conf.js for the Firefox browser capabilities -

capabilities: { browserName: 'firefox', marionette: true, },

Has there been any resolution to this? I recently started trying to test firefox both on an angularJs project as well as a new project generated with [email protected] and it seems like chrome runs fine but firefox gives the following error:

WebDriverError: Unable to parse new session response: {"value": {"sessionId":"b2854fcc-1505-8548-999d-d6f9f8767587","capabilities":{"acceptInsecureCerts":true,"browserName":"firefox","browserVersion":"54.0","moz:accessibilityChecks":false,"moz:processID":93595,"moz:profile":"/var/folders/b5/5kptwjxj0xsgdzw2rfs4dwyncmp_vb/T/rust_mozprofile.8H4QjAeDEvoU","pageLoadStrategy":"normal","platformName":"darwin","platformVersion":"15.6.0","rotatable":false,"specificationLevel":0,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000}}}}

My firefox capabilities are simply: { 'browserName': 'firefox'}

Firefox will open a new browser instance but then errors out.

System - Mac-OS El Capitan 10.11.6
FF- 54.0
Node Version: 6.9.4
Protractor: 5.1.0 & 5.1.2 (angular and angularJs projects respectively)

Both projects give the exact same error.

I'm seeing the same problem as @nortain with
FF 55.0.2
Node: 6.9.5
Protractor: 5.1.2
geckodriver: 0.18.0

Unable to parse new session response:

{  
   "value":{  
      "sessionId":"8d850de2-84fd-b542-abe8-e4719ed53646",
      "capabilities":{  
         "acceptInsecureCerts":false,
         "browserName":"firefox",
         "browserVersion":"55.0.2",
         "moz:accessibilityChecks":false,
         "moz:processID":13869,
         "moz:profile":"/var/folders/8s/_zbwn6_91x97r3vk2lcqq2h00000gn/T/rust_mozprofile.x9a4Bwzs5pT3",
         "pageLoadStrategy":"normal",
         "platformName":"darwin",
         "platformVersion":"16.7.0",
         "rotatable":false,
         "specificationLevel":0,
         "timeouts":{  
            "implicit":0,
            "pageLoad":300000,
            "script":30000
         }
      }
   }
}

@matt328

I've got it working with

  • FF 55.0.3
  • Node 6.11.1
  • Protractor 5.1.2
  • geckodriver: 0.18.0
  • Selenium: 3.5.2

but only when I use a standalone webdriver-manager.

With directConnect I get this error

npm run test.example

> [email protected] test.example /Users/wswebcreation/contributions/protractor
> node ./bin/protractor example/conf.js

[08:28:49] I/launcher - Running 1 instances of WebDriver
[08:28:49] I/local - Starting selenium standalone server...
[08:28:50] I/local - Selenium standalone server started at http://192.168.1.17:54140/wd/hub
[08:28:50] E/launcher - Unable to create new service: GeckoDriverService
Build info: version: '3.5.2', revision: '10229a9020', time: '2017-08-21T17:54:21.164Z'
System info: host: 'MacBook-Pro-2.local', ip: 'fe80:0:0:0:d7:c484:75bf:69ef%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_25'
Driver info: driver.version: unknown
[08:28:50] E/launcher - SessionNotCreatedError: Unable to create new service: GeckoDriverService
Build info: version: '3.5.2', revision: '10229a9020', time: '2017-08-21T17:54:21.164Z'
System info: host: 'MacBook-Pro-2.local', ip: 'fe80:0:0:0:d7:c484:75bf:69ef%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_25'

Can you check again?

is it working?

Firefox Version : 45.x,
Protractor Vesion : 5.1.1

code in conf.js:

multiCapabilities:[
{
'browserName': 'internet explorer',
},
{
'browserName' : 'chrome',
},
{
'browserName' : 'firefox',
},
]

Able to run in IE and Chrome but "not able to run my protractor test on firefox"
What is the solution?

I was able to run Firefox 62.0 (32-bit) in Lubuntu with your capabilities. (Needed to switch to ff because protractor didn't work with Chromium). Thanks by the way!

Was this page helpful?
0 / 5 - 0 ratings