Issue metadata
Sign in to add a comment
|
Chromedriver cannot launch Chrome. Error says DevToolsActivePort File doesn't exist
Reported by
gurmeet....@uoit.net,
Aug 1
|
||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36 Steps to reproduce the problem: 1. Launch Chromedriver 2. Add options 3. Fails What is the expected behavior? I had a script running for the past 6 months that would just open a session of chrome and then parse through various websites. What went wrong? It seems to be opening other chrome.exe processes and if I cancel those processes selectively it will actually start working again. One of the processes is hanging the script. Tried numerous option suggestions online but to no avail. Did this work before? Yes Chromedriver 1.38 Chrome 65 Chrome version: 68.0.3440.84 Channel: stable OS Version: 6.1 (Windows 7, Windows Server 2008 R2) Flash Version:
,
Aug 1
,
Aug 2
Thanks for filing the issue! As per comment# 0 from the reporter the issue seems to be related to Chromedriver, which is out of scope from TE end, hence adding TE-NeedsTriageHelp label to it for further triaging from Dev team. Note: Tentatively adding Tests>WebDriver component to it. Thanks!
,
Aug 2
gurmeet....@uoit.net: Could you please provide the source code that can be used to repro this issue, and/or attach ChromeDriver verbose log (see http://chromedriver.chromium.org/logging for ways to enable verbose logging)? Those information may help us investigate this issue. You might also try adding --remote-debugging-port=9222 to the Chrome command line to see if it fixes the problem. For example, in Python, you can do something like: options.add_argument("--remote-debugging-port=9222") Thanks!
,
Aug 3
import selenium.webdriver as webdriver
import selenium.webdriver.support.ui as ui
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.select import Select
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.common.exceptions import TimeoutException
options = webdriver.ChromeOptions()
options.add_argument("--disable-dev-shm-usage")
options.add_argument("--ignore-certificate-errors")
options.add_argument("--ignore-ssl-errors")
browser = webdriver.Chrome(chromedriver_location, chrome_options=options)
,
Aug 3
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 3
Hi, Could you please also attach a verbose chromedriver log?
,
Aug 3
Putting in the service args makes it crash a lot sooner. Normally it takes at least 30 secs. Before: browser = webdriver.Chrome(chromedriver_location, chrome_options=options) After: browser = webdriver.Chrome(chromedriver_location, chrome_options=options, service_args=["--verbose", "--log-path=C:\\qc1.log"])
,
Aug 3
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 3
That's most likely because ChromeDriver doesn't have permission to write to C:\\qc1.log.
,
Aug 7
Removing the --log-path argument results in the following error.
,
Aug 7
Can you try writing the log to a different location? One that you have permission to access? Otherwise we can't help you. We need that log file.
,
Aug 7
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 7
,
Aug 7
Okay I launched as administrator and it is able to write. But the behavior is different. It now opens the browser ... see if there's anything there that could point to a culprit
,
Aug 7
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 7
The error message shown in comment #11 is benign, and can be ignored. see issue 848232 . Everything in the log file attached to comment #15 looks normal. Please let us know if you're still experiencing any issues. Thanks.
,
Aug 7
Issue has gone away. Unsure if update had anything to do with it but it seems as though the issue never happened. Will update on this board if I see it again. Or reference this in the future
,
Aug 7
Thanks for the update. I'm closing this bug, but please let us know if you encounter any further issues in the future.
,
Aug 10
Hey I had the issue again. FYI, I have the python script setup to run through VBA scripts on my systems, so I caught this from last night's jobs. Attached the log file
,
Aug 10
It does seem like there's a problem, but I don't have enough information to know what it is. John, do you think it would make sense for us to print the stdout of the Chrome process to the ChromeDriver log in the event of a startup failure? I think that information would help us debug this type of problem.
,
Aug 10
gurmeet.sidhu.. could you please run your code with adding Chrome options "--user-data-dir=<path>" where the path is a directory with full read/write access Looks like your application doesn't have access to hidden directory at "C:\Users\hzjksd\AppData\Local\Temp\scoped_dir2432_32661" You can use ProcMon tool and set filter for Chrome and Chromedriver processes to monitor them. This kind of issues mostly happening on Windows machines where user has restricted access to file system.
,
Aug 11
,
Aug 13
Re comment #21: On Linux and Mac, we already redirect stderr from Chrome into the verbose log of ChromeDriver, but this mechanism doesn't appear to work on Windows. Also, we're not currently re-directing stdout. I agree that it's useful to have more output from Chrome redirected into the log file. We should investigate why the stderr redirection isn't working on Windows, and consider redirect stdout as well.
,
Aug 13
I'm not too sure how to do that. I will try and investigate myself as well and see if I can get something today
,
Aug 13
Per Comment #22: I read the ChromeDriver code and I see that if ChromeDriver didn't have permission to create a directory then it would throw an error:
base::FilePath default_dir =
user_data_dir.AppendASCII(chrome::kInitialProfile);
if (!base::CreateDirectory(default_dir))
return Status(kUnknownError, "cannot create default profile directory");
https://cs.chromium.org/chromium/src/chrome/test/chromedriver/chrome_launcher.cc?l=869
I also traced the code and feel confident that that error would be properly surfaced to the user in that case.
Re comment #25: John is talking about ChromeDriver developer work. We are happy to take external contributions ( http://chromedriver.chromium.org/contributing ), but otherwise there isn't anything you can do from client side: you would need to edit ChromeDriver code.
,
Aug 13
gurmeet.sidhu... you can get process monitor tool (ProcMon) at https://docs.microsoft.com/en-us/sysinternals/downloads/procmon Please run it and monitor Chrome process to see if Chrome can write 'DevToolsActivePort' file by the path defined by 'user-data-dir'. That will help us to investigate the issue.
,
Oct 7
gurmeet.sidhu... do you have an update for this issue?
,
Oct 9
I ended up using GeckoDriver as it did not run in to the same issue. And that has allowed me to quickly refract the script and get my reports running
,
Oct 9
Closing the bug as we're unable to repro this issue. Please let us know if you have additional information that can help us to reproduce the issue. |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by gurmeet....@uoit.net
, Aug 137.9 KB
37.9 KB View Download