Firefox 从com.google.gwt.xhr.client.XMLHttpRequest引发的NS\u错误\u未初始化异常
我正在使用版本2.5.1中的GWT开发一个应用程序 几天前,我们在日志中发现大量异常(每秒很少!!!)如下所示:Firefox 从com.google.gwt.xhr.client.XMLHttpRequest引发的NS\u错误\u未初始化异常,firefox,gwt,xmlhttprequest,Firefox,Gwt,Xmlhttprequest,我正在使用版本2.5.1中的GWT开发一个应用程序 几天前,我们在日志中发现大量异常(每秒很少!!!)如下所示: Nov 5, 2014 6:00:45 PM com.google.gwt.logging.server.RemoteLoggingServiceUtil logOnServer SEVERE: (NS_ERROR_NOT_INITIALIZED) : com.google.gwt.core.client.impl.SerializableThrowable$ThrowableWi
Nov 5, 2014 6:00:45 PM com.google.gwt.logging.server.RemoteLoggingServiceUtil logOnServer
SEVERE: (NS_ERROR_NOT_INITIALIZED) :
com.google.gwt.core.client.impl.SerializableThrowable$ThrowableWithClassName: (NS_ERROR_NOT_INITIALIZED) :
at Unknown.ZHe(StackTraceCreator.java:174)
at Unknown.WFe(StackTraceCreator.java:508)
at Unknown.IHf(Exceptions.java:29)
at Unknown.pIb(XMLHttpRequest.java:164)
at Unknown.OMe(RequestBuilder.java:411)
at Unknown.anonymous(XMLHttpRequest.java:351)
at Unknown.gHe(Impl.java:189)
at Unknown.jHe(Impl.java:243)
at Unknown.anonymous(Impl.java:70)
至少在两个案例中,当从Mozilla Firefox web浏览器使用该应用程序时,出现了问题。要停止这一点,关闭浏览器是不够的,还要从任务管理器中终止进程。但我不确定它是否也能被另一个浏览器触发
我还在com.google.gwt.http.client.Request类的方法cancel()中找到了此注释:
我不知道请求是如何工作的,但我想知道Mozilla Firefox的新版本是否导致上述解决方案在某些情况下无法工作
我还想补充一点,这个问题是随机产生的,我无法按需复制它
你知道问题的根源是什么吗?你能给我们一些如何解决这个问题的建议或者一些解决方法吗
提前谢谢你 如果这确实是一个bug,那么最好将其发布在GWT的bugtracker上(理想情况下,使用一个最小的工作示例)。但是为了做到这一点,您尝试过最新版本的GWT吗?(2.7.0)您的错误可能已经修复。不幸的是,我无法重现此错误。它时不时地发生。另外,目前,我没有可能更改GWT版本。因此,我正在为GWT2.5.1寻找一个解决方案或变通方法。您是否找到了解决方案?我也经历过,但只有一次。使用GWT2.7.0。用户代理:Mozilla/5.0(Windows NT 6.3;WOW64;rv:34.0)Gecko/20100101 Firefox/34.0异常:com.google.gwt.core.client.JavaScriptException:(NS_错误\u未初始化):在com.google.gwt.core.client.impl.StackTraceCreator$CollectorEmulated.$fillInStackTrace(StackTraceCreator.java:168)在com.google.gwt.core.client.JavaScriptException.JavaScriptException(JavaScriptException.java:106)在com.google.gwt.lang.Exceptions.catch(Exceptions.java:25)在…不幸的是没有。但是,在我们将GWT升级到2.6.1版之后,问题直到今天才再次出现。
/*
* There is a strange race condition that occurs on Mozilla when you cancel
* a request while the response is coming in. It appears that in some cases
* the onreadystatechange handler is still called after the handler function
* has been deleted and during the call to XmlHttpRequest.abort(). So we
* null the xmlHttpRequest here and that will prevent the
* fireOnResponseReceived method from calling the callback function.
*
* Setting the onreadystatechange handler to null gives us the correct
* behavior in Mozilla but crashes IE. That is why we have chosen to fixed
* this in Java by nulling out our reference to the XmlHttpRequest object.
*/