ericmckean / chromedriver

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

u'unknown error: Maximum call stack size exceeded #887

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install node and needle (version https://github.com/mozzymoz/needle)
2. Download ChromeDriver 2.7+
3. Create Test:
# encoding: utf-8
import needle
from needle.cases import NeedleTestCase

class BasicChromeTest(NeedleTestCase):
        engine_class = 'needle.engines.perceptualdiff_engine.Engine'
        base_url = 'http://localhost/mop/relaunch/'

        @classmethod
        def get_web_driver(cls):
                return needle.driver.NeedleChrome()

        def test_FrameHeaderView4Home(self):
                self.driver.get(self.base_url + 'home.htm')
                element = self.driver.find_element_by_css_selector("#footer")
                assert 4==4

What is the expected output? What do you see instead?
Expected is that the test passes without errors, however I am getting the 
following for ChromeDriver versions 2.7+

D:\nosetests TestBasicChrome.py
E
======================================================================
ERROR: test_FrameHeaderView4Home (TestBasicChrome.BasicChromeTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\lib\gitlab\dsTestSuite\src\generated\TestBasicChrome.py", line 18, in
 test_FrameHeaderView4Home
    element = self.driver.find_element_by_css_selector("#footer")
  File "D:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", l
ine 374, in find_element_by_css_selector
    return self.find_element(by=By.CSS_SELECTOR, value=css_selector)
  File "D:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", l
ine 662, in find_element
    {'using': by, 'value': value})['value']
  File "D:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", l
ine 173, in execute
    self.error_handler.check_response(response)
  File "D:\Python27\lib\site-packages\selenium\webdriver\remote\errorhandler.py"
, line 164, in check_response
    raise exception_class(message, screen, stacktrace)
WebDriverException: Message: u'unknown error: Maximum call stack size exceeded\n
  (Session info: chrome=36.0.1985.143)\n  (Driver info: chromedriver=2.7.236900,
platform=Windows NT 6.1 SP1 x86_64)'
-------------------- >> begin captured logging << --------------------
selenium.webdriver.remote.remote_connection: DEBUG: POST http://127.0.0.1:57305/
session {"desiredCapabilities": {"platform": "ANY", "browserName": "chrome", "ve
rsion": "", "javascriptEnabled": true, "chromeOptions": {"args": [], "extensions
": []}}}
selenium.webdriver.remote.remote_connection: DEBUG: Finished Request
selenium.webdriver.remote.remote_connection: DEBUG: POST http://127.0.0.1:57305/
session/16c3c28215d92599bede7c8acbdf32c9/window/current/position {"y": 0, "x": 0
, "windowHandle": "current", "sessionId": "16c3c28215d92599bede7c8acbdf32c9"}
selenium.webdriver.remote.remote_connection: DEBUG: Finished Request
selenium.webdriver.remote.remote_connection: DEBUG: POST http://127.0.0.1:57305/
session/16c3c28215d92599bede7c8acbdf32c9/window/current/size {"width": 1024, "wi
ndowHandle": "current", "sessionId": "16c3c28215d92599bede7c8acbdf32c9", "height
": 768}
selenium.webdriver.remote.remote_connection: DEBUG: Finished Request
selenium.webdriver.remote.remote_connection: DEBUG: POST http://127.0.0.1:57305/
session/16c3c28215d92599bede7c8acbdf32c9/execute {"sessionId": "16c3c28215d92599
bede7c8acbdf32c9", "args": [], "script": "return {width: document.body.clientWid
th, height: document.body.clientHeight};"}
selenium.webdriver.remote.remote_connection: DEBUG: Finished Request
selenium.webdriver.remote.remote_connection: DEBUG: POST http://127.0.0.1:57305/
session/16c3c28215d92599bede7c8acbdf32c9/window/current/size {"width": 1040, "wi
ndowHandle": "current", "sessionId": "16c3c28215d92599bede7c8acbdf32c9", "height
": 768}
selenium.webdriver.remote.remote_connection: DEBUG: Finished Request
selenium.webdriver.remote.remote_connection: DEBUG: POST http://127.0.0.1:57305/
session/16c3c28215d92599bede7c8acbdf32c9/url {"url": "http://localhost/mop/relau
nch/home.htm", "sessionId": "16c3c28215d92599bede7c8acbdf32c9"}
selenium.webdriver.remote.remote_connection: DEBUG: Finished Request
selenium.webdriver.remote.remote_connection: DEBUG: POST http://127.0.0.1:57305/
session/16c3c28215d92599bede7c8acbdf32c9/element {"using": "css selector", "sess
ionId": "16c3c28215d92599bede7c8acbdf32c9", "value": "#footer"}
selenium.webdriver.remote.remote_connection: DEBUG: Finished Request
--------------------- >> end captured logging << ---------------------

----------------------------------------------------------------------
Ran 1 test in 3.955s

FAILED (errors=1)

Original issue reported on code.google.com by husse...@d-sire.com on 21 Aug 2014 at 9:06

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Here a test HTML which will raise an error

Original comment by husse...@d-sire.com on 21 Aug 2014 at 11:49

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Here is a version of the file that does not raise an error

Original comment by husse...@d-sire.com on 21 Aug 2014 at 12:04

Attachments:

GoogleCodeExporter commented 9 years ago
Any updates on this issue?  I'm seeing the same thing from the ruby selenium 
driver, chromedriver, and capybara.  Having something that sets prototype to 
Array breaks everything.

Original comment by ryanst...@gmail.com on 22 Sep 2014 at 4:51

GoogleCodeExporter commented 9 years ago
I just encountered the same problem while using Ruby and watir-webdriver gem. 
Here's the page source: 
https://gist.github.com/andrewpanin/6f9311465ce8a8bacade.

I needed to address a link with the text 'Switch to CML Editor'. The following 
caused the error:

browser.a(:id, 'edit_in_cml_editor')

The following worked well:

browser.a(:text, 'Switch to CML Editor')

Original comment by Andrew.P...@gmail.com on 3 Jan 2015 at 3:00

GoogleCodeExporter commented 9 years ago
Example of the error from yet another page:

Selenium::WebDriver::Error::UnknownError: {"errorMessage":"Maximum call stack 
size 
exceeded.","request":{"headers":{"Accept":"application/json","Accept-Encoding":"
gzip;q=1.0,deflate;q=0.6,identity;q=0.3","Connection":"close","Content-Length":"
34","Content-Type":"application/json; 
charset=utf-8","Host":"127.0.0.1:8910","User-Agent":"Ruby"},"httpVersion":"1.1",
"method":"POST","post":"{\"using\":\"id\",\"value\":\"job_title\"}","url":"/elem
ent","urlParsed":{"anchor":"","query":"","file":"element","directory":"/","path"
:"/element","relative":"/element","port":"","host":"","password":"","user":"","u
serInfo":"","authority":"","protocol":"","source":"/element","queryKey":{},"chun
ks":["element"]},"urlOriginal":"/session/01104260-935a-11e4-ac99-c7b3ea92c8c4/el
ement"}} (SessionReqHand)

Original comment by Andrew.P...@gmail.com on 3 Jan 2015 at 3:08

GoogleCodeExporter commented 9 years ago
Same issue is appearing for me as well.
"unknown error: Maximum call stack size exceeded.
Environment details are as follows
Windows 7
Chrome:40.0.22
Webdriver:2.43.0

Original comment by abdullah...@gmail.com on 22 Jan 2015 at 11:52

GoogleCodeExporter commented 9 years ago
Changing the way of locating an element on the page helped me. Try CSS or XPath 
instead of using the element ID.

Original comment by Andrew.P...@gmail.com on 22 Jan 2015 at 11:58

GoogleCodeExporter commented 9 years ago
thanks Andrew,
well, i have tried both ID and CSS, both of them doesn't work. I tried to 
downgrade the chrome browser but it also did not work. I wonder if this is a 
issue with chrome driver itself or what else. There is no such help available 
for it.

Following is the stack trace:

Running TestSuite
INFO : Log4j has been initiated!
Starting ChromeDriver 2.13.307647 (5a7d0541ebc58e69994a6fb2ed930f45261f3c29) on 
port 23144
Only local connections are allowed.
ERROR: Stack Trace:
org.openqa.selenium.WebDriverException: unknown error: Maximum call stack size 
exceeded
  (Session info: chrome=39.0.2171.99)
  (Driver info: chromedriver=2.13.307647 (5a7d0541ebc58e69994a6fb2ed930f45261f3c29),platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 66 milliseconds
Build info: version: '2.43.0', revision: 
'accb3003b9fb8f7cae30f9669b4c594a065396a6', time: '2014-09-09 22:22:51'
System info: host: 'pak-amasood', ip: '172.16.208.69', os.name: 'Windows 7', 
os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_67'
Session ID: e3ce22d656a70a4d38db0f130e72d8ce
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{platform=XP, acceptSslCerts=true, javascriptEnabled=true, 
browserName=chrome, 
chrome={userDataDir=C:\Users\amasood\AppData\Local\Temp\scoped_dir7684_4663}, 
rotatable=false, locationContextEnabled=true, mobileEmulationEnabled=false, 
version=39.0.2171.99, takesHeapSnapshot=true, cssSelectorsEnabled=true, 
databaseEnabled=false, handlesAlerts=true, browserConnectionEnabled=false, 
nativeEvents=true, webStorageEnabled=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)

Original comment by abdullah...@gmail.com on 22 Jan 2015 at 2:21

GoogleCodeExporter commented 9 years ago
I am pretty sure that is has nothing to do with the selector. As you can see in 
my two example HTML pages, the one with prototype Array crashes but not the one 
without.

Has anyone tried the two sample files?

Original comment by husse...@d-sire.com on 22 Jan 2015 at 3:36

GoogleCodeExporter commented 9 years ago
I will try with the HTML pages, but it looks like there is an issue with the 
chrome driver compatibility. I wonder why it is not happening with all others 
if this is a consistent problem.

Andrew, husse... can you guys please share your environment details, most 
importantly chrome driver, chrome browser and selenium version.

Original comment by abdullah...@gmail.com on 22 Jan 2015 at 6:07

GoogleCodeExporter commented 9 years ago
Here is what I got

Browser: chrome=36.0.1985.143
Driver info: chromedriver=2.7.236900
Platform: Windows NT 6.1 SP1 x86_64
Python: 2.7
selenium-server-standalone-2.44.0

Original comment by husse...@d-sire.com on 22 Jan 2015 at 6:12

GoogleCodeExporter commented 9 years ago
Browser: Chrome 40.0.. 
Driver Info: 2.13 (latest)
platform: Windows 7 64 bit
Jdk:1.7
selenium 2.43

Original comment by abdullah...@gmail.com on 22 Jan 2015 at 6:16

GoogleCodeExporter commented 9 years ago

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

GoogleCodeExporter commented 9 years ago
I have been waiting for the Fix of this issue, this has been marked as 
Unconfirmed, can anyone please let me know what is needed for the validation of 
this bug so you guys get assured that this is a bug and can work on it on 
priority basis.

Thanks

Original comment by abdullah...@gmail.com on 23 Feb 2015 at 6:07

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
#19  please provide us your test case if we can reproduce it.

Original comment by andrewch...@chromium.org on 11 Mar 2015 at 7:14

GoogleCodeExporter commented 9 years ago
#5, #7   -  problem in your javascript

 _calls.prototype = Object.create(Array.prototype);
 _calls.prototype._products = new Array(); 

prototype  to make a “base class” object 
   create an object before you do 
_calls.prototype._products

#19   not sure  how you are  getting the same error.  please provide the codes.

Original comment by andrewch...@chromium.org on 11 Mar 2015 at 10:37

GoogleCodeExporter commented 9 years ago

Original comment by andrewch...@chromium.org on 12 Mar 2015 at 12:05

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

Original comment by agau...@chromium.org on 31 Mar 2015 at 7:57

GoogleCodeExporter commented 9 years ago

Original comment by agau...@chromium.org on 1 Apr 2015 at 7:09