ericmckean / chromedriver

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

ChromeDriver crash when exception big script #1026

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
ChromeDriver crashes when the size of the script passed to "executeScript" 
exceeds some internal limit. This is reliable reproducible, see the detailed 
steps below.

I'm using Rhino for scripting Java.

Steps to reproduce:

1) Unpack the "bin" folder from the attachement
2) Download the binaries from: http://dev.bryntum.com/examples/binary.zip
3) Unpack the "binary" folder inside of "bin", so you need to have "bin/binary"
3.5) Update the version of the selenium standalone server, referenced from the 
"bin/test" script
4) Launch in the console: bin/test
5) That should launch the appropriate launcher for linux/windows/mac
6) See the exception:

[1.618][SEVERE]: Unable to receive message from renderer
org.mozilla.javascript.WrappedException: Wrapped 
org.openqa.selenium.WebDriverException: disconnected: Unable to receive message 
from renderer
  (Session info: chrome=40.0.2214.94)
  (Driver info: chromedriver=2.13.307649 (bf55b442bb6b5c923249dd7870d6a107678bfbb6),platform=Linux 3.2.0-75-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 186 milliseconds
Build info: version: '2.44.0', revision: '76d78cf', time: '2014-10-23 20:02:37'
System info: host: 'outpost', ip: '127.0.1.1', os.name: 'Linux', os.arch: 
'amd64', os.version: '3.2.0-75-generic', java.version: '1.6.0_34'
Session ID: 7d2977b5ed979a6159db83c271f3d633
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{platform=LINUX, acceptSslCerts=true, javascriptEnabled=true, 
browserName=chrome, chrome={userDataDir=/tmp/.com.google.Chrome.Kls7s7}, 
rotatable=false, locationContextEnabled=true, mobileEmulationEnabled=false, 
version=40.0.2214.94, takesHeapSnapshot=true, cssSelectorsEnabled=true, 
databaseEnabled=false, handlesAlerts=true, browserConnectionEnabled=false, 
webStorageEnabled=true, nativeEvents=true, applicationCacheEnabled=false, 
takesScreenshot=true}]
        at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754)
        at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148)
        at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)
        at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
        at org.mozilla.javascript.gen._home_nickolay_Playground_bin_test_js_1._c_script_0(Unknown Source)
        at org.mozilla.javascript.gen._home_nickolay_Playground_bin_test_js_1.call(Unknown Source)
        at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
        at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
        at org.mozilla.javascript.gen._home_nickolay_Playground_bin_test_js_1.call(Unknown Source)
        at org.mozilla.javascript.gen._home_nickolay_Playground_bin_test_js_1.exec(Unknown Source)
        at org.mozilla.javascript.tools.shell.Main.processFileSecure(Main.java:605)
        at org.mozilla.javascript.tools.shell.Main.processFile(Main.java:564)
        at org.mozilla.javascript.tools.shell.Main.processSource(Main.java:535)
        at org.mozilla.javascript.tools.shell.Main.processFiles(Main.java:178)
        at org.mozilla.javascript.tools.shell.Main$IProxy.run(Main.java:102)
        at org.mozilla.javascript.Context.call(Context.java:489)
        at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:504)
        at org.mozilla.javascript.tools.shell.Main.exec(Main.java:160)
        at org.mozilla.javascript.tools.shell.Main.main(Main.java:138)
Caused by: org.openqa.selenium.WebDriverException: disconnected: Unable to 
receive message from renderer
  (Session info: chrome=40.0.2214.94)
  (Driver info: chromedriver=2.13.307649 (bf55b442bb6b5c923249dd7870d6a107678bfbb6),platform=Linux 3.2.0-75-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 186 milliseconds
Build info: version: '2.44.0', revision: '76d78cf', time: '2014-10-23 20:02:37'
System info: host: 'outpost', ip: '127.0.1.1', os.name: 'Linux', os.arch: 
'amd64', os.version: '3.2.0-75-generic', java.version: '1.6.0_34'
Session ID: 7d2977b5ed979a6159db83c271f3d633
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{platform=LINUX, acceptSslCerts=true, javascriptEnabled=true, 
browserName=chrome, chrome={userDataDir=/tmp/.com.google.Chrome.Kls7s7}, 
rotatable=false, locationContextEnabled=true, mobileEmulationEnabled=false, 
version=40.0.2214.94, 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:534)
        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.executeScript(RemoteWebDriver.java:508)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:622)
        at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
        ... 17 more

9) Try to change the line:
var obj = createRandomTreeBranch(10000)
to
var obj = createRandomTreeBranch(500)

and launch bin/test again - see no exception

The size of the JSON object (stringified) for 10000 elements is about 2MB - not 
so big imo.

Original issue reported on code.google.com by nickol...@gmail.com on 2 Feb 2015 at 9:54

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by andrewch...@chromium.org on 3 Feb 2015 at 12:13

GoogleCodeExporter commented 9 years ago
Chromedriver will take around 100 MB, and chrome browser has a limit < 2 MB.
not sure what you are trying to accomplish?  If can not work around,
please file this issue to chrome.   They will have better answer for this.

Original comment by andrewch...@chromium.org on 3 Feb 2015 at 6:48

GoogleCodeExporter commented 9 years ago
Can you please explain better? Chromedriver will take 100MB for what? 

And chrome browser has 2MB limit on what? On the size of the script passed to 
"eval()"?

Original comment by nickol...@gmail.com on 5 Feb 2015 at 6:20

GoogleCodeExporter commented 9 years ago
Any updates?

Original comment by nickol...@gmail.com on 18 Feb 2015 at 9:38

GoogleCodeExporter commented 9 years ago
Chromedriver communicates chrome browser through  web socket.  both has message 
size limit. chrome has less message size (< 2 MB)  which is  the bottle neck in 
this case.
we can not fix this since chrome is own by other group.  Did you post this 
issue in chrome group?

Original comment by andrewch...@chromium.org on 18 Feb 2015 at 6:34

GoogleCodeExporter commented 9 years ago
Thank you, its much clearer now! I'll try to implement a workaround or post to 
chrome group.

Original comment by nickol...@gmail.com on 19 Feb 2015 at 6:28

GoogleCodeExporter commented 9 years ago

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

GoogleCodeExporter commented 9 years ago

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