Issue
When establishing remote webdriver connection via https:
self.driver = webdriver.Remote(command_executor='https://' + settings.BROWSERSTACK_USERNAME + ':' + settings.BROWSERSTACK_KEY + '@hub-cloud.browserstack.com/wd/hub', desired_capabilities=desired_cap)
This error message pops up:
MaxRetryError: HTTPSConnectionPool(host='hub-cloud.browserstack.com', port=443): Max retries exceeded with url: /wd/hub/session (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')],)",),))
From Browserstack's FAQ:
My firewall/IDP/proxy is rejecting SSL/HTTPS content from BrowserStack.com This could be because of a missing certificate chain due to which your firewall/IDP/proxy may not recognize, or block the SSL/HTTPS content. This usually happens if your firewall/IDP/proxy is not updated regularly. In this case please install the ValiCert Legacy Certificate Chain from the GoDaddy repository and try again.
Am I on the right track? (Following Browserstack's FAQ)
*OS: Fedora-30
Thank you in advance for any help....
Solution
You could try changing the Hub URL from HTTPS to HTTP or whitelist *.browserstack.com over ports 80 and 443 over your network.
Answered By - HN17 Answer Checked By - Marie Seifert (WPSolving Admin)