Here I am NOT going to claim a bug.
I just record a problem I encountered and describe the reasons
I have found out. I hope this helps someone who encountered similar problem.
- OS : Windows 7
- Katalon Studio version : 5.3.1
- Katalon Studio log: not relevant
- chromedriver.log: attached
- Browser: Google Chrome: 65.0.3325.181
# Steps to reproduce
On my PC in the office,
- start Katalon Studio
- create New Sample Project > Sample WebUI Testing Project
- `CURA Test Project` is created.
- select test case `TC1_Verify Successful Login` and run it with Google Chrome
- The test case fails after waiting for 60 seconds. Message:
Unable to open browser with rul: 'http://demoaut.katalon.com' (Root cause: org.openqa.selenium.WebDriverException: unknown error: Crhome failed to start: crashed (Driver info: chromedriver=2.35.528161 (5b82f2d2aae0ca24b877009200ced9065a772e73),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout:61.90 seconds ...)
- Screenshot attached.
# Expected behavior
Google Chrome browser runs.
# Actual behavior
Google Chrome browser crashed.
# What I have found
I found 2 reasons unique to my PC.
## ChromeDriver looked for chrome.exe at wrong path
1. The PC is a property of the Corporation I work for. It was setup by the Administration team.
Chrome browser was installed by them.
2. On my PC I found Chrome installed in multiple locations.
**C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe**
3. The Chrome under the `Program Files` directory runs OK.
4. The Chrome under the `AppData` directory was somehow corrupted. When I tried to execute it in the command line, it crashed.
5. I collected chromedriver.log. In there I found following record:
[1523843474.260][INFO]: Launching chrome: "C:\Users\qcq0264\AppData\Local\Google\Chrome\Application\chrome.exe" ... --disable-extensions ...
6. This record implies that the chrome driver wanted
to start Chrome under the `AppData` directory which is corrupted and never runs.
7. I checked the [source code of chromedriver](chromedriver/chrome_finder.cc at main · bayandin/chromedriver · GitHub) and found that
actually chromedriver gives higher precedence to the one under `AppData`.
My fix was to avoid the corrupted Chrome by renaming the `Application` directory to
Once the corrupted Chrome has been removed, chrome driver picked up chrome.exe under `Proguram Files` directory.
This is what I wanted to do.
## Was unable to disable a hiper-powered extension for PC Administration
1. According to chromedriver.log file, ChromeDriver generated a command like this:
[1523845407.787][INFO]: Launching chrome: "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" ... --disable-extensions ...
--disable-extensions switch is significant. With this switch specified, Chrome browser tries to disable all extensions on startup.
3. I checked the list of extensions installed in the Chrome of my PC. I found an extension was installed by the Administratin team.
The extension was setup *unable to disable* for ordinary users. This is due to Corporate’s security policy.
4. I think that Chrome crashes because of conflicting instruction.
--disable-extensions switch tells Chrome to disable all the extensions. But one of the installed extensions was resisting, therefore Chrome got unable to turn it off. Screenshot attached:
So that Chrome got crazy and crashed away.
I have no countermeasure with this conflict. I can not remove the extension. I can not change the behavior of chromedriver.
Hence I gave up using Chrome with Katalon Studio on my office PC. I am OK because I have understood the reason why Chrome crashes.