FuckTheWorld / chromedriver

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

Maximum call stack size exceeds for chrome driver when calling RemoteWebDriver.findElementById #1114

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Issue Description:
When using Selenium Web Driver API's method findElement() on a simple HTML page 
that uses $class Library's (http://www.uselesspickles.com/class_library) script 
file 'class.js', the Chrome Driver throws 'unknown error: Maximum call stack 
size exceeded'.

Steps to reproduce:

Create a simple HTML page.
index.htm
---------
<html>
    <head>
    <script type="text/javascript" src="class.js"></script> 
    </head>
    <body>
        <div id="myDiv">
            <input type="text" id="myControl" value="Hello World!">
        </div>
    </body>
</html>

Run the the following on the above index.htm page:
    driver.findElement(By.id("myControl"));

Just removing the script tag will work fine.

Platform: Windows 7 64 bit
Chrome Driver: Version 2.14.313457 (same behavior on version 2.15.x)
Chrome Browser: Version 42.0.2311.135 (same behavior on 43.0.2357.81 m)

Error Stack Trace:
*** Element info: {Using=id, value=username}
Session ID: d07c5a7773b9f6586a02579d7c1f2a0a
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{platform=XP, acceptSslCerts=true, javascriptEnabled=true, 
browserName=chrome, 
chrome={userDataDir=C:\Users\esuria\AppData\Local\Temp\scoped_dir7072_18670}, 
rotatable=false, locationContextEnabled=true, mobileEmulationEnabled=false, 
version=42.0.2311.135, takesHeapSnapshot=true, cssSelectorsEnabled=true, 
databaseEnabled=false, handlesAlerts=true, browserConnectionEnabled=false, 
webStorageEnabled=true, nativeEvents=true, applicationCacheEnabled=false, 
takesScreenshot=true}]
                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
                at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
                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.findElement(RemoteWebDriver.java:352)
                at org.openqa.selenium.remote.RemoteWebDriver.findElementById(RemoteWebDriver.java:393)
        at <reference to my file which contains statement driver.findElement(By.id("myControl"))>
org.openqa.selenium.WebDriverException: unknown error: Maximum call stack size 
exceeded
  (Session info: chrome=42.0.2311.135)
  (Driver info: chromedriver=2.14.313457 (3d645c400edf2e2c500566c9aa096063e707c9cf),platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 335 milliseconds
Build info: version: '2.45.0', revision: 
'5017cb8e7ca8e37638dc3091b2440b90a1d8686f', time: '2015-02-27 09:10:26'
System info: host: 'localhost', ip: '172.16.208.117', os.name: 'Windows 7', 
os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_51'

Original issue reported on code.google.com by emad.su...@gmail.com on 3 Jun 2015 at 11:11

Attachments:

GoogleCodeExporter commented 9 years ago
I'm unable to reproduce this issue, works fine in my test.
Tested with this configuration:- 

OS:- Win 7
Selenium:- 2.45 (Java bindings)
Chrome:- v43.x
ChromeDriver= 2.15

Please let me know if i'm missing something here in environment configuration 
and in reproducible steps.

----------------
 WebDriver driver = new ChromeDriver();
    driver.get("file:///C:/Users/path/to/index1114.html");
    driver.findElement(By.id("myControl")).clear();
    driver.findElement(By.id("myControl")).sendKeys("testing");
    Thread.sleep(2000);
    System.out.println("test complete");
    driver.quit();

Original comment by agau...@chromium.org on 3 Jun 2015 at 12:11

GoogleCodeExporter commented 9 years ago
The issue is reproducible with simple web page (please see attachment):

OS: Win 7
Selenium: 2.45 (Java bindings)
Chrome: 43.x
ChromeDriver: 2.14 / 2.15

========================================
Sample Code
========================================
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;

import java.rmi.Remote;

public class ChromeDriverTest {
  public static void main(String[] args){
    DesiredCapabilities capabilities = DesiredCapabilities.chrome();
    System.setProperty("webdriver.chrome.driver", "C:\\Users\\amasood\\IdeaProjects\\untitled\\ChromeDriverTest\\ChromeDriverFile\\chromedriver.exe");
    String pathToSeleniumWebDriverForChrome = System.getProperty("webdriver.chrome.driver");
    capabilities.setCapability("chrome.binary", pathToSeleniumWebDriverForChrome);
    RemoteWebDriver webDriver = new ChromeDriver(capabilities);
    webDriver.manage().window().maximize();
    webDriver.get("C:\\Users\\amasood\\IdeaProjects\\untitled\\ChromeDriverTest\\simplewebpage\\index.html");
    WebElement webElement=webDriver.findElement(By.id("myControl"));
    webElement.clear();
    webElement.sendKeys("Hello World");
  }

Original comment by abdullah...@gmail.com on 19 Jun 2015 at 7:24

Attachments:

GoogleCodeExporter commented 9 years ago
Issue is reproducible with chromedriver:2.16 and chrome:v43 when class-library 
script is included in html file.

But If do not include class_library, we are unable to reproduce issue.

Sample Code:
System.setProperty("webdriver.chrome.driver",Utility.getPath("drivers/chromedriv
er.exe"));      System.setProperty("webdriver.chrome.logfile","C:/Java/html/1114/chr
ome.log");
WebDriver driver = new ChromeDriver();
driver.get("file://C:/Java/html/1114/index.html");
System.out.println(driver.findElement(By.id("myControl")));

Original comment by ssudunag...@chromium.org on 19 Jun 2015 at 9:07

GoogleCodeExporter commented 9 years ago
Issue 887 has been merged into this issue.

Original comment by agau...@chromium.org on 30 Jun 2015 at 9:48

GoogleCodeExporter commented 9 years ago

Original comment by gmanikp...@chromium.org on 8 Jul 2015 at 4:57

GoogleCodeExporter commented 9 years ago

Original comment by gmanikp...@chromium.org on 8 Jul 2015 at 4:57