FuckTheWorld / chromedriver

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

Chrome driver throws perfLoggingPrefs specified, but performance logging was not enabled #1070

Closed GoogleCodeExporter closed 9 years ago

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

Issue Description:
Unable to get the following to work using chrome driver cap
            caps = DesiredCapabilities.chrome();
            LoggingPreferences logPrefs = new LoggingPreferences();
            logPrefs.enable(LogType.PERFORMANCE, Level.ALL);
            caps.setCapability(CapabilityType.LOGGING_PREFS, logPrefs);

            Map<String, Object> prefs = new HashMap<String, Object>();
            prefs.put("traceCategories", "browser,devtools.timeline,devtools"); // comma-separated trace categories
            ChromeOptions options = new ChromeOptions();
            options.setExperimentalOption("perfLoggingPrefs", prefs);
            caps.setCapability(ChromeOptions.CAPABILITY, options);
Upon requesting selenium throws 

org.openqa.selenium.WebDriverException: unknown error: perfLoggingPrefs 
specified, but performance logging was not enabled
  (Driver info: chromedriver=2.14.313457 (3d645c400edf2e2c500566c9aa096063e707c9cf),platform=Windows NT 6.1 SP1 x86) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 1.01 seconds

All looks options are set posted properly went through break points.
Any help would be greatly appreciated. 
Steps to reproduce (if relevant, you MUST provide a simplified html page or
link to public site):
<enter repro steps here>

-----Other helpful tips:
Attach your chromedriver log with verbose logging enabled (see
http://goo.gl/5Sx8mC for how to do this).
org.openqa.selenium.WebDriverException: unknown error: perfLoggingPrefs 
specified, but performance logging was not enabled
  (Driver info: chromedriver=2.14.313457 (3d645c400edf2e2c500566c9aa096063e707c9cf),platform=Windows NT 6.1 SP1 x86) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 1.01 seconds

Original issue reported on code.google.com by kolobub...@gmail.com on 2 Apr 2015 at 3:36

GoogleCodeExporter commented 9 years ago
Issue is not with the chromedriver but issue occurs with Remotedriver while 
using the Selenium Grid

DesiredCapabilities desiredCapabilites = DesiredCapabilities.chrome();
LoggingPreferences logPrefs = new LoggingPreferences();
logPrefs.enable(LogType.PERFORMANCE, Level.ALL);
                        desiredCapabilites.setCapability(CapabilityType.LOGGING_PREFS, logPrefs);

Map<String, Object> prefs = new HashMap<String, Object>();
prefs.put("traceCategories", "browser,devtools.timeline,devtools"); 
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("perfLoggingPrefs", prefs);
                                desiredCapabilites.setCapability(ChromeOptions.CAPABILITY, options);
ChromeDriver driver =  new ChromeDriver(desiredCapabilites) ;  ==> Works fine

// RemoteWebDriver driver = new RemoteWebDriver(new 
URL("http://localhost:4444/wd/hub"), desiredCapabilites);  ==> Issue is here

 try {
                          System.out.println(driver.manage().logs().getAvailableLogTypes());
driver.get("http://google.com");
for (LogEntry logEntry : 
driver.manage().logs().get(LogType.PERFORMANCE).getAll()) {
System.out.println(logEntry);   }

    } finally {  driver.quit();  }

Please report a new issue in selenium list 
https://code.google.com/p/selenium/issues/list
Thanks,

Original comment by gmanikp...@chromium.org on 2 Apr 2015 at 6:35

GoogleCodeExporter commented 9 years ago

Original comment by gmanikp...@chromium.org on 8 Apr 2015 at 6:13

GoogleCodeExporter commented 9 years ago

Original comment by gmanikp...@chromium.org on 29 Apr 2015 at 9:01

GoogleCodeExporter commented 9 years ago
I am also seeing this issue. It happens on Selenium Grid consistently. 

Original comment by luis.ate...@citrix.com on 27 May 2015 at 5:50