Closed jricardo27 closed 7 years ago
Can this be reproduced on the newest Firefox nightly build? Firefox 45 isn't expected to work with the newest versions of selenium (3.4.0) and geckodriver (0.16.0). Support for geckodriver 0.16 is best in Firefox 52.0.3 and onwards.
see: https://github.com/mozilla/geckodriver#supported-firefoxen
It seems to work ok (Selenium 3.40 + Geckodriver 0.16.0 + Firefox 53.0).
Even the issue with the click (https://github.com/mozilla/geckodriver/issues/322) seems to be working now.
Thanks for the advice.
I'm experiencing the same issue with
OS: arch linux Python: 3.6 Selenium: 3.4.0 Geckodriver: 0.16.0 Firefox: 53.0
py.test failure
selenium.common.exceptions.WebDriverException: Message: Unable to find a matching set of capabilities
env/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py:194: WebDriverException
Same platform and stack as @Nagasaki45, same issue.
This bug will remain closed until we can get a high quality bug report. Me too comments don't really add value
@AutomatedTester I'd gladly help, but this is the only info I get. How can I gather more information about the issue?
Hi, I got the same error on my Windows 10 PC. I got rid of the error by installing firefox and reverting to previous geckodriver (geckodriver-v0.15.0-win64).
Unfortunately no one has given steps to reproduce. This is clearly more than just driver=webdriver.Firefox()
issue.
We can't do anything until proper steps to reproduce are given as documented in Contributing.md
Selenium tree tests being run in Python 3.6.1 and are passing. I ran 4 to show session startup.
dburns in ~/development/selenium/py on master λ tox -c py/tox.ini -r -e py36-marionette -v
using tox.ini: /Users/dburns/development/selenium/py/tox.ini
using tox-2.3.1 from /usr/local/lib/python2.7/site-packages/tox/__init__.pyc
GLOB sdist-make: /Users/dburns/development/selenium/py/setup.py
/Users/dburns/development/selenium/py$ /usr/local/opt/python/bin/python2.7 /Users/dburns/development/selenium/py/setup.py sdist --formats=zip --dist-dir /Users/dburns/development/selenium/py/.tox/dist >/Users/dburns/development/selenium/py/.tox/log/tox-0.log
py36-marionette recreate: /Users/dburns/development/selenium/py/.tox/py36-marionette
/Users/dburns/development/selenium/py/.tox$ /usr/local/opt/python/bin/python2.7 -m virtualenv --python /usr/local/bin/python3.6 py36-marionette >/Users/dburns/development/selenium/py/.tox/py36-marionette/log/py36-marionette-0.log
py36-marionette installdeps: pytest==3.0.3, pytest-instafail==0.3.0, pytest-mock==1.5.0, pytest-xdist==1.15
/Users/dburns/development/selenium/py$ /Users/dburns/development/selenium/py/.tox/py36-marionette/bin/pip install -v --no-index --find-links=../third_party/py pytest==3.0.3 pytest-instafail==0.3.0 pytest-mock==1.5.0 pytest-xdist==1.15 >/Users/dburns/development/selenium/py/.tox/py36-marionette/log/py36-marionette-1.log
py36-marionette inst: /Users/dburns/development/selenium/py/.tox/dist/selenium-3.4.0.zip
/Users/dburns/development/selenium/py$ /Users/dburns/development/selenium/py/.tox/py36-marionette/bin/pip install -v --no-index --find-links=../third_party/py /Users/dburns/development/selenium/py/.tox/dist/selenium-3.4.0.zip >/Users/dburns/development/selenium/py/.tox/py36-marionette/log/py36-marionette-2.log
/Users/dburns/development/selenium/py$ /Users/dburns/development/selenium/py/.tox/py36-marionette/bin/pip freeze >/Users/dburns/development/selenium/py/.tox/py36-marionette/log/py36-marionette-3.log
py36-marionette installed: apipkg==1.4,appdirs==1.4.3,execnet==1.4.1,packaging==16.8,py==1.4.32,pyparsing==2.2.0,pytest==3.0.3,pytest-instafail==0.3.0,pytest-mock==1.5.0,pytest-xdist==1.15.0,selenium==3.4.0,six==1.10.0
py36-marionette runtests: PYTHONHASHSEED='1420169364'
py36-marionette runtests: commands[0] | py.test -n=auto --driver=Marionette
/Users/dburns/development/selenium/py$ /Users/dburns/development/selenium/py/.tox/py36-marionette/bin/py.test -n=auto --driver=Marionette
=================================================== test session starts ====================================================
platform darwin -- Python 3.6.1, pytest-3.0.3, py-1.4.32, pluggy-0.4.0
rootdir: /Users/dburns/development/selenium/py, inifile: setup.cfg
plugins: xdist-1.15.0, mock-1.5.0, instafail-0.3.0
gw0 [605] / gw1 [605] / gw2 [605] / gw3 [605]
scheduling tests via LoadScheduling
....^CERROR: KEYBOARDINTERRUPT
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! KeyboardInterrupt !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
to show a full traceback on KeyboardInterrupt use --fulltrace
/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py:299: KeyboardInterrupt
================================================ 4 passed in 12.21 seconds =================================================
ERROR: keyboardinterrupt
@AutomatedTester actually, for me it's exactly that, driver = webdriver.Firefox()
issue.
#!/usr/bin/env python3
from selenium import webdriver
driver = webdriver.Firefox()
driver.get('https://google.com')
Traceback (most recent call last):
File "test2.py", line 5, in <module>
driver = webdriver.Firefox()
File "/home/matjaz/env/lib/python3.6/site-packages/selenium/webdriver/firefox/webdriver.py", line 152, in __init__
keep_alive=True)
File "/home/matjaz/env/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 98, in __init__
self.start_session(desired_capabilities, browser_profile)
File "/home/matjaz/env/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 185, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/home/matjaz/env/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 249, in execute
self.error_handler.check_response(response)
File "/home/matjaz/env/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Unable to find a matching set of capabilities
unforunately... no one in my team can reproduce this issue
@mfin with geckodriver 0.16 and firefox 53?
On Arch linux with: python 3.6.1-1 firefox 53.0-1 geckodriver 0.16.0-1 python-selenium 3.4.0-1
@mfin's test produces the same result for me.
Traceback (most recent call last):
File "./test.py", line 5, in <module>
driver = webdriver.Firefox()
File "/usr/lib/python3.6/site-packages/selenium/webdriver/firefox/webdriver.py", line 152, in __init__
keep_alive=True)
File "/usr/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 98, in __init__
self.start_session(desired_capabilities, browser_profile)
File "/usr/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 185, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 249, in execute
self.error_handler.check_response(response)
File "/usr/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Unable to find a matching set of capabilities
@lmtierney yes. @thewinduppirate interesting, this looks to be Arch specific.
If I add the capabilities suggested by @jrbenny35, I get this:
Traceback (most recent call last):
File "test.py", line 8, in <module>
driver = webdriver.Firefox(capabilities=caps)
File "/home/matjaz/Playground/test/env/lib/python3.6/site-packages/selenium/webdriver/firefox/webdriver.py", line 169, in __init__
self.binary, timeout)
File "/home/matjaz/Playground/test/env/lib/python3.6/site-packages/selenium/webdriver/firefox/extension_connection.py", line 52, in __init__
self.binary.launch_browser(self.profile, timeout=timeout)
File "/home/matjaz/Playground/test/env/lib/python3.6/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 73, in launch_browser
self._wait_until_connectable(timeout=timeout)
File "/home/matjaz/Playground/test/env/lib/python3.6/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 114, in _wait_until_connectable
% (self.profile.path))
selenium.common.exceptions.WebDriverException: Message: Can't load the profile. Possible firefox version mismatch. You must use GeckoDriver instead for Firefox 48+. Profile Dir: /tmp/tmpvt157u03 If you specified a log_file in the FirefoxBinary constructor, check it for details.
@mfin That looks like an outdated firefox version error. That was my problem. I removed a line in my test and it was using FF47.
Same issue here, latest selenium, Firefox 53 (latest update today), geckodriver v0.16.0, MacOs (latest, updated)
Hi. I have the same issue with geckodriver v0.16.0, Firefox 52.0.2, Python 3.5.3 and selenium 3.4.0 on Fedora 25.
Same problem as @jricardo27:
>>> window.run_command('run_selenium')
11:23:09 DEBUG selenium.webdriver.remote.remote_connection:478 _request() POST http://127.0.0.1:1646/session {"capabilities": {"firstMatch": [], "alwaysMatch": {"acceptInsecureCerts": true, "browserName": "firefox"}}, "desiredCapabilities": {"acceptInsecureCerts": true, "browserName": "firefox"}}
11:23:10 DEBUG selenium.webdriver.remote.remote_connection:565 _request() Finished Request
Traceback (most recent call last):
File "D:\Sublime Text 3 x64\sublime_plugin.py", line 818, in run_
return self.run(edit)
File "D:\Sublime Text 3 x64\Data\Packages\TestPlugin\Selenium.py", line 26, in run
run_tests(self.view)
File "D:\Sublime Text 3 x64\Data\Packages\TestPlugin\Selenium.py", line 19, in run_tests
browser = webdriver.Firefox()
File "C:\Python36\Lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 152, in __init__
keep_alive=True)
File "C:\Python36\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 98, in __init__
self.start_session(desired_capabilities, browser_profile)
File "C:\Python36\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 185, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Python36\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 249, in execute
self.error_handler.check_response(response)
File "C:\Python36\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 194, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Unable to find a matching set of capabilities
Operating system and version: Windows 10 Enterprise LTSB 64-bit EN Python: 3.6.1 Selenium: 3.4.0 Firefox: 53.0 (64-bit) geckodriver: 0.16.0
Thanks.
For users experiencing this problem on Linux, can you tell me the following things:
which firefox
? file
on the output of the above? i.e. file $(which firefox)
.application.ini
and platfom.ini
file?I suspect that a short term workaround for the bug may be to pass in an explicit path to the Firefox binary, after following any symlinks, in the capabilities i.e. something like {moz:firefoxOptions: {binary: /usr/lib/firefox/firefox}
.
@jgraham firefox is in /bin, which is linked to /usr/bin, no *.ini files there also.
matjaz ~ $ which firefox
/bin/firefox
matjaz ~ $ file /bin/firefox
/bin/firefox: POSIX shell script, ASCII text executable
matjaz ~ $ ls -lah /bin
lrwxrwxrwx 1 root root 7 mar 26 23:57 /bin -> usr/bin
matjaz ~ $ ls /usr/bin/*.ini
/bin/ls: cannot access '/usr/bin/*.ini': No such file or directory
For me:
% which firefox
/usr/bin/firefox
% file$(which firefox)
/usr/bin/firefox: POSIX shell script, ASCII text executable
No *.ini files either.
OK, so we didn't consider the possibility of the firefox
executable being a shell script outside the firefox
directory. As a short term workaround, if you look in that shell script you should be able to find the real binary path and use that as a capability when you launch geckodriver.
@jgraham Thanks for the info.
Firefox now launches correctly after amending the test
#!/usr/bin/env python3
from selenium import webdriver
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
binary = FirefoxBinary('/usr/lib/firefox/firefox')
driver = webdriver.Firefox(firefox_binary=binary)
driver.get('https://google.com')
@jgraham yes, I'm confirming that this solves the issue.
Great! Thanks for the debugging information. I'll try to come up with a good solution for this and get a release of geckodriver out with it fixed.
Hi,
I've same issue with Python Selenium.
[=] FireFox: 52.1.0 - 64 bit [=] Selenium: 3.4.0 [=] Python: 2.7.13 [=] OS: Linux - (Kali 64 bit) - dist upgraded to latest version
output:
/usr/bin/python /root/Desktop/ashiyane/ashiyane-alimp5.py
Traceback (most recent call last):
File "/root/Desktop/ashiyane/ashiyane-alimp5.py", line 12, in
Process finished with exit code 1
please fix this issue :(
Thanks
I used technique below, and selenium is working now.
capabilities = webdriver.DesiredCapabilities().FIREFOX capabilities["marionette"] = False binary = FirefoxBinary(r'/usr/bin/firefox') driver = webdriver.Firefox(firefox_binary=binary, capabilities=capabilities)
Reference (Idea): http://seleniumsimplified.com/2017/03/changes-in-selenium-webdriver-3-1-0-3-2-0-3-3-0-and-3-3-1-for-java/
Thanks
geckodriver has been fixed (v0.16.1) and this issue is gone!
Yes, I was about to comment that we made a release to address this bug. Glad it helped :)
Hi,
Same issue for me , after upgrading to selenium 3.4, using Selenium Grid / Jenkins
Hub : Selenium Standalone Server V3.4.0 Node 1 : Selenium Standalone Server V3.4.0 - Win 7 - Selenium 3.4 - Firefox 53 (64 bit) - Geckodriver V16.1
It raised this error when i try to launch test with robotframework :
Parent suite setup failed: KeyError: 'moz:firefoxOptions'
it Works perfectly locally and worked perfectly with V3.3.1 / FF 52 / selenium 3.3.1
I have those error in Node Log :
geckodriver::marionette INFO Starting browser \?\C:\Program Files\Mozilla Firefox\firefox.exe with args ["-marionette"]
Executing: [delete session: 88be91e9-0535-4c5b-915c-b3fa60b52fbf]) Marionette INFO New connections will no longer be accepted
Selenium Standalone Server seems to be unstable, have to restart it every couple hours ?!
Thank's.
I had the following problems as others with geckodriver 0.16.0 from this link: https://github.com/mozilla/geckodriver/releases/download/v0.16.1/geckodriver-v0.16.1-linux64.tar.gz ( it stays that this is 0.16.1 but binary says 0.16.0) to work with 0.16.0 I had to use Firefox 52 ESR -> https://www.mozilla.org/en-US/firefox/organizations/faq/ and then
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
def setUp(self):
binary = FirefoxBinary('path-to-my-esr-firefox-binary/firefox/firefox-bin')
self.browser = webdriver.Firefox(firefox_binary=binary)
I was experiencing the same issue.
I downloaded my geckogriver from: https://github.com/mozilla/geckodriver/releases/download/v0.16.1/geckodriver-v0.16.1-linux64.tar.gz (same as @krzysztofzuraw), but my binary did say it was version 0.16.1 (geckodriver --version).
$ ls -l $(which firefox)
lrwxrwxrwx 1 root root 25 Feb 1 13:44 /usr/bin/firefox -> `../lib/firefox/firefox.sh`
Arch: linux (ubuntu 14.04) Python: 2.7.6 selenium: 3.4.0 firefox: 51.0.1
Running (either the commented code or) the normal code from:
from selenium import webdriver
#from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
#binary = FirefoxBinary('/usr/lib/firefox/firefox')
#driver = webdriver.Firefox(firefox_binary=binary)
driver = webdriver.Firefox()
driver.get("http://www.google.com")
print driver.title
driver.quit()
yields (at line 5 or 7)
Traceback (most recent call last):
File "./reproduce.py", line 7, in <module>
driver = webdriver.Firefox()
File "/home/user/.virtualenvs/sales/local/lib/python2.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 152, in __init__
keep_alive=True)
File "/home/user/.virtualenvs/sales/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 98, in __init__
self.start_session(desired_capabilities, browser_profile)
File "/home/user/.virtualenvs/sales/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 185, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/home/user/.virtualenvs/sales/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 249, in execute
self.error_handler.check_response(response)
File "/home/user/.virtualenvs/sales/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Unable to find a matching set of capabilities
However, following @alimp5's suggestion, the following code worked:
from selenium import webdriver
caps = webdriver.DesiredCapabilities.FIREFOX
caps["marionette"] = False
driver = webdriver.Firefox(capabilities=caps)
driver.get("http://www.google.com")
print driver.title
driver.quit()
Here: Arch: OSX ElCapitain 10.11.6 Python: 2.7.10 Selenium: 3.4.1 Firefox: 53.0 (64-bit)
Worked like a charm.
Exception in thread "main" org.openqa.selenium.WebDriverException: connection refused
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'KARTIK-PC', ip: '192.168.43.111', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_131'
Driver info: driver.version: FirefoxDriver
remote stacktrace: stack backtrace:
0: 0x489f6f -
I have the same problem with Selenium 3.4.0 under Debian Jessie, OpenJDK 1.8 update 111, Firefox ESR 45.9.0 (cannot switch to Firefox ESR 52.1.0 because it's not available for armhf yet) : http://stackoverflow.com/questions/43834782/selenium-firefox-driver-doesnt-seem-to-work-with-firefox-esr-under-debian-jessi
org.openqa.selenium.SessionNotCreatedException: Unable to find a matching set of capabilities Build info: version: 'unknown', revision: 'unknown', time: 'unknown' System info: host: 'A20-OLinuXino', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'arm', os.version: '3.4.103-00033-g9a1cd03-dirty', java.version: '1.8.0_111' Driver info: driver.version: FirefoxDriver remote stacktrace: stack backtrace: 0: 0xb6de95b3 - backtrace::backtrace::trace::h8166ac046b01de0f 1: 0xb6de9acb - backtrace::capture::Backtrace::new::hb5a725a088a2a2fc 2: 0xb6dab093 - geckodriver::marionette::MarionetteHandler::create_connection::h826627e00cb80122 3: 0xb6db30fb - >::handle_command::hea45c68e72b3846e 4: 0xb6da784f - webdriver::server::start::{{closure}}::h3085395b806d111c 5: 0xb6d79be3 - std::panicking::try::do_call::h86a6e0cb77ef092f 6: 0xb6f06157 - panic_unwind::__rust_maybe_catch_panic at /buildslave/rust-buildbot/slave/stable-dist-rustc-cross-host-linux/build/src/libpanic_unwind/lib.rs:98 7: 0xb6d8bc1f - >::call_box::h995a340dc6da2f87 8: 0xb6efff53 - alloc::boxed::{{impl}}::call_once<(),()> at /buildslave/rust-buildbot/slave/stable-dist-rustc-cross-host-linux/build/src/liballoc/boxed.rs:624
- std::sys_common::thread::start_thread at /buildslave/rust-buildbot/slave/stable-dist-rustc-cross-host-linux/build/src/libstd/sys_common/thread.rs:21
- std::sys::imp::thread::{{impl}}::new::thread_start at /buildslave/rust-buildbot/slave/stable-dist-rustc-cross-host-linux/build/src/libstd/sys/unix/thread.rs:84 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$new$0(W3CHandshakeResponse.java:57) at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$getResponseFunction$2(W3CHandshakeResponse.java:104) at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$22(ProtocolHandshake.java:365) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958) at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126) at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:464) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:368) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:159) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142) at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:637) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:250) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:236) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:137) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:191) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:108) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:137)
How can I make it work? When I use Selenium 2.53.0, it doesn't work.
You can try this code:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Firefox()
driver.get("https://kambhd.aka.corp.amazon.com:8443/launcher")
elem = driver.find_element_by_id("AccountId")
print elem
I got the error when i used to open using the binary. binary = FirefoxBinary('C:\Program Files (x86)\Mozilla Firefox\firefox.exe') driver = webdriver.Firefox(firefox_binary=binary) *** selenium.common.exceptions.WebDriverException: Message: Unable to find a matching set of capabilities
However, if i remove the firefox_binary argument, it worked. So use it like the following. driver = webdriver.Firefox()
Firefox 45.9.0
driver = webdriver.Firefox()
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/webdriver.py", line 152, in __init__
keep_alive=True)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 98, in __init__
self.start_session(desired_capabilities, browser_profile)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 188, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 252, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Unable to find a matching set of capabilities
Operating system and version: OSX 10.10.5 Java: 8 Selenium: 3.4.0 Firefox: 53.0.3 (64-bit) geckodriver: 0.16.1
Code: package basics; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver;
public class lunchbro { public static void main(String[] args) { // TODO Auto-generated method stub System.setProperty("webdriver.gecko.driver","/Users/anuj/Downloads/geckodriver"); WebDriver driver = new FirefoxDriver(); driver.get("http://google.com"); } }
Getting below error: 1495337441832 geckodriver INFO Listening on 127.0.0.1:34375 1495337442089 geckodriver::marionette INFO Starting browser /Applications/Firefox.app/Contents/MacOS/firefox-bin with args ["-marionette"] 1495337443937 Marionette INFO Listening on port 49599 May 20, 2017 11:30:44 PM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Detected dialect: W3C 2017-05-20 23:30:44.477 plugin-container[437:13096] CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x4e3f, name = 'com.apple.tsm.portname' See /usr/include/servers/bootstrap_defs.h for the error codes. 2017-05-20 23:30:44.478 plugin-container[437:13096] CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x8c43, name = 'com.apple.CFPasteboardClient' See /usr/include/servers/bootstrap_defs.h for the error codes. 2017-05-20 23:30:44.478 plugin-container[437:13096] Failed to allocate communication port for com.apple.CFPasteboardClient; this is likely due to sandbox restrictions
Solved for MacOS:
from selenium import webdriver from selenium.webdriver.firefox.firefox_binary import FirefoxBinary binary = FirefoxBinary('/Applications/Firefox.app/Contents/MacOS/firefox-bin') driver = webdriver.Firefox(executable_path = "/usr/local/bin/geckodriver") driver.get("http://www.google.com") print driver.title driver.quit()
You had to use the Expected Firefox location from here: https://github.com/SeleniumHQ/selenium/wiki/FirefoxDriver
Good luck!
@HashBreakerPC I was getting the same error last night. Try out my code above and see if it works for you.
@JerryShih @aethanyc @moz-v2v-gh @xeonchen
Are we going to get a new geckodriver release addressing this issue? The Selenium-Python Tests keeps failing with geckodriver v0.16.1.
Thanks
Just anecdotal. I had a problem running my app so I tried it in Visual Studio (C# bindings) and it failed but when I stepped through it worked and then continued to work. Why? Not sure. Could be that Firefox has an initialization in the background or ??? as I said. Just anecdotal. Geckodriver 5/4/2017 Firebox 53. The problem started after I ran Firefox as after using Chrome for a while so maybe it triggered an auto-upgrade.
webdriver 3.4.0 geckodrover 16.0 firefox 52.0
Still gettin gthe error
Exception in thread "main" java.lang.IllegalStateException: 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 com.google.common.base.Preconditions.checkState(Preconditions.java:738)
at
org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:124)
at
org.openqa.selenium.firefox.GeckoDriverService.access$100(GeckoDriverService.java:41)
at
org.openqa.selenium.firefox.GeckoDriverService$Builder.findDefaultExecutable(GeckoDriverService.java:115)
at
org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:330)
at
org.openqa.selenium.firefox.FirefoxDriver.toExecutor(FirefoxDriver.java:207)
at org.openqa.selenium.firefox.FirefoxDriver.
On Wed, May 31, 2017 at 2:15 AM, Bob Frankston notifications@github.com wrote:
Just anecdotal. I had a problem running my app so I tried it in Visual Studio (C# bindings) and it failed but when I stepped through it worked and then continued to work. Why? Not sure. Could be that Firefox has an initialization in the background or ??? as I said. Just anecdotal. Geckodriver 5/4/2017 Firebox 53. The problem started after I ran Firefox as after using Chrome for a while so maybe it triggered an auto-upgrade.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SeleniumHQ/selenium/issues/3884#issuecomment-305002803, or mute the thread https://github.com/notifications/unsubscribe-auth/Aa8uFy1o7bkAFGNdL98HyZfCo63BakNFks5r_H_7gaJpZM4NFliF .
Maybe you should Chrome. I use Google Chrome with chromedriver. It's fine
driver = webdriver.Chrome()
I think the issue would be mismatch between the geckodriver (32/64) and the firefox. that was it for me and making sure both are of the same bit type (32/64) worked for me.
selenium.common.exceptions.WebDriverException: Message: Unable to find a matching set of capabilities I am getting the same issue with firefox 54.0, selenium 3.4.3, gecko driver .17 and python 2.7
if name == 'main': driver=webdriver.Firefox(executable_path=r'/home/saurabh/Saurabh/LearnPython/Automation/geckodriver');
Traceback (most recent call last):
File "/home/saurabh/Saurabh/LearnPython/Automation/Demo.py", line 5, in
I'm found something strange. This bug is reproducing for me when I'm call test suite from Cron but when I'm call test suite from terminal it's work normal. I'm found in node log that java RemoteDriver called from cron add to my capability "acceptInsecureCerts=true" and when this option is on then the suite crash. I've use single node with new driver and correct Firefox version.
org.openqa.selenium.WebDriverException: Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
Same issue on a Raspberry PI Zero W. Latest Firefox-esr, latest Selenium, self compiled geckodriver from latest source 1.7.
Any hint? I tried the suggestions but the problem remains.
OS: Ubuntu Selenium Version: 3.4.0 Browser: Firefox 45 Geckodriver: 0.16.0
Hi, After updating to Selenium 3.4.0 it can't start Firefox:
-------- Using Firefox 45 due to click not working on newer versions (https://github.com/mozilla/geckodriver/issues/322) --------