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

Chrome 83 is not supported #119

Closed
davidcarvalho opened this issue May 28, 2020 · 15 comments
Closed

Chrome 83 is not supported #119

davidcarvalho opened this issue May 28, 2020 · 15 comments

Comments

@davidcarvalho
Copy link

davidcarvalho commented May 28, 2020

Hello,

OS: Windows
Browser: chrome 83
webdriver-manager: 2.5.2

The tests are failing with the below error:

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 81

@SergeyPirogov
Copy link
Owner

Please show me log output

@davidcarvalho
Copy link
Author

I also should mention that the same issue is being reported in webdriver-manager java version: bonigarcia/webdrivermanager#486

@SergeyPirogov
Copy link
Owner

SergeyPirogov commented May 28, 2020

@davidcarvalho Please show me log output from your console.
I have a big bunch of tests that say that everything is green https://travis-ci.org/github/SergeyPirogov/webdriver_manager/builds/692130159

@davidcarvalho
Copy link
Author

davidcarvalho commented May 28, 2020

test_case = TestCase(name='test_google_keep', file_path='C:\\Users\\David.Carvalho\\Desktop\\dev\\python-autobots/test_results/test_google_keep', logger=<pylenium.logging.Logger object at 0x0000018F89CF7610>)
py_config = PyleniumConfig(driver=DriverConfig(browser='chrome', remote_url='', wait_time=10, page_load_wait_time=0, options=[], c...creenshots_on=True), viewport=ViewportConfig(maximize=True, width=1440, height=900, orientation='portrait'), custom={})
request = <SubRequest 'py' for <Function test_google_keep>>

    @pytest.fixture(scope='function')
    def py(test_case, py_config, request):
        """ Initialize a Pylenium driver for each test.
    
        Pass in this `py` fixture into the test function.
    
        Examples:
            def test_go_to_google(py):
                py.visit('https://google.com')
                assert 'Google' in py.title
        """
>       py = Pylenium(py_config, test_case.logger)

..\conftest.py:182: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
..\venv\lib\site-packages\pylenium\driver.py:195: in __init__
    self._webdriver = webdriver_factory.build_from_config(config)
..\venv\lib\site-packages\pylenium\webdriver_factory.py:114: in build_from_config
    return build_chrome(config.driver.version, config.driver.options, config.driver.experimental_options, config.driver.extension_paths)
..\venv\lib\site-packages\pylenium\webdriver_factory.py:143: in build_chrome
    return webdriver.Chrome(ChromeDriverManager(version=version).install(), options=options)
..\venv\lib\site-packages\selenium\webdriver\chrome\webdriver.py:76: in __init__
    RemoteWebDriver.__init__(
..\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py:157: in __init__
    self.start_session(capabilities, browser_profile)
..\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py:252: in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
..\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute
    self.error_handler.check_response(response)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x0000018F89F5B9A0>
response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: Chrome failed to start: exited n...\n\\tRtlGetAppContainerNamedObjectPath [0x773E66DD+237]\\n\\tRtlGetAppContainerNamedObjectPath [0x773E66AD+189]\\n"}}'}

    def check_response(self, response):
        """
        Checks that a JSON response from the WebDriver does not have an error.
    
        :Args:
         - response - The JSON response from the WebDriver server as a dictionary
           object.
    
        :Raises: If the response contains an error message.
        """
        status = response.get('status', None)
        if status is None or status == ErrorCode.SUCCESS:
            return
        value = None
        message = response.get("message", "")
        screen = response.get("screen", "")
        stacktrace = None
        if isinstance(status, int):
            value_json = response.get('value', None)
            if value_json and isinstance(value_json, basestring):
                import json
                try:
                    value = json.loads(value_json)
                    if len(value.keys()) == 1:
                        value = value['value']
                    status = value.get('error', None)
                    if status is None:
                        status = value["status"]
                        message = value["value"]
                        if not isinstance(message, basestring):
                            value = message
                            message = message.get('message')
                    else:
                        message = value.get('message', None)
                except ValueError:
                    pass
    
        exception_class = ErrorInResponseException
        if status in ErrorCode.NO_SUCH_ELEMENT:
            exception_class = NoSuchElementException
        elif status in ErrorCode.NO_SUCH_FRAME:
            exception_class = NoSuchFrameException
        elif status in ErrorCode.NO_SUCH_WINDOW:
            exception_class = NoSuchWindowException
        elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
            exception_class = StaleElementReferenceException
        elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
            exception_class = ElementNotVisibleException
        elif status in ErrorCode.INVALID_ELEMENT_STATE:
            exception_class = InvalidElementStateException
        elif status in ErrorCode.INVALID_SELECTOR \
                or status in ErrorCode.INVALID_XPATH_SELECTOR \
                or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
            exception_class = InvalidSelectorException
        elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
            exception_class = ElementNotSelectableException
        elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE:
            exception_class = ElementNotInteractableException
        elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
            exception_class = InvalidCookieDomainException
        elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
            exception_class = UnableToSetCookieException
        elif status in ErrorCode.TIMEOUT:
            exception_class = TimeoutException
        elif status in ErrorCode.SCRIPT_TIMEOUT:
            exception_class = TimeoutException
        elif status in ErrorCode.UNKNOWN_ERROR:
            exception_class = WebDriverException
        elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
            exception_class = UnexpectedAlertPresentException
        elif status in ErrorCode.NO_ALERT_OPEN:
            exception_class = NoAlertPresentException
        elif status in ErrorCode.IME_NOT_AVAILABLE:
            exception_class = ImeNotAvailableException
        elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
            exception_class = ImeActivationFailedException
        elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
            exception_class = MoveTargetOutOfBoundsException
        elif status in ErrorCode.JAVASCRIPT_ERROR:
            exception_class = JavascriptException
        elif status in ErrorCode.SESSION_NOT_CREATED:
            exception_class = SessionNotCreatedException
        elif status in ErrorCode.INVALID_ARGUMENT:
            exception_class = InvalidArgumentException
        elif status in ErrorCode.NO_SUCH_COOKIE:
            exception_class = NoSuchCookieException
        elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN:
            exception_class = ScreenshotException
        elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED:
            exception_class = ElementClickInterceptedException
        elif status in ErrorCode.INSECURE_CERTIFICATE:
            exception_class = InsecureCertificateException
        elif status in ErrorCode.INVALID_COORDINATES:
            exception_class = InvalidCoordinatesException
        elif status in ErrorCode.INVALID_SESSION_ID:
            exception_class = InvalidSessionIdException
        elif status in ErrorCode.UNKNOWN_METHOD:
            exception_class = UnknownMethodException
        else:
            exception_class = WebDriverException
        if value == '' or value is None:
            value = response['value']
        if isinstance(value, basestring):
            if exception_class == ErrorInResponseException:
                raise exception_class(response, value)
            raise exception_class(value)
        if message == "" and 'message' in value:
            message = value['message']
    
        screen = None
        if 'screen' in value:
            screen = value['screen']
    
        stacktrace = None
        if 'stackTrace' in value and value['stackTrace']:
            stacktrace = []
            try:
                for frame in value['stackTrace']:
                    line = self._value_or_default(frame, 'lineNumber', '')
                    file = self._value_or_default(frame, 'fileName', '<anonymous>')
                    if line:
                        file = "%s:%s" % (file, line)
                    meth = self._value_or_default(frame, 'methodName', '<anonymous>')
                    if 'className' in frame:
                        meth = "%s.%s" % (frame['className'], meth)
                    msg = "    at %s (%s)"
                    msg = msg % (meth, file)
                    stacktrace.append(msg)
            except TypeError:
                pass
        if exception_class == ErrorInResponseException:
            raise exception_class(response, message)
        elif exception_class == UnexpectedAlertPresentException:
            alert_text = None
            if 'data' in value:
                alert_text = value['data'].get('text')
            elif 'alert' in value:
                alert_text = value['alert'].get('text')
            raise exception_class(message, screen, stacktrace, alert_text)
>       raise exception_class(message, screen, stacktrace)
E       selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited normally.
E         (unknown error: DevToolsActivePort file doesn't exist)
E         (The process started from chrome location C:\Program Files (x86)\Google\Chrome\Application\chrome.exe is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

..\venv\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException
---------------------------- Captured stderr setup ----------------------------
[WDM] - Looking for [chromedriver 81.0.4044.138 win32] driver in cache 
[WDM] - File found in cache by path [C:\Users\David.Carvalho\.wdm\drivers\chromedriver\81.0.4044.138\win32\chromedriver.exe]
----------------------------- Captured log setup ------------------------------
INFO     WDM:logger.py:22 Looking for [chromedriver 81.0.4044.138 win32] driver in cache 
INFO     WDM:logger.py:12 File found in cache by path [C:\Users\David.Carvalho\.wdm\drivers\chromedriver\81.0.4044.138\win32\chromedriver.exe]
=========================== short test summary info ===========================
ERROR test_challenge100.py::test_google_keep - selenium.common.exceptions.Web...
============================== 1 error in 6.90s ===============================

@davidcarvalho
Copy link
Author

Could your tests be passing because your browser version is 81 and not 83?
This issue does not appear if I downgrade by chrome browser to v81

@SergeyPirogov
Copy link
Owner

@davidcarvalho Can you please execute this command in your cmd?

reg query "HKEY_CURRENT_USER\Software\Google\Chrome\BLBeacon" /v version

It has to print the Chrome version. We use it to retrieve data from the system

Repository owner deleted a comment from davidcarvalho May 28, 2020
@davidcarvalho
Copy link
Author

davidcarvalho commented May 28, 2020

C:\Users\David.Carvalho>reg query "HKEY_CURRENT_USER\Software\Google\Chrome\BLBeacon" /v version

HKEY_CURRENT_USER\Software\Google\Chrome\BLBeacon
    version    REG_SZ    83.0.4103.61

@SergeyPirogov
Copy link
Owner

@davidcarvalho Please try to remove file USER_HOME/.wdm/drivers.json

@davidcarvalho
Copy link
Author

It worked thank you.
You are awesome!!!

Closing issue

@rshidling
Copy link

rshidling commented Jun 1, 2020

We still facing the same issue ! How did you make it work? We don't find .wdm folder in users folder.
OS: Windows
Browser: chrome 83
webdriver-manager: 3.7

@SergeyPirogov
Copy link
Owner

@rshidling There is no such webdriver_manager version 3.7
See https://github.com/SergeyPirogov/webdriver_manager/releases

Also please send console logs.

@davidcarvalho
Copy link
Author

[WDM] - Looking for [chromedriver 81.0.4044.138 win32] driver in cache [WDM] - File found in cache by path [C:\Users\username>\.wdm\drivers\chromedriver\81.0.4044.138\win32\chromedriver.exe]

@rshidling look for logs like above when you run your test. Delete that folder and then try again.

@ghost
Copy link

ghost commented Jul 10, 2020

what about Linux users for chrome 83? where i can find the path?

@sarthikb
Copy link

sarthikb commented Aug 4, 2020

    cmd = cmd_mapping[browser_type][os_name()]
    stdout = os.popen(cmd).read()
    version = re.search(pattern, stdout)
    if not version:
      raise ValueError(f'Could not get version for Chrome with this command: {cmd}')

E ValueError: Could not get version for Chrome with this command: reg query "HKEY_CURRENT_USER\Software\Google\Chrome\BLBeacon" /v version

Same issue is seen while using chrome 84 and webdriver manager 3.2.1.

Can someone look at it?

@studioj
Copy link

studioj commented Apr 14, 2021

this reg query "HKEY_CURRENT_USER\Software\Google\Chrome\BLBeacon" /v version ONLY works if chrome has started at least once... important to know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants