Selenium fails with error: Service geckodriver unexpectedly exited. Status code was: 2












4















I am using




  • Selenium 3.0.1

  • Python 2.7.12

  • Firefox 50


I have set the geckodriver's path in PATH but still I am getting the below error while running the test:




selenium.common.exceptions.WebDriverException: Message: Service geckodriver unexpectedly exited. Status code was: 2




Also, in geckodriver.log in my home directory below is displayed:




Usage:
geckodriver [OPTIONS]
geckodriver: Unknown option --port










share|improve this question

























  • upgrade to a new geckodriver

    – Corey Goldberg
    Feb 23 '17 at 15:11
















4















I am using




  • Selenium 3.0.1

  • Python 2.7.12

  • Firefox 50


I have set the geckodriver's path in PATH but still I am getting the below error while running the test:




selenium.common.exceptions.WebDriverException: Message: Service geckodriver unexpectedly exited. Status code was: 2




Also, in geckodriver.log in my home directory below is displayed:




Usage:
geckodriver [OPTIONS]
geckodriver: Unknown option --port










share|improve this question

























  • upgrade to a new geckodriver

    – Corey Goldberg
    Feb 23 '17 at 15:11














4












4








4


1






I am using




  • Selenium 3.0.1

  • Python 2.7.12

  • Firefox 50


I have set the geckodriver's path in PATH but still I am getting the below error while running the test:




selenium.common.exceptions.WebDriverException: Message: Service geckodriver unexpectedly exited. Status code was: 2




Also, in geckodriver.log in my home directory below is displayed:




Usage:
geckodriver [OPTIONS]
geckodriver: Unknown option --port










share|improve this question
















I am using




  • Selenium 3.0.1

  • Python 2.7.12

  • Firefox 50


I have set the geckodriver's path in PATH but still I am getting the below error while running the test:




selenium.common.exceptions.WebDriverException: Message: Service geckodriver unexpectedly exited. Status code was: 2




Also, in geckodriver.log in my home directory below is displayed:




Usage:
geckodriver [OPTIONS]
geckodriver: Unknown option --port







python selenium selenium-webdriver geckodriver






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 3 at 0:45









finefoot

2,81641936




2,81641936










asked Dec 6 '16 at 11:40









Dhruv BhatnagarDhruv Bhatnagar

54312




54312













  • upgrade to a new geckodriver

    – Corey Goldberg
    Feb 23 '17 at 15:11



















  • upgrade to a new geckodriver

    – Corey Goldberg
    Feb 23 '17 at 15:11

















upgrade to a new geckodriver

– Corey Goldberg
Feb 23 '17 at 15:11





upgrade to a new geckodriver

– Corey Goldberg
Feb 23 '17 at 15:11












2 Answers
2






active

oldest

votes


















0














binary = FirefoxBinary('path/to/installed firefox binary')
browser = webdriver.Firefox(firefox_binary=binary)


Also dont forget to restart after setting path.






share|improve this answer



















  • 1





    if firefox can be found via your PATH, there is no need to explicitly set the binary location in your test code.

    – Corey Goldberg
    Feb 23 '17 at 15:10






  • 1





    It just gets me FirefoxBinary is not defined...

    – CGFoX
    Mar 25 '18 at 10:12



















1














It sounds like you may be using an older version of geckodriver. Do you know what version you're using? The latest version is 0.11.1






share|improve this answer
























  • I am using 0.9.0 Is the possible cause for this error?

    – Dhruv Bhatnagar
    Dec 7 '16 at 5:22











  • It could be, there were quite a few fixes since 0.9.0. There's a good chance 0.11.1 will work better for you.

    – Lucas Tierney
    Dec 7 '16 at 13:58











  • I just checked the project itself, looks like that option was in fact added for 0.10.0

    – Lucas Tierney
    Dec 7 '16 at 14:03












Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f40994493%2fselenium-fails-with-error-service-geckodriver-unexpectedly-exited-status-code%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














binary = FirefoxBinary('path/to/installed firefox binary')
browser = webdriver.Firefox(firefox_binary=binary)


Also dont forget to restart after setting path.






share|improve this answer



















  • 1





    if firefox can be found via your PATH, there is no need to explicitly set the binary location in your test code.

    – Corey Goldberg
    Feb 23 '17 at 15:10






  • 1





    It just gets me FirefoxBinary is not defined...

    – CGFoX
    Mar 25 '18 at 10:12
















0














binary = FirefoxBinary('path/to/installed firefox binary')
browser = webdriver.Firefox(firefox_binary=binary)


Also dont forget to restart after setting path.






share|improve this answer



















  • 1





    if firefox can be found via your PATH, there is no need to explicitly set the binary location in your test code.

    – Corey Goldberg
    Feb 23 '17 at 15:10






  • 1





    It just gets me FirefoxBinary is not defined...

    – CGFoX
    Mar 25 '18 at 10:12














0












0








0







binary = FirefoxBinary('path/to/installed firefox binary')
browser = webdriver.Firefox(firefox_binary=binary)


Also dont forget to restart after setting path.






share|improve this answer













binary = FirefoxBinary('path/to/installed firefox binary')
browser = webdriver.Firefox(firefox_binary=binary)


Also dont forget to restart after setting path.







share|improve this answer












share|improve this answer



share|improve this answer










answered Dec 6 '16 at 12:09









mosaadmosaad

1,10121341




1,10121341








  • 1





    if firefox can be found via your PATH, there is no need to explicitly set the binary location in your test code.

    – Corey Goldberg
    Feb 23 '17 at 15:10






  • 1





    It just gets me FirefoxBinary is not defined...

    – CGFoX
    Mar 25 '18 at 10:12














  • 1





    if firefox can be found via your PATH, there is no need to explicitly set the binary location in your test code.

    – Corey Goldberg
    Feb 23 '17 at 15:10






  • 1





    It just gets me FirefoxBinary is not defined...

    – CGFoX
    Mar 25 '18 at 10:12








1




1





if firefox can be found via your PATH, there is no need to explicitly set the binary location in your test code.

– Corey Goldberg
Feb 23 '17 at 15:10





if firefox can be found via your PATH, there is no need to explicitly set the binary location in your test code.

– Corey Goldberg
Feb 23 '17 at 15:10




1




1





It just gets me FirefoxBinary is not defined...

– CGFoX
Mar 25 '18 at 10:12





It just gets me FirefoxBinary is not defined...

– CGFoX
Mar 25 '18 at 10:12













1














It sounds like you may be using an older version of geckodriver. Do you know what version you're using? The latest version is 0.11.1






share|improve this answer
























  • I am using 0.9.0 Is the possible cause for this error?

    – Dhruv Bhatnagar
    Dec 7 '16 at 5:22











  • It could be, there were quite a few fixes since 0.9.0. There's a good chance 0.11.1 will work better for you.

    – Lucas Tierney
    Dec 7 '16 at 13:58











  • I just checked the project itself, looks like that option was in fact added for 0.10.0

    – Lucas Tierney
    Dec 7 '16 at 14:03
















1














It sounds like you may be using an older version of geckodriver. Do you know what version you're using? The latest version is 0.11.1






share|improve this answer
























  • I am using 0.9.0 Is the possible cause for this error?

    – Dhruv Bhatnagar
    Dec 7 '16 at 5:22











  • It could be, there were quite a few fixes since 0.9.0. There's a good chance 0.11.1 will work better for you.

    – Lucas Tierney
    Dec 7 '16 at 13:58











  • I just checked the project itself, looks like that option was in fact added for 0.10.0

    – Lucas Tierney
    Dec 7 '16 at 14:03














1












1








1







It sounds like you may be using an older version of geckodriver. Do you know what version you're using? The latest version is 0.11.1






share|improve this answer













It sounds like you may be using an older version of geckodriver. Do you know what version you're using? The latest version is 0.11.1







share|improve this answer












share|improve this answer



share|improve this answer










answered Dec 6 '16 at 13:35









Lucas TierneyLucas Tierney

1,65288




1,65288













  • I am using 0.9.0 Is the possible cause for this error?

    – Dhruv Bhatnagar
    Dec 7 '16 at 5:22











  • It could be, there were quite a few fixes since 0.9.0. There's a good chance 0.11.1 will work better for you.

    – Lucas Tierney
    Dec 7 '16 at 13:58











  • I just checked the project itself, looks like that option was in fact added for 0.10.0

    – Lucas Tierney
    Dec 7 '16 at 14:03



















  • I am using 0.9.0 Is the possible cause for this error?

    – Dhruv Bhatnagar
    Dec 7 '16 at 5:22











  • It could be, there were quite a few fixes since 0.9.0. There's a good chance 0.11.1 will work better for you.

    – Lucas Tierney
    Dec 7 '16 at 13:58











  • I just checked the project itself, looks like that option was in fact added for 0.10.0

    – Lucas Tierney
    Dec 7 '16 at 14:03

















I am using 0.9.0 Is the possible cause for this error?

– Dhruv Bhatnagar
Dec 7 '16 at 5:22





I am using 0.9.0 Is the possible cause for this error?

– Dhruv Bhatnagar
Dec 7 '16 at 5:22













It could be, there were quite a few fixes since 0.9.0. There's a good chance 0.11.1 will work better for you.

– Lucas Tierney
Dec 7 '16 at 13:58





It could be, there were quite a few fixes since 0.9.0. There's a good chance 0.11.1 will work better for you.

– Lucas Tierney
Dec 7 '16 at 13:58













I just checked the project itself, looks like that option was in fact added for 0.10.0

– Lucas Tierney
Dec 7 '16 at 14:03





I just checked the project itself, looks like that option was in fact added for 0.10.0

– Lucas Tierney
Dec 7 '16 at 14:03


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f40994493%2fselenium-fails-with-error-service-geckodriver-unexpectedly-exited-status-code%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

SQL update select statement

WPF add header to Image with URL pettitions [duplicate]