Selenium issue with Chrome Browser - unknown error: DevToolsActivePort file doesn't exist

26,024 vistas
Ir al primer mensaje no leído

Suma latha

no leída,
21 abr 2020, 4:14:15 a.m.21/4/2020
para seleniu...@googlegroups.com

Hi All,

 

I am facing  the below issue when trying with chrome browser, tried many different options but didn’t work.

 

Please scroll below for  stack trace.

 

Error:

Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: crashed.

  (unknown error: 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.)

Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48'

System info: host: 'BLRWX11704', ip: '10.31.70.202', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_151'

Driver info: driver.version: ChromeDriver

 

Please suggest how to resolve this.

 

 

Please find below details

 

Here is the details on the issue I am facing .

 

OS – Windows 10

Java – 64 bit JDK 1.8.0_241 and JRE 1.8.0_241

Eclipse Photon IDE
selenium – 3.141.59

Chrome Browser Version - 81.0.4044.113 (Official Build) (64-bit)

Chrome Driver Version - 81.0.4044.69

 

Below are the different steps tried, for resolving the issue, but no luck.

 

Step1 :

re-installing chrome , clearing all chrome data from my PC,and re mapping all the selenium jar files

 

Step2:

copy chromediver.exe in source folder, so that we no need to give path

 

Step3:

Add chromedriver.exe and chrome.exe path in System path variables under environment variable

 

Step4:

Tried of  couple of Chrome options like adding chrome browser binary path ,useautomationExtension  in script code as below

ChromeOptions options = new ChromeOptions();

options.setBinary("C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe");

options.setExperimentalOption("useAutomationExtension", false);

WebDriver driver = new ChromeDriver(options);

 

Step5:

Checked with Internal network/ firewall team in the office, to check if there is any firewall related issue. They confirmed that no firewall issues, as the scripts are  working fine with IE browser.

 

 

Please do let me know, if you need any more details

 

 

Here is the selenium script I am trying

 

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.chrome.ChromeDriver;

import org.openqa.selenium.chrome.ChromeOptions;

 

public class Test1 {

 

              public static void main(String[] args) {

                             // TODO Auto-generated method stub

 

                             System.out.println("hi world");

                              System.setProperty("webdriver.chrome.driver", " path to\ chromedriver.exe");

                             ChromeOptions options = new ChromeOptions();

                             options.setBinary("C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe");

                             options.setExperimentalOption("useAutomationExtension", false);

                             WebDriver driver = new ChromeDriver(options);

                             driver.get("https://www.google.com");

                            

              }

 

Here is the error stack trace:

hellow world
Starting ChromeDriver 81.0.4044.69 (6813546031a4bc83f717a2ef7cd4ac6ec1199132-refs/branch-heads/4044@{#776}) on port 42397
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: crashed.
  (unknown error: 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.)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48'
System info: host: 'BLRWX11704', ip: '10.31.70.202', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_151'
Driver info: driver.version: ChromeDriver
remote stacktrace: Backtrace:
Ordinal0 [0x01155F73+2449267]
Ordinal0 [0x01088361+1606497]
Ordinal0 [0x00F7F969+522601]
Ordinal0 [0x00F0D421+54305]
Ordinal0 [0x00F2C127+180519]
Ordinal0 [0x00F2BF2D+180013]
Ordinal0 [0x00F29E5B+171611]
Ordinal0 [0x00F11DD8+73176]
Ordinal0 [0x00F12E50+77392]
Ordinal0 [0x00F12DE9+77289]
Ordinal0 [0x0109D8D7+1693911]
GetHandleVerifier [0x011F4036+522726]
GetHandleVerifier [0x011F3D74+522020]
GetHandleVerifier [0x01209187+609079]
GetHandleVerifier [0x011F48A6+524886]
Ordinal0 [0x01095CBC+1662140]
Ordinal0 [0x0109F23B+1700411]
Ordinal0 [0x0109F3A3+1700771]
Ordinal0 [0x010B5215+1790485]
BaseThreadInitThunk [0x76710419+25]
RtlGetAppContainerNamedObjectPath [0x7791662D+237]
RtlGetAppContainerNamedObjectPath [0x779165FD+189]

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$errorHandler$0(W3CHandshakeResponse.java:62)
at org.openqa.selenium.remote.HandshakeResponse.lambda$getResponseFunction$0(HandshakeResponse.java:30)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:126)
at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.util.Spliterators$ArraySpliterator.tryAdvance(Unknown Source)
at java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.util.stream.ReferencePipeline.findFirst(Unknown Source)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:128)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:74)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:136)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:181)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:168)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:157)
at chromePackage.Test1.main(Test1.java:19)

 


Thanks,

Suma

Sahil Goyal

no leída,
21 abr 2020, 4:25:23 a.m.21/4/2020
para Selenium Users
Hi Suma,

Please add the following ChromeOptions to fix the issue.
options.addArguments("--disable-dev-shm-usage");


For detailed information, please refer the following stackoverflow link for the explaination of the issue and the right fix:

Regards,
Sahil

Suma latha

no leída,
21 abr 2020, 4:52:14 a.m.21/4/2020
para seleniu...@googlegroups.com
I have tried adding this options.addArguments("--disable-dev-shm-usage");

But still its the same error.

Thanks,
Suma

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/a63199a1-b962-4cb7-bf15-895da62016ce%40googlegroups.com.

sushanth rajkumar

no leída,
7 ago 2020, 6:21:09 a.m.7/8/2020
para latha...@gmail.com,seleniu...@googlegroups.com
Did you have any success in resolving this issue?

Ripon Al Wasim

no leída,
7 ago 2020, 7:41:40 a.m.7/8/2020
para seleniu...@googlegroups.com
Hi Suma,
It might happen for version incompatibility. Please try with the latest.
Selenium 3.14

Chrome Driver Version - 85


br,
Ripon

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.

Ripon Al Wasim

no leída,
7 ago 2020, 7:59:36 a.m.7/8/2020
para seleniu...@googlegroups.com
I'm using Selenium 3.14
Google Chrome browser: Version 84.0.4147.105 (Official Build) (64-bit)
ChromeDriver 84.0.4147.30

It works fine for me.

On Tue, Apr 21, 2020 at 2:13 PM Suma latha <latha...@gmail.com> wrote:
--

sushanth rajkumar

no leída,
10 ago 2020, 11:44:44 p.m.10/8/2020
para seleniu...@googlegroups.com
10-08-20 11:48:29 PM: Starting ChromeDriver 84.0.4147.30 (48b3e868b4cc0aa7e8149519690b6f6949e110a8-refs/branch-heads/4147@{#310}) on port 37070
10-08-20 11:48:29 PM: Only local connections are allowed.
10-08-20 11:48:29 PM: Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
10-08-20 11:48:30 PM: ChromeDriver was started successfully.
10-08-20 11:48:33 PM: org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited normally.
  (unknown error: 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.)

I still face this issue.  When I try to launch chrome for automation scoped_dirxxxx_xxxxxx folder is not created in Appdata/Local/Temp location 



On Fri, 7 Aug 2020, 5:33 pm sushanth rajkumar, <sushant...@gmail.com> wrote:
I understood that the issue is with the same code and versions it works fine in some instance and in some it doesn't work.

What else might be wrong?

bharath kumar

no leída,
11 ago 2020, 9:56:21 a.m.11/8/2020
para seleniu...@googlegroups.com

bharath kumar

no leída,
11 ago 2020, 9:58:40 a.m.11/8/2020
para seleniu...@googlegroups.com
On Tue, Aug 11, 2020 at 5:44 AM sushanth rajkumar <sushant...@gmail.com> wrote:

bharath kumar

no leída,
11 ago 2020, 10:01:13 a.m.11/8/2020
para seleniu...@googlegroups.com
On Tue, Aug 11, 2020 at 5:44 AM sushanth rajkumar <sushant...@gmail.com> wrote:

Abhi Uppal

no leída,
30 ene 2021, 1:45:45 a.m.30/1/2021
para seleniu...@googlegroups.com
uys, 
I am also getting the same issue. 

Any quick help will be appreciated
image.png



Rajiv Agarwal

no leída,
4 may 2021, 10:14:21 a.m.4/5/2021
para Selenium Users
Hi,

This worked for me.

               ChromeOptions options = new ChromeOptions();
options.addArguments("--headless");
options.addArguments("--disable-gpu");
options.addArguments("--disable-dev-shm-usage");
URL url = new URL("http://localhost:4444/wd/hub");
RemoteWebDriver driver = new RemoteWebDriver(url,options);
driver.get("http://google.com");
System.out.println(driver.getTitle());

nitish

no leída,
5 jun 2021, 10:51:55 a.m.5/6/2021
para Selenium Users
The solution mentioned by you is not working for me on macOS and I am getting the same error as others.

When I am initiating the chrome browser on my local machine instead of RemoteWebDriver, it works for me using the following -

WebDriverManager.chromedriver().setup();

WebDriver driver = new ChromeDriver();

driver.get("http://www.google.com");

System.out.println(driver.getTitle());


harshith shetty

no leída,
22 ene 2023, 10:55:55 p.m.22/1/2023
para Selenium Users
Can anyone help on this error in selenium please

Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: unknown error: Chrome failed to start: crashed.

  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location C:\Program Files\Google\Chrome\Application\chrome.exe is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Host info: host: 'BDC10-L-F28SB1L', ip: '192.168.101.7'
Build info: version: '4.7.2', revision: '4d4020c3b7'
System info: os.name: 'Windows 11', os.arch: 'amd64', os.version: '10.0', java.version: '19.0.1'
Driver info: org.openqa.selenium.chrome.ChromeDriver

⇜Krishnan Mahadevan⇝

no leída,
23 ene 2023, 1:20:01 a.m.23/1/2023
para seleniu...@googlegroups.com
Someone opened up an issue for this : https://github.com/SeleniumHQ/selenium/issues/11571

I would suggest that you add a comment to this issue but with providing all the required details 

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ https://rationaleemotions.com/


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.

Sutapa Basu

no leída,
27 abr 2023, 5:18:51 a.m.27/4/2023
para Selenium Users
Can someone explain how to solve this issue?
 I got latest chrome version and all of sudden started to get this error below when i am running in non-headless mode, when i am running in headless=true it is running just fine. 
Chrome version:  112.0.5615.138 
  Driver Version: 112.0.5615.49
selenium==3.141.0

HOOK-ERROR in before_scenario: WebDriverException: Message: unknown error: Chrome failed to start: exited normally.

  (unknown error: DevToolsActivePort file doesn't exist)
  (The process started from chrome location C:\Program Files\Google\Chrome\Application\chrome.exe is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

Lester Serdenia

no leída,
9 may 2023, 8:20:10 a.m.9/5/2023
para Selenium Users
Hello.

Does any have a fix for this?   I'm also experiencing this on Google Chrome.   Firefox and Ms Edge are working on my end.

Rahul Petkar

no leída,
16 jun 2023, 2:19:28 a.m.16/6/2023
para Selenium Users
Hi   I'm also experiencing this on Google Chrome.   Firefox and Ms Edge are working on my end.

did you get solution for this?
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos