I am trying to launch chrome with an URL, the browser launches and it does nothing after that.
I am seeing the below error after 1 minute:
Unable to open browser with url: 'https://www.google.com' (Root cause: org.openqa.selenium.WebDriverException: unknown error: DevToolsActivePort file doesn't exist
(Driver info: chromedriver=2.39.562718 (9a2698cba08cf5a471a29d30c8b3e12becabb0e9),platform=Windows NT 10.0.15063 x86_64) (WARNING: The server did not provide any stacktrace information)
My configuration:
Chrome : 66 ChromeBrowser : 2.39.56
P.S everything works fine in Firefox
I had the same issue, but in my case chrome previously was installed in user temp folder, after that was reinstalled to Program files. So any of solution provided here was not help me. But if provide path to chrome.exe all works:
I hope this helps someone =)
Update:
I am able to get through the issue and now I am able to access the chrome with desired url.
Results of trying the provided solutions:
I tried all the settings as provided above but I was unable to resolve the issue
Explanation regarding the issue:
As per my observation DevToolsActivePort file doesn't exist is caused when chrome is unable to find its reference in scoped_dirXXXXX folder.
Steps taken to solve the issue
Added the below code to invoke the chrome
Using the above steps I was able to resolve the issue.
Thanks for your answers.
In my case it happened when I've tried to use my default user profile:
This triggered chrome to reuse processes already running in background, in such a way, that process started by chromedriver.exe was simply ended.
Resolution: kill all chrome.exe processes running in background.
In my case, I was trying to create a runnable jar on Windows OS with chrome browser and want to run the same on headless mode in unix box with CentOs on it. And I was pointing my binary to a driver that I have downloaded and packaged with my suite. For me, this issue continue to occur irrespective of adding the below:
Solution that I've tried and worked for me is, download the chrome and its tools on the host VM/Unix box, install and point the binary to this in the automation suite and bingo! It works :)
Download command: wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
Install command: sudo yum install -y ./google-chrome-stable_current_*.rpm
Update suite with below binary path of google-chrome: options.setBinary("/opt/google/chrome/google-chrome");
And.. it works!
I solve this problem by installing
yum -y install gtk3-devel gtk3-devel-docs
", it works okMy work env is :
Before:
After:
I had the same problem in python. The above helped. Here is what I used in python -