Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng e2e with firefox requires property -Dwebdriver.gecko.driver=... #6924

Closed
jorgjanke opened this issue Jul 9, 2017 · 2 comments
Closed
Assignees
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent severity3: broken

Comments

@jorgjanke
Copy link

jorgjanke commented Jul 9, 2017

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Versions.

@angular/cli: 1.2.0
node: 7.4.0
os: darwin x64
@angular/animations: 4.2.6
@angular/common: 4.2.6
@angular/compiler: 4.2.6
@angular/core: 4.2.6
@angular/forms: 4.2.6
@angular/http: 4.2.6
@angular/platform-browser: 4.2.6
@angular/platform-browser-dynamic: 4.2.6
@angular/platform-server: 4.2.6
@angular/router: 4.2.6
@angular/cli: 1.2.0
@angular/compiler-cli: 4.2.6
@angular/language-service: 4.2.6

Repro steps.

  • in protractor.conf.js
  capabilities: {
    browserName: 'firefox'
  //  firefoxPath: '/Applications/Firefox.app/Contents/MacOS/firefox'
  },
  directConnect: false, 

The log given by the failure.

[18:28:16] I/launcher - Running 1 instances of WebDriver
[18:28:16] I/local - Starting selenium standalone server...
[18:28:17] I/local - Selenium standalone server started at http://10.0.1.14:61663/wd/hub
[18:28:17] E/launcher - The path to the driver executable must be set by the webdriver.gecko.driver system property; for more information, see https://github.com/mozilla/geckodriver. The latest version can be downloaded from https://github.com/mozilla/geckodriver/releases
[18:28:17] E/launcher - WebDriverError: The path to the driver executable must be set by the webdriver.gecko.driver system property; for more information, see https://github.com/mozilla/geckodriver. The latest version can be downloaded from https://github.com/mozilla/geckodriver/releases
    at Object.checkLegacyResponse (/Users/jorg/Documents/ADev/t4d/node_modules/selenium-webdriver/lib/error.js:505:15)
    at parseHttpResponse (/Users/jorg/Documents/ADev/t4d/node_modules/selenium-webdriver/lib/http.js:509:13)
    at doSend.then.response (/Users/jorg/Documents/ADev/t4d/node_modules/selenium-webdriver/lib/http.js:440:13)
    at process._tickCallback (internal/process/next_tick.js:103:7)

Desired functionality.

running e2e tests with firefox

Mention any other details that might be useful.

  • the current setup is good for chrome (only)
  • download latest gecko via
./node_modules/.bin/webdriver-manager update

(webdriver-manager update updates the global one, which is not used).

  • when starting the
node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.4.0.jar

it requires the -Dwebdriver.gecko.driver system property set.

  • looked in the code, but did not see how the jar file was called

See also: SeleniumHQ/selenium#3572

When using directConnect: true the error is

[19:12:21] I/launcher - Running 1 instances of WebDriver
[19:12:21] I/direct - Using FirefoxDriver directly...
[19:12:23] E/launcher - Unable to parse new session response: {"value": {"sessionId":"8397f291-20cb-4045-91a1-1bbbad02a132","capabilities":{"acceptInsecureCerts":false,"browserName":"firefox","browserVersion":"54.0.1","moz:accessibilityChecks":false,"moz:processID":3022,"moz:profile":"/var/folders/1l/9rd7xh7j3pj6078gw3ptvq_h0000gn/T/rust_mozprofile.15C40QUhA4ii","pageLoadStrategy":"normal","platformName":"darwin","platformVersion":"16.6.0","rotatable":false,"specificationLevel":0,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000}}}}
[19:12:23] E/launcher - WebDriverError: Unable to parse new session response: {"value": {"sessionId":"8397f291-20cb-4045-91a1-1bbbad02a132","capabilities":{"acceptInsecureCerts":false,"browserName":"firefox","browserVersion":"54.0.1","moz:accessibilityChecks":false,"moz:processID":3022,"moz:profile":"/var/folders/1l/9rd7xh7j3pj6078gw3ptvq_h0000gn/T/rust_mozprofile.15C40QUhA4ii","pageLoadStrategy":"normal","platformName":"darwin","platformVersion":"16.6.0","rotatable":false,"specificationLevel":0,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000}}}}
    at doSend.then.response (/Users/jorg/Documents/ADev/t4d/node_modules/selenium-webdriver/lib/http.js:445:19)
    at process._tickCallback (internal/process/next_tick.js:103:7)
From: Task: WebDriver.createSession()

this seems to be a port issue (connecting to 4444 rather 49152)
https://stackoverflow.com/questions/43194582/unable-to-parse-new-session-response-when-run-protractor-test-in-firefox

@Brocco Brocco added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent severity3: broken labels Jul 20, 2017
@filipesilva
Copy link
Contributor

This isn't a bug in Angular CLI as the out-of-the-box configuration is only intended to work directly for chrome. To work with firefox you need to manually configure it.

We do provide the ng e2e --no-webdriver-update flag so that the CLI will not try to auto-update the chrome webdriver.

Other than that, it's really up to the user to configure firefox/protractor properly. The CLI only starts the dev server and then starts protractor.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent severity3: broken
Projects
None yet
Development

No branches or pull requests

3 participants