GWT应用程序仅在IE中抛出“JavaScriptException”,堆栈跟踪没有任何有用的信息 [英] GWT Application throws 'JavaScriptException' in IE only, stack trace has no helpful information

查看:207
本文介绍了GWT应用程序仅在IE中抛出“JavaScriptException”,堆栈跟踪没有任何有用的信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的GWT应用程序在某一时刻抛出一个JavaScriptException。此问题只发生在Internet Explorer(IE 8和IE 8运行IE7模式)。



堆栈跟踪如下:

  com.google.gwt.core.client.JavaScriptException:(Error):参数无效。 
号码:-2147024809
描述:参数无效。
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.invokeNative(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.d ev.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(未知来源)

调试至少是不可能的。 Google已经告诉我,这可能是属性设置不正确的任何东西(例如,一个坏的角色,如 setWidth(190px!))或设置宽度为0px或完全是别的东西



由于问题只出现在IE中,我曾经尝试使用IE开发工具进行调试,但没有任何提示。



如何正确调试?

解决方案

也发生在我身上,这是非常噩梦。正确使用一些GIT / SVN / CVS无论如何保存这里的情况真的,到工作在哪里是伟大的。那么现在你可以做些什么:




  • 暂时摆脱所有自定义的CSS,看看会发生什么(从GWT来的只是默认的CSS) / li>
  • 在外部服务器上调试,这不是那么慢,

  • 尝试重现某点,并注释掉任何相关行

  • 正确地检查生成的网站(一些firebug的工具,IE,我希望这样的东西存在)

  • 如上所述,使用漂亮/详细的输出样式
  • $从GWT读取生成的JavaScript从来没有解决我的问题:(通常来自GWT的CSS相关的东西或DOM的自定义使用
  • 获得人(或自己做)定期测试各种浏览器,只是nobrainer


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.invokeNative(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

这篇关于GWT应用程序仅在IE中抛出“JavaScriptException”,堆栈跟踪没有任何有用的信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆