Getting error with Chrome browser in selenium library

9,355 views
Skip to first unread message

Varun

unread,
Nov 20, 2023, 5:08:19 AM11/20/23
to robotframework-users
Hi All,

Getting below error with Chrome 119 browser version, Please suggest resolution.

L

SessionNotCreatedException: Message: session not created: Chrome failed to start: exited normally. (session not created: DevToolsActivePort file doesn't exist) (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.) Stacktrace: GetHandleVerifier [0x00007FF6EABA82B2+55298] (No symbol) [0x00007FF6EAB15E02] (No symbol) [0x00007FF6EA9D05AB] (No symbol) [0x00007FF6EA9FDCD8] (No symbol) [0x00007FF6EA9FB30E] (No symbol) [0x00007FF6EAA3A198] (No symbol) [0x00007FF6EAA39CB0] (No symbol) [0x00007FF6EAA31E83] (No symbol) [0x00007FF6EAA0670A] (No symbol) [0x00007FF6EAA07964] GetHandleVerifier [0x00007FF6EAF20AAB+3694587] GetHandleVerifier [0x00007FF6EAF7728E+4048862] GetHandleVerifier [0x00007FF6EAF6F173+4015811] GetHandleVerifier [0x00007FF6EAC447D6+695590] (No symbol) [0x00007FF6EAB20CE8] (No symbol) [0x00007FF6EAB1CF34] (No symbol) [0x00007FF6EAB1D062] (No symbol) [0x00007FF6EAB0D3A3] BaseThreadInitThunk [0x00007FFF8BDD7344+20] DummyExport [0x00007FFF523F09AE+55806] RtlUserThreadStart [0x00007FFF8D9426B1+33]

Gabriela Anselmo

unread,
Nov 20, 2023, 5:59:46 PM11/20/23
to robotframework-users

It looks like you're encountering a SessionNotCreatedException with Selenium and Chrome. This is often related to compatibility or configuration issues. Here's a quick tip to potentially resolve the problem:

1. Check ChromeDriver Compatibility: Ensure that your ChromeDriver version is compatible with your installed version of the Chrome browser. Mismatches between these versions often cause such issues.

2. Verify Chrome's Path: Double-check that the path to the Chrome executable is correct in your Selenium script. The error message you provided suggests ChromeDriver is attempting to access Chrome from a specific path.

3.Update Your Tools: If you haven't already, update both Chrome and ChromeDriver to their latest versions. This can resolve many known issues.

Varun Jain

unread,
Nov 21, 2023, 6:07:34 AM11/21/23
to gabriela...@gmail.com, robotframework-users
Hi,

My issue is still not resolved, kindly help further. I am using windows.
My chrome version is Version 119.0.6045.160 (Official Build) (64-bit)
I have downloaded Chrome driver from this link: https://googlechromelabs.github.io/chrome-for-testing/
Stable119.0.6045.105r1204232
I have downloaded this chrome driver and placed exe at this path:
C:\Program Files\Python310\Lib\site-packages

Please suggest quickly if something is wrong.

Regards
Varun

--
You received this message because you are subscribed to a topic in the Google Groups "robotframework-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/robotframework-users/4iyQGFQHEx4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to robotframework-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/robotframework-users/9b3bf8fd-875a-4b59-9b78-c57f83372548n%40googlegroups.com.

Nkina Ramonyai

unread,
Nov 21, 2023, 6:56:53 AM11/21/23
to varun.i...@gmail.com, gabriela...@gmail.com, robotframework-users
Hi Varun

The chrome driver must be in Python Scripts folder.
Try coping the chrome driver to this location:
C:\Program Files\Python310\Scripts

Hope that helps!.

Thanks,

Kind regards
Nkina
 
 




You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/robotframework-users/CAPKirPAnN09Uyuh5TwznAHzNoEWK%2BDuqA5XpmbEg984C-TUnFA%40mail.gmail.com.

Varun Jain

unread,
Nov 21, 2023, 8:22:45 AM11/21/23
to Nkina Ramonyai, gabriela...@gmail.com, robotframework-users
Hi

Issue is still not resolved, I have tried placing extracted zip file of chrome driver as follows & added below path in environment variables
C:\Program Files\Python310\Scripts\chrome-win64\chrome.exe
If I launch this chrome.exe manually then chrome browser opens fine(attached screenshot) but getting error when launching through python:(attached screenshot)
Please help me fast guys, It's really strange that no one has confirmed that chromedriver works fine on latest version of chrome  Version 119.0.6045.160 (Official Build) (64-bit)
image.png

image.png

image.png

Hélio Guilherme

unread,
Nov 21, 2023, 8:45:15 AM11/21/23
to robotframework-users
We assume that you are using Robot Framework and SeleniumLibrary, not directly calling selenium from Python.

From the error logs we can see that the path to chrome executable is not correctly set. For example, you have " C:\Program Files (x86)\Google\Chrome\Application\chrome.exe is no longer running"
Try to use a simple Robot Framework/Selenium Library test case.


Varun Jain

unread,
Nov 21, 2023, 11:15:14 AM11/21/23
to robotframework-users
Hi All,
Now chrome is getting launched, next step not proceeding:

image.png
Please suggest >>> from selenium import webdriver
>>> driver = webdriver.Chrome()

DevTools listening on ws://127.0.0.1:56413/devtools/browser/b513b5aa-4309-43a1-a486-3c97ec40fc21
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\varun.jain\AppData\Roaming\Python\Python310\site-packages\selenium\webdriver\chrome\webdriver.py", line 45, in __init__
    super().__init__(
  File "C:\Users\varun.jain\AppData\Roaming\Python\Python310\site-packages\selenium\webdriver\chromium\webdriver.py", line 56, in __init__
    super().__init__(
  File "C:\Users\varun.jain\AppData\Roaming\Python\Python310\site-packages\selenium\webdriver\remote\webdriver.py", line 205, in __init__
    self.start_session(capabilities)
  File "C:\Users\varun.jain\AppData\Roaming\Python\Python310\site-packages\selenium\webdriver\remote\webdriver.py", line 289, in start_session
    response = self.execute(Command.NEW_SESSION, caps)["value"]
  File "C:\Users\varun.jain\AppData\Roaming\Python\Python310\site-packages\selenium\webdriver\remote\webdriver.py", line 344, in execute
    self.error_handler.check_response(response)
  File "C:\Users\varun.jain\AppData\Roaming\Python\Python310\site-packages\selenium\webdriver\remote\errorhandler.py", line 229, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: DevToolsActivePort file doesn't exist
Stacktrace:
        GetHandleVerifier [0x00007FF6224E82B2+55298]
        (No symbol) [0x00007FF622455E02]
        (No symbol) [0x00007FF6223105AB]
        (No symbol) [0x00007FF622342CD0]
        (No symbol) [0x00007FF62233EE05]
        (No symbol) [0x00007FF62233B30E]
        (No symbol) [0x00007FF62237A198]
        (No symbol) [0x00007FF622379CB0]
        (No symbol) [0x00007FF622371E83]
        (No symbol) [0x00007FF62234670A]
        (No symbol) [0x00007FF622347964]
        GetHandleVerifier [0x00007FF622860AAB+3694587]
        GetHandleVerifier [0x00007FF6228B728E+4048862]
        GetHandleVerifier [0x00007FF6228AF173+4015811]
        GetHandleVerifier [0x00007FF6225847D6+695590]
        (No symbol) [0x00007FF622460CE8]
        (No symbol) [0x00007FF62245CF34]
        (No symbol) [0x00007FF62245D062]
        (No symbol) [0x00007FF62244D3A3]
        BaseThreadInitThunk [0x00007FFF8BDD7344+20]
        RtlUserThreadStart [0x00007FFF8D9426B1+33]

>>>

Varun Jain

unread,
Nov 22, 2023, 12:10:26 AM11/22/23
to robotframework-users
Hi

My Robotframework selenium scripts working fine on Firefox, I have to execute scripts on Chrome as well.
I am able to launch Chrome but browser is displaying not secure where url needs to be put, and it's not launching url it self.
Please suggest quickly, once url is launched then execution will run smoothly. Is there any setting in Chrome browser needs to be done to launch url?
image.png

Varun

unread,
Nov 22, 2023, 10:27:03 AM11/22/23
to robotframework-users
Hi All,

I am getting below error when launching url on Chrome through Robotframework selenium:

SessionNotCreatedException: Message: session not created: DevToolsActivePort file doesn't exist

Please suggest how to resolve it. I have to just launch url as once it is done remaining code will work fine (already working fine for Firefox)

open browser ${mm_url} Chrome

Guys, please help me quickly.

Thanks
Varun

villen

unread,
Nov 22, 2023, 5:29:56 PM11/22/23
to varun.i...@gmail.com, robotframework-users
Hi Varun,

Please keep the chrome driver file in scripts folder instead of scripts/win_64 folder 

Thanks,
Aditya

Varun

unread,
Nov 23, 2023, 2:56:30 AM11/23/23
to robotframework-users
Hi,

Thank you very much for your responses. I am putting here final solution so that in case anyone else having similar issue may quickly fix it.

${chrome_options} = Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys, selenium.webdriver
Call Method ${chrome_options} add_argument headless
Call Method ${chrome_options} add_argument disable-gpu
${options}= Call Method ${chrome_options} to_capabilities
open browser ${vr_url} chrome options=${chrome_options}

Thanks!
Reply all
Reply to author
Forward
0 new messages