Initial setup: ChromeDriver DevToolsActivePort file doesn't exist

Hi,

I am a newbie, just trying to decide if we want to use Katalon. It looks very impressive, if we could get it to work. I can record from an existing Chrome browser, and I can run the testcase in a headless Chrome browser, and IE just fine. However if I try to run it normally in Chrome, it opens the browser with a “data:,” location.

After spending a couple days reading the Forum, Stackoverflow, etc. and trying all the possible fixes I could find I still have the Chromedriver log file saying: DevToolsActivePort file doesn’t exist. (The chrome runtime options are below)

Since this seems to be a pretty common problem, perhaps someone can see something in the log files I missed. …I don’t know how to actually attach the log files, but I included some of the interesting bits.

Computer: Windows 10 Enterprise, V1803, 64-bit accessible to the internet, but on a semi-secure network - and no idea what may have been locked down.

From Katalan’s log file:

katalon.versionNumber=6.2.2
katalon.buildNumber=4
!SESSION 2019-07-25 15:28:32.244 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_181
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_CA
Command-line arguments: -os win32 -ws win32 -arch x86_64 -data @noDefault

From Chromedriver (from the most recent version of Katalon)

[1564082972.004][INFO]: Starting ChromeDriver 74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29})

Chrome is: Version 75.0.3770.142 (Official Build) (64-bit)
(I have also tried running this with ChromeDriver 75.0.3770.140 outside of Katalon, but same problem)

I rebooted the computer before capturing these logs to be sure there were no old chromedrivers running etc.

Chromedriver error: (**** and chrome runtime options from every potential fix I could find on the web…)

[1564082972.736][INFO]: Launching chrome: “C:\Program Files (x86)\Google\Chrome\Application\chrome.exe” --chrome.switches --disable-background-networking --disable-browser-side-navigation --disable-client-side-phishing-detection --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-extensions-except=“C:\Users\admburrk\AppData\Local\Temp\2\scoped_dir12308_21909\internal” --disable-gpu --disable-hang-monitor --disable-infobars --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-blink-features=ShadowDOMV0 --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --log-level=0 --no-first-run --no-sandbox --password-store=basic --remote-debugging-port=0 --start-maximized --test-type=webdriver --use-mock-keychain --user-data-dir=“C:\Users\admburrk\AppData\Local\Temp\2\scoped_dir12308_6209” data:,
[1564083032.771][INFO]: Failed to connect to Chrome. Attempting to kill it.
[1564083032.948][INFO]: [83364bf1a9bb732c5a6f4e1bd7598370] RESPONSE InitSession ERROR unknown error: DevToolsActivePort file doesn’t exist

And finally the Katalon log:

!ENTRY org.eclipse.ui 4 0 2019-07-25 15:29:24.789
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.swt.SWTException: Widget is disposed)
	at org.eclipse.swt.SWT.error(SWT.java:4533)
	at org.eclipse.swt.SWT.error(SWT.java:4448)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4211)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3827)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
	at com.kms.katalon.core.application.Application.internalRunGUI(Application.java:154)
	at com.kms.katalon.core.application.Application.runGUI(Application.java:144)
	at com.kms.katalon.core.application.Application.start(Application.java:74)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
Caused by: org.eclipse.swt.SWTException: Widget is disposed
	at org.eclipse.swt.SWT.error(SWT.java:4533)
	at org.eclipse.swt.SWT.error(SWT.java:4448)
	at org.eclipse.swt.SWT.error(SWT.java:4419)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:482)
	at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:354)
	at org.eclipse.swt.widgets.Composite.setFocus(Composite.java:1114)
	at com.kms.katalon.composer.project.dialog.WalkthroughDialog$1.lambda$0(WalkthroughDialog.java:135)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
	... 25 more
Launcher status after execution process completed: Running

Do you have an idea what I may have missed? Any critical information I have left out?

Thank-you!

If it is of any interest, when running the ChromeDriver from another tool, I get these errors repeated twice:

[5764:14120:0728/150734.371:ERROR:configuration_policy_handler_list.cc(90)] Unknown policy: AlwaysAuthorizePlugins
[5764:14120:0728/150734.371:ERROR:configuration_policy_handler_list.cc(90)] Unknown policy: DisablePluginFinder
[5764:14120:0728/150734.371:ERROR:configuration_policy_handler_list.cc(90)] Unknown policy: DisableSSLRecordSplitting
[5764:14120:0728/150734.371:ERROR:configuration_policy_handler_list.cc(90)] Unknown policy: DisableSpdy
[5764:14120:0728/150734.371:ERROR:configuration_policy_handler_list.cc(90)] Unknown policy: DnsPrefetchingEnabled
[5764:14120:0728/150734.371:ERROR:configuration_policy_handler_list.cc(90)] Unknown policy: HideWebStorePromo
[5764:14120:0728/150734.371:ERROR:configuration_policy_handler_list.cc(90)] Unknown policy: InstantEnabled
[5764:14120:0728/150734.371:ERROR:configuration_policy_handler_list.cc(90)] Unknown policy: PasswordManagerAllowShowPasswords
[5764:14120:0728/150734.371:ERROR:configuration_policy_handler_list.cc(90)] Unknown policy: RemoteAccessClientFirewallTraversal

I don’t get these errors when running from Katalon, but they may still apply.

Looking in chrome://policy/ they are all listed as unknown policies (as well as there being a long list of other valid polices. I don’t seem to have access to remove them (although I could be wrong) and disabling all policies (if even possible) would of course invalidate the testing

My list of flags has now grown to:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" 
--chrome.switches 
--disable-background-networking 
--disable-browser-side-navigation 
--disable-client-side-phishing-detection 
--disable-default-apps 
--disable-dev-shm-usage 
--disable-extensions 
--disable-extensions-except="C:\Users\admburrk\AppData\Local\Temp\2\scoped_dir4936_28246\internal" 
--disable-gpu 
--disable-hang-monitor 
--disable-infobars 
--disable-popup-blocking
 --disable-prompt-on-repost 
--disable-setuid-sandbox 
--disable-sync
 --disable-web-resources 
--enable-automation 
--enable-blink-features=ShadowDOMV0 
--enable-logging 
--force-fieldtrials=SiteIsolationExtensions/Control 
--ignore-certificate-errors 
--log-level=0 
--no-first-run 
--no-sandbox 
--password-store=basic 
--remote-debugging-port=0 
--start-maximized 
--test-type=webdriver 
--use-mock-keychain 
--user-data-dir="C:\Users\admburrk\AppData\Local\Temp\2\scoped_dir4936_2359"
data:,

Thank-you for your help.

To whom it may concern (or anyone searching who stumbles across this) deleting the unknown chrome policies from the registry made the error messages go away but chromedriver still cannot control chrome.

They are found in: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome

I have managed to find some fixes, but not perfect ones. I have included them in this post here:

Hey Guys, to workaround the error message for “DevToolsActivePort file doesn’t exist” and the error messge for “failed to load extensions”, I’m using the chrome executable at C:Program Files, see the code below, and although the chrome browser launches successfully (but doesn’t go to my url path), I now get the error message “org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start” - Uggghhh!!!

String pathToChromeDriver = ‘C:\Program Files (x86)\Google\Chrome\Application\chrome.exe’
System.setProperty(‘webdriver.chrome.driver’, pathToChromeDriver)
WebDriver driver = new ChromeDriver()
driver.get(‘my url’)

Hi,

There are a lot of things that can cause this error message, it basically means the ChromeDriver and Chrome can’t find each other, and there are other solutions out on the web.

As my post above explains, and the one I link to, this was caused by our organization using Chrome’s Roaming policy which prevented ChromeDriver from creating a unique profile for each browser being controlled. Our solution (in the linked post) was to force ChromeDriver to always use the common roaming profile (user-app-dir option) - which means there can only ever be one Chrome browser running.

It has been a long time since I fought with this, so I can’t remember if your error is one of the many I had to work my way through. If you don’t have your Roaming Policy turned on, then it may be a different problem - or you may have more than one - but there are a lot of suggested fixes out there.