GWT Application throws 'JavaScriptException' in IE only, stack trace has no helpful information
My GWT application is throwing a JavaScriptException at a certain point. This issue only occurs in Internet Explorer (both IE 8 and IE 8 running IE7 mode).
The stack trace is as follows:
com.google.gwt.core.client.JavaScriptException: (Error): Invalid argument.
number: -2147024809
description: Invalid argument.
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:195)
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120)
com.google.gwt.dev.shell.ModuleSpace.invok开发者_开发技巧eNative(ModuleSpace.java:507)
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264)
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
com.google.gwt.core.client.impl.Impl.apply(Impl.java)
com.google.gwt.core.client.impl.Impl.entry0(Impl.java:188)
sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1668)
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401)
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
java.lang.Thread.run(Unknown Source)
Debugging has been impossible to say the least. Google has told me that this could be anything from a property being set improperly (ie a bad character like setWidth("190px!")
) or setting a width to 0px or could be something else altogether.
Since the issue only shows up in IE, I've tried using the IE developer tools to debug, but have come up with nothing.
How can I go about debugging this properly?
This also happened to me and it's quite nightmare. Proper usage of some GIT/SVN/CVS whatever saves here situation really, getting to the point "where it worked" is great. So what can you do now:
- temporarily get rid of all custom CSS and see what happens (leave just plain default CSS from GWT)
- debug on external server, it's not that slow then
- try to reproduce "certain point" and comment out any related lines
- inspect generated site properly (some firebug-like tool for IE, I hope such thing exists)
- as suggested above, use pretty/detailed output style
- reading generated JavaScript from GWT never solved my problem :( It was usually CSS related stuff or custom usage of DOM from GWT
- get folks (or do it yourself) to test various browsers on regular basis, it's just nobrainer
Compile your application with pretty output style for web mode. Then, you could get more information about this exception.
this code caused the same error for me
flexTableWidget.getElement().getStyle().setBackgroundColor("rgba(255,255,255,0.5)");
精彩评论