Selenium 3.4.0 Unable to find matching capabilities
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:
File "/root/venv/3.5/lib/python3.5/site-packages/selenium/webdriver/firefox/webdriver.py", line 152, in __init__
keep_alive=True)
File "/root/venv/3.5/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 98, in __init__
self.start_session(desired_capabilities, browser_profile)
File "/root/venv/3.5/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 185, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/root/venv/3.5/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py", line 249, in execute
self.error_handler.check_response(response)
File "/root/venv/3.5/lib/python3.5/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
-------- Using Firefox 45 due to click not working on newer versions (https://github.com/mozilla/geckodriver/issues/322) --------
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
Environment
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:
- What's the firefox path i.e. the result of runing
which firefox? - What's the result of running
fileon the output of the above? i.e.file $(which firefox). - Does the directory containing the firefox binary (after following any symlinks) contain an
application.iniandplatfom.inifile? - What's the contents of the above files?
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