ericmckean / chromedriver

Automatically exported from code.google.com/p/chromedriver
0 stars 0 forks source link

ChromeDriver appears to hang randomly #865

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Issue Description:
We have been running a smoketest suite with selenium and chromedriver for 
almost a year and about a week or two ago our tests just started hanging 
randomly. It doesn't happen everytime and in fact if we re-run our entire test 
suite it will go through sometimes.

I have included two debug logs from chromedriver one when it worked and one 
when it failed. If anyone has any ideas on what I could possibly be doing let 
me know.

Here is my java chromedriver startup code:

ChromeOptions options = new ChromeOptions();
    options.addArguments("--user-data-dir=" + cfg.getProperty("userProfile", Xforms.STRING));
    options.addArguments("--enable-extensions");
    options.addArguments("--start-maximized");
    options.addArguments("--disable-new-ntp");  // This was added to try to fix the random hangs and seems to happen less frequently with this flag enabled.
    options.addArguments("--test-type");
    options.addArguments("--profile-directory=" + cfg.getProperty("profileDirectory", Xforms.STRING));

    DesiredCapabilities capabilities = DesiredCapabilities.chrome();
    capabilities.setCapability(ChromeOptions.CAPABILITY, options);
    TestDriver.init(new ImplicitWaitDriverWrapper(new RemoteWebDriver(new URL(webDriverUrl), capabilities), 10L));

Original issue reported on code.google.com by tim95...@gmail.com on 29 Jul 2014 at 7:57

Attachments:

GoogleCodeExporter commented 9 years ago
I have also tried removing the implicit waits and that doesn't seem to help.

Original comment by tim95...@gmail.com on 29 Jul 2014 at 11:48

GoogleCodeExporter commented 9 years ago
It seems like it has to do with the chrome://newtab/ page as everytime if fails 
I see this line:

[8.520][DEBUG]: DevTools response: [ {

   "description": "",

   "devtoolsFrontendUrl": "/devtools/devtools.html?ws=127.0.0.1:12851/devtools/page/EED810F0-4B32-418F-9F9F-4D601FBB07B1",

   "faviconUrl": "chrome://extension-icon/aapnijgdinlhnhlmodcfapnahmbfebeb/24/1",

   "id": "EED810F0-4B32-418F-9F9F-4D601FBB07B1",

   "title": "Chrome Automation Extension",

   "type": "background_page",

   "url": "chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html",

   "webSocketDebuggerUrl": "ws://127.0.0.1:12851/devtools/page/EED810F0-4B32-418F-9F9F-4D601FBB07B1"

}, {

   "description": "",

   "devtoolsFrontendUrl": "/devtools/devtools.html?ws=127.0.0.1:12851/devtools/page/4F6370D3-467D-4CCB-B098-A2A891609A5A",

   "id": "4F6370D3-467D-4CCB-B098-A2A891609A5A",

   "title": "New Tab",

   "type": "page",

   "url": "chrome://newtab/",

   "webSocketDebuggerUrl": "ws://127.0.0.1:12851/devtools/page/4F6370D3-467D-4CCB-B098-A2A891609A5A"

} ]

and I never see it say chome://newtab/ in a successful run it always uses 

   "url": "chrome-search://local-ntp/local-ntp.html",

Original comment by tim95...@gmail.com on 7 Aug 2014 at 8:49

GoogleCodeExporter commented 9 years ago

Original comment by samu...@chromium.org on 21 Feb 2015 at 12:18