Unable to find a matching set of capabilities - Gecko 0.19.1, Ubuntu 16, FF 58, Selenium 3.9.0
System
- Version: 0.19.1
- Platform: Ubuntu 16 (heroku-16)
- Firefox: 58.0.1
- Selenium: Python 3.9.0
Testcase
It crashes on driver = webdriver.Firefox()
PATH=/app/.heroku/python/bin:/usr/local/bin:/usr/bin:/bin:/app/vendor/firefox:/app/vendor/firefox:/app/vendor/geckodriver:/app/vendor/phantomjs/bin as per https://github.com/mozilla/geckodriver/issues/1119
Not loading any capability or whatsoever.
Stacktrace
SessionNotCreatedException: Message: Unable to find a matching set of capabilities
POST http://127.0.0.1:50565/session {"desiredCapabilities": {"browserName": "firefox", "acceptInsecureCerts": true}, "capabilities": {"firstMatch": [{}], "alwaysMatch": {"browserName": "firefox", "acceptInsecureCerts": true}}}
Please provide a trace log as requested when filing an issue. Without it there is nothing we can help with. Please see https://firefox-source-docs.mozilla.org/testing/geckodriver/geckodriver/TraceLogs.html in how to do that. Thanks.
I am getting the same behavior.
I am also seeing this issue. I tried to get a trace log, however for some reason nothing populates in the log file.
selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities
We’re unable to provide any useful feedback without a trace-level log. By default this is written to stdout, but may of course be redirected by the client you use. Read more about reporting actionable bugs in our contribution guidelines.
@Beherrit @JonathanSeguin @bkovacev One possible reason for getting the generic SessionNotCreatedException is when geckodriver can't find the Firefox binary.
Are you sure Firefox is installed? or maybe installed, but in a non-standard location that is not on your PATH?
Here is an attempt to Launch Firefox on a machine with geckodriver installed, but not Firefox:
$ which firefox
which: no firefox in ... [snip]
$ python3
>>> from selenium import webdriver
>>> driver = webdriver.Chrome()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.6/site-packages/selenium/webdriver/firefox/webdriver.py", line 158, in __init__
keep_alive=True)
File "/usr/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 154, in __init__
self.start_session(desired_capabilities, browser_profile)
File "/usr/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 243, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 312, in execute
self.error_handler.check_response(response)
File "/usr/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 237, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities
Ends up I had a mangled Firefox install (I made a mistake linking the libs in /usr/lib/firefox when doing a manual install). Sorry for the noise!
That was the exact case for me and I just didn't have the time to update the question, sorry.
Firefox installation was not present. After I've gotten Firefox to install, a lot of libraries were missing so after trying for 3 days to get it right on heroku's heroku-16 stack I gave up and switched to PhantomJS and just adjusted my scrapper to work with it.
On Tue, Feb 20, 2018 at 3:12 PM, Jonathan Séguin [email protected] wrote:
Ends up I had a mangled Firefox install (I made a mistake linking the libs in /usr/lib/firefox when doing a manual install). Sorry for the noise!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mozilla/geckodriver/issues/1178#issuecomment-366989037, or mute the thread https://github.com/notifications/unsubscribe-auth/AFL9_M9MPic_5qYBLF5wxBdeHfZeV7Opks5tWtK-gaJpZM4SHBW3 .
Well it would appear reinstalling Firefox did the trick for me. Not sure why I got the problem to begin with since everything was working until I downloaded .19 Gecko. All is good now though. Funky stuff!
Thanks!
This is essentially a duplicate of https://github.com/mozilla/geckodriver/issues/832, to provide better error messages from New Session.
I also found this error how to solve SessionNotCreatedException: Message: Unable to find a matching set of capabilities this error.