ericmckean / chromedriver

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

driver.manage().window().maximize() hangs #813

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Issue Description:
Sometimes driver.manage().window().maximize() will hang.

Steps to reproduce (if relevant, you MUST provide a simplified html page or
link to public site):
No page required. Just create a new ChromeDriver instance, then call 
driver.manage().window().maximize(). Repeat this process about 20-40 times. You 
should see 1 or more examples of the driver hanging and not responding.

Original issue reported on code.google.com by AdamJaso...@gmail.com on 4 Jun 2014 at 7:42

GoogleCodeExporter commented 9 years ago
I believe we are seeing the same issue based on our debugging.

From this log we wait about 24 seconds for the:

driver.manage().window().maximize() method to complete and then ChromeDriver 
throws an error message before it reaches the next command.

10:03:55     [junit] Maximising window
10:04:19     [junit] [68.676][SEVERE]: Timed out receiving message from 
renderer: -14.459
10:05:31     [junit] Screenshot of page 'data:,' has been saved to 
'C:\jenkins\workspace\ci\browsers\chrome\reports\jbehave/screenshots/failed-scen
ario-13c54f47-a235-44b7-9c79-7083199c045d.png' with 5178 bytes
10:05:31     [junit] one.common.steps.BeforeAfterSteps.beforeStory() (FAILED)
10:05:31     [junit] (org.jbehave.core.failures.BeforeOrAfterFailed: Method 
beforeStory (annotated with @BeforeStory in class 
one.common.steps.BeforeAfterSteps) failed: 
org.openqa.selenium.WebDriverException: unknown error: cannot get automation 
extension
10:05:31     [junit] from timeout: Timed out receiving message from renderer: 
-14.459
10:05:31     [junit]   (Session info: chrome=35.0.1916.114)
10:05:31     [junit]   (Driver info: chromedriver=2.10.267521,platform=Windows 
NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace 
information)
10:05:31     [junit] Command duration or timeout: 24.47 seconds
10:05:31     [junit] Build info: version: '2.41.0', revision: 
'3192d8a6c4449dc285928ba024779344f5423c58', time: '2014-03-27 11:29:39'
10:05:31     [junit] System info: host: 'UK-QASEL15', ip: '192.168.4.54', 
os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: 
'1.7.0_51'
10:05:31     [junit] Session ID: 573a078a4bb225103ea3732e849df570
10:05:31     [junit] Driver info: org.openqa.selenium.chrome.ChromeDriver
10:05:31     [junit] Capabilities [{platform=XP, acceptSslCerts=true, 
javascriptEnabled=true, browserName=chrome, 
chrome={userDataDir=C:\Users\build\AppData\Local\Temp\scoped_dir2660_13221}, 
rotatable=false, locationContextEnabled=true, version=35.0.1916.114, 
takesHeapSnapshot=true, cssSelectorsEnabled=true, databaseEnabled=false, 
handlesAlerts=true, browserConnectionEnabled=false, nativeEvents=true, 
webStorageEnabled=true, applicationCacheEnabled=false, takesScreenshot=true}])

Original comment by benjamin...@gmail.com on 9 Jun 2014 at 7:42

GoogleCodeExporter commented 9 years ago
We appear to be having the same type of issue with this.

java.lang.RuntimeException: org.openqa.selenium.WebDriverException: unknown 
error: cannot get automation extension
from timeout: Timed out receiving message from renderer: -0.095
  (Session info: chrome=36.0.1985.125)
  (Driver info: chromedriver=2.10.267517,platform=Mac OS X 10.8.5 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 10.15 seconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'qm-bld-1', ip: '10.217.8.142', os.name: 'Mac OS X', 
os.arch: 'x86_64', os.version: '10.8.5', java.version: '1.6.0_65'
Session ID: f9f30eaf1253cbdd3a9934bb87af42e2
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{platform=MAC, acceptSslCerts=true, javascriptEnabled=true, 
browserName=chrome, 
chrome={userDataDir=/var/folders/zk/97m0qhhn69z6m_dg74_tz23dy94yh2/T/.org.chromi
um.Chromium.XAihWH}, rotatable=false, locationContextEnabled=true, 
version=36.0.1985.125, takesHeapSnapshot=true, cssSelectorsEnabled=true, 
databaseEnabled=false, handlesAlerts=true, browserConnectionEnabled=false, 
nativeEvents=true, webStorageEnabled=true, applicationCacheEnabled=false, 
takesScreenshot=true}]
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:695)
Caused by: org.openqa.selenium.WebDriverException: unknown error: cannot get 
automation extension
from timeout: Timed out receiving message from renderer: -0.095
  (Session info: chrome=36.0.1985.125)
  (Driver info: chromedriver=2.10.267517,platform=Mac OS X 10.8.5 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 10.15 seconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'qm-bld-1', ip: '10.217.8.142', os.name: 'Mac OS X', 
os.arch: 'x86_64', os.version: '10.8.5', java.version: '1.6.0_65'
Session ID: f9f30eaf1253cbdd3a9934bb87af42e2
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{platform=MAC, acceptSslCerts=true, javascriptEnabled=true, 
browserName=chrome, 
chrome={userDataDir=/var/folders/zk/97m0qhhn69z6m_dg74_tz23dy94yh2/T/.org.chromi
um.Chromium.XAihWH}, rotatable=false, locationContextEnabled=true, 
version=36.0.1985.125, takesHeapSnapshot=true, cssSelectorsEnabled=true, 
databaseEnabled=false, handlesAlerts=true, browserConnectionEnabled=false, 
nativeEvents=true, webStorageEnabled=true, applicationCacheEnabled=false, 
takesScreenshot=true}]
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
    at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteWindow.maximize(RemoteWebDriver.java:829)
    at test.suites.calendar.GenericCalendarTest.startUpTest(GenericCalendarTest.java:46)

The bottom line here shows the problem being on line 46 of our startUpTest 
method and that line is "driver.manage().window().maximize();"

We are also using TestNG's IRetryAnalyzer etc. to retry any test that fails, 
however the fails caused by this issue are not triggering that. 

Original comment by abullo...@gmail.com on 6 Aug 2014 at 10:21

GoogleCodeExporter commented 9 years ago
We started seeing this a couple of weeks ago on the call to 
driver.manage().window().maximize(). As a workaround we started setting the 
dimension using driver.manage().window().setSize(new Dimension(1024, 1024)); 
which is now throwing the same error. It seems to be on the driver.manage() 
call.

Original comment by dsjoub...@gmail.com on 11 Aug 2014 at 6:33

GoogleCodeExporter commented 9 years ago
System.InvalidOperationException : unknown error: cannot get automation 
extension from timeout: Timed out receiving message from renderer: -3.959 
(Session info: chrome=37.0.2062.120) (Driver info: 
chromedriver=2.10.267521,platform=Windows NT 6.2 x86_64)

OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response 
errorResponse) in 
c:\Projects\webdriver\dotnet\src\webdriver\Remote\RemoteWebDriver.cs:line 1048 
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String 
driverCommandToExecute, Dictionary`2 parameters) in 
c:\Projects\webdriver\dotnet\src\webdriver\Remote\RemoteWebDriver.cs:line 865 
at AutomatedTests.DriverCover..ctor(IWebDriver driver)

In addition: at the same line I got another error:

OpenQA.Selenium.WebDriverException : The HTTP request to the remote WebDriver 
server for URL 
http://localhost:62407/session/021e05cd4c89abedb2abc77342b3bd7c/window/current/m
aximize timed out after 60 seconds. ----> System.Net.WebException : The 
operation has timed outat 
OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest request) 
in 
c:\Projects\webdriver\dotnet\src\webdriver\Remote\HttpCommandExecutor.cs:line 
152 at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.Execute(Command 
commandToExecute) in 
c:\Projects\webdriver\dotnet\src\webdriver\Remote\DriverServiceCommandExecutor.c
s:line 73 at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String 
driverCommandToExecute, Dictionary`2 parameters) in 
c:\Projects\webdriver\dotnet\src\webdriver\Remote\RemoteWebDriver.cs:line 852 
at AutomatedTests.DriverCover..ctor(IWebDriver driver)

Original comment by Cranki...@gmail.com on 17 Sep 2014 at 1:53

GoogleCodeExporter commented 9 years ago

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

GoogleCodeExporter commented 9 years ago
Unable to reproduce this issue. run maximizing and resizing window multiple 
time and chrome driver works fine.

Tried with 
ChromeDriver: 2.14, Chrome:41.0.2272.76, in Ubuntu, Windows 7
Selenium: 2.45

Is this still reproducible with latest version of chromedriver and chrome ?

Original comment by agau...@chromium.org on 17 Mar 2015 at 11:08