ericmckean / chromedriver

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

Timeout : Failed to load child procees #939

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
See http://goo.gl/ll2FvQ for common issues.

Issue Description:
unable to run selenium tests based on latest Chrome version (38.0.2125.104 m) 
When launched in Jenkins process never ends.

- It works fine in command line.
- It has worked in chrome 37 (It fails since chrome update from version 37 to 
38)

Note that chromedriver is launched. It seems to launch a chrome.exe instance, 
but no chrome child process are run as in command line execution

Steps to reproduce (if relevant, you MUST provide a simplified html page or
link to public site):
=== Configuration ===
- windows server 2008 R2 
- jenkins 1.574
- chromedriver 2.11
- chrome 38.0.2125.104 m
- selenium 2.43.1 (maven GAV : 
                  Group : org.seleniumhq.selenium  
                  Artefact : selenium-java  
                  version : 2.43.1)
=== concept ===
We package a jar that is executed with maven in jenkins
cf java code below : class LaunchQunitTests 

=== Execution : ===
I have copied the commands launched by my class in the process :

chromedriver comand line
C:\chromedriver\2.11\chromedriver.exe --port=34091 
--log-path=c:\.jenkins\jobs\AR_VA_NR_Canvas_Tests\wrk\Tests\SeleniumTestLauncher
\target\chromeDriver.log

child process chrome command line
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" 
--disable-background-networking --disable-client-side-phishing-detection 
--disable-component-update --disable-default-apps --disable-hang-monitor 
--disable-prompt-on-repost --disable-sync --disable-web-resources 
--enable-logging --ignore-certificate-errors 
--load-extension="C:\Users\UserName\AppData\Local\Temp\2\scoped_dir8756_32305\in
ternal" --logging-level=1 --metrics-recording-only --no-first-run 
--password-store=basic --remote-debugging-port=12443 
--safebrowsing-disable-auto-update --safebrowsing-disable-download-protection 
--use-mock-keychain 
--user-data-dir="C:\Users\UserName\AppData\Local\Temp\2\scoped_dir8756_9605" 
data:,

=== class executed ===
my class that is compiled and executed 
// =====================

package main.java.test;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import org.openqa.selenium.By;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.ExpectedCondition;
import org.openqa.selenium.support.ui.WebDriverWait;

public class LaunchQunitTests {

    // Default values
    private static String url = "http://localhost:8085/vizautrement/v2/tests/test_vizresults.html";
    private static int timeout = 100; // seconds
    private static String resultLocation = "./results/junit_result.xml";
    private static String webDriverLog = "target/webDriverLog.log";
    private static String webBrowser = "chrome";

    public static void writeToFile(String text) {
        File xml = new File(resultLocation);
        xml.getParentFile().mkdirs();
        FileOutputStream fos = null;
        try {
            fos = new FileOutputStream(xml);
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
        try {
            fos.write(text.getBytes());
            fos.flush();
            fos.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {

        System.setProperty("webdriver.chrome.logfile", webDriverLog);
        final WebDriver driver = new ChromeDriver();

        try {
            driver.get(url);
            (new WebDriverWait(driver, timeout)).until(new ExpectedCondition<Boolean>() {
                public Boolean apply(WebDriver d) {
                    try {
                        driver.findElement(By.id("junit-result"));
                    } catch (NoSuchElementException nse) {
                        return Boolean.FALSE;
                    }
                    return Boolean.TRUE;
                }
            });

            WebElement we = driver.findElement((By.id("junit-result")));
            writeToFile(we.getAttribute("value"));
        } finally {
            driver.quit();
        }
    }

}

// =========================

-----Other helpful tips:
Attach your chromedriver log with verbose logging enabled (see
http://goo.gl/5Sx8mC for how to do this).

=== chrome driver log ===
[1.135][INFO]: COMMAND InitSession {
   "desiredCapabilities": {
      "browserName": "chrome",
      "chrome.switches": [  ],
      "chromeOptions": {
         "args": [  ],
         "extensions": [  ]
      },
      "platform": "ANY",
      "version": ""
   }
}
[1.140][INFO]: Populating Preferences file: {
   "alternate_error_pages": {
      "enabled": false
   },
   "autofill": {
      "enabled": false
   },
   "browser": {
      "check_default_browser": false
   },
   "distribution": {
      "import_bookmarks": false,
      "import_history": false,
      "import_search_engine": false,
      "make_chrome_default_for_user": false,
      "show_welcome_page": false,
      "skip_first_run_ui": true
   },
   "dns_prefetching": {
      "enabled": false
   },
   "profile": {
      "content_settings": {
         "pattern_pairs": {
            "https://*,*": {
               "media-stream": {
                  "audio": "Default",
                  "video": "Default"
               }
            }
         }
      },
      "default_content_settings": {
         "geolocation": 1,
         "mouselock": 1,
         "notifications": 1,
         "popups": 1,
         "ppapi-broker": 1
      },
      "password_manager_enabled": false
   },
   "safebrowsing": {
      "enabled": false
   },
   "search": {
      "suggest_enabled": false
   },
   "translate": {
      "enabled": false
   }
}
[1.140][INFO]: Populating Local State file: {
   "background_mode": {
      "enabled": false
   },
   "ssl": {
      "rev_checking": {
         "enabled": false
      }
   }
}
[1.147][INFO]: Launching chrome: "C:\Program Files 
(x86)\Google\Chrome\Application\chrome.exe" --disable-background-networking 
--disable-client-side-phishing-detection --disable-component-update 
--disable-default-apps --disable-hang-monitor --disable-prompt-on-repost 
--disable-sync --disable-web-resources --enable-logging 
--ignore-certificate-errors 
--load-extension="C:\Windows\TEMP\scoped_dir12780_14881\internal" --log-level=0 
--metrics-recording-only --no-first-run --password-store=basic 
--remote-debugging-port=12111 --safebrowsing-disable-auto-update 
--safebrowsing-disable-download-protection --test-type=webdriver 
--use-mock-keychain --user-data-dir="C:\Windows\TEMP\scoped_dir12780_15012" 
data:,
[1.659][INFO]: RESPONSE InitSession {
   "acceptSslCerts": true,
   "applicationCacheEnabled": false,
   "browserConnectionEnabled": false,
   "browserName": "chrome",
   "chrome": {
      "userDataDir": "C:\\Windows\\TEMP\\scoped_dir12780_15012"
   },
   "cssSelectorsEnabled": true,
   "databaseEnabled": false,
   "handlesAlerts": true,
   "javascriptEnabled": true,
   "locationContextEnabled": true,
   "mobileEmulationEnabled": false,
   "nativeEvents": true,
   "platform": "Windows NT",
   "rotatable": false,
   "takesHeapSnapshot": true,
   "takesScreenshot": true,
   "version": "38.0.2125.104",
   "webStorageEnabled": true
}
[1.687][INFO]: COMMAND Navigate {
   "url": "http://localhost:8085/vizautrement/v2/tests/test_canvasOutput.html"
}

=== jenkins log ===
...
Starting ChromeDriver (v2.11.298604 (75ea2fdb5c87f133a8e1b8da16f6091fb7d5321e)) 
on port 25811
Only local connections are allowed.
Build timed out (after 5 minutes). Marking the build as aborted.

Original issue reported on code.google.com by tomateet...@gmail.com on 16 Oct 2014 at 5:00

GoogleCodeExporter commented 9 years ago
Hi, this looks to be the same issue as the following(and 5 other suspected 
duplicates that I can count):
https://code.google.com/p/chromedriver/issues/detail?id=928

Could you please go vote for that issue? Thanks, we'd all like to see this 
fixed.

Original comment by jake.ben...@bromium.com on 17 Oct 2014 at 10:18

GoogleCodeExporter commented 9 years ago
yes you are right sorry, 
it is a duplicated bug with 928

I close it
Thomas

Original comment by tomateet...@gmail.com on 17 Oct 2014 at 3:54

GoogleCodeExporter commented 9 years ago
sorry I cannot close it, 
if you can mark it as duplicated and close it at your side.

Thanks,
Thomas

Original comment by tomateet...@gmail.com on 17 Oct 2014 at 3:56

GoogleCodeExporter commented 9 years ago

Original comment by andrewch...@chromium.org on 24 Nov 2014 at 8:38

GoogleCodeExporter commented 9 years ago

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