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

"geckodriver unexpectedly exited" error with 0.10 #184

Closed
MarkUK opened this issue Aug 17, 2016 · 7 comments
Closed

"geckodriver unexpectedly exited" error with 0.10 #184

MarkUK opened this issue Aug 17, 2016 · 7 comments

Comments

@MarkUK
Copy link

MarkUK commented Aug 17, 2016

I get the following trace whenever I try to use geckodriver 0.10 via a minimal Python script (attached):

======================================================================
ERROR: setUpClass (__main__.SampleManagerTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "minimal.py", line 15, in setUpClass
    cls.driver = webdriver.Firefox(capabilities=caps, executable_path='geckodriver-0.10')
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/webdriver.py", line 65, in __init__
    self.service.start()
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/service.py", line 86, in start
    self.assert_process_still_running()
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/service.py", line 99, in assert_process_still_running
    % (self.path, return_code)
WebDriverException: Message: Service geckodriver-0.10 unexpectedly exited. Status code was: 1

This does not occur with geckodriver 0.90. I have checked the following:

  • geckodriver-0.10 is in a directory that's in the PATH, and can be executed directly.
  • The download appears to be sound. The "file" command reports that geckodriver-0.10 is an ELF binary, as I would expect.
  • "pip" reports that the latest version of the Selenium libraries is installed.

Further information:

  • I'm running Firefox Developer Edition (currently v50).
  • I'm using Python 2.7
  • The OS is Ubuntu Mate 16.04
  • Modifying the test file to point to geckodriver-0.9 works fine.
  • I'm running the test from a command line using "python minimal.py" with no other parameters.

Any help or suggestions would be greatly appreciated.

minimal.py.zip

@andreastt
Copy link
Contributor

What is the stdout/stderr from the geckodriver binary? Are you able to execute the file fine?

@MarkUK
Copy link
Author

MarkUK commented Aug 17, 2016

I don't see anything on the terminal other than the message above, when running geckodriver via Python.

I've tried running it directly using:

geckodriver-0.10 -b '/path/to/firefox'

but I don't see any output (or any Firefox) at all. The program appears to be running in the process list (and has gained a --webdriver-port argument), which I guess is the expected behaviour. The same occurs when I run 0.9 in this way.

If there's another way to run the executable, or some other arguments I should be passing to it, please let me know. Thanks.

@andreastt
Copy link
Contributor

andreastt commented Aug 19, 2016

It would be useful if you ran the binary with the -vv flag to get more verbose output. I suspect your test runner above is swallowing the stdout/stderr output, however.

If you’re using the official Selenium Python binding, it too swallows the output and you will have to go in and modify it not to, and append the -vv flag to the argument list.

@gentoo90
Copy link

I have the same trouble when running

from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
caps = DesiredCapabilities.FIREFOX.copy()
caps['marionette'] = True
br = webdriver.Firefox(capabilities=caps, executable_path='./target/debug/geckodriver')

After debugging python I found out that command line for geckodriver is

./target/debug/geckodriver -b /usr/bin/firefox --webdriver-port 45753

which gives

error: Found argument '--webdriver-port' which wasn't expected, or isn't valid in this context

USAGE:
    geckodriver --binary <BINARY>

For more information try --help

@gentoo90
Copy link

Looks like already fixed in SeleniumHQ/selenium#2544

@andreastt
Copy link
Contributor

Ah, that makes sense. This reminds me that it would be nice if Selenium could propagate the error message when it exits with a non-zero exit code.

@lock
Copy link

lock bot commented Aug 17, 2019

This issue has been automatically locked since there has not been any recent activity after it was closed. If you have run into an issue you think is related, please open a new issue.

@lock lock bot locked and limited conversation to collaborators Aug 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants