gautamaino / gwteventservice

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

Calling Location.replace method causes com.google.gwt.user.client.rpc.StatusCodeException #32

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. When module is already loaded, add a listener for specific domain.  
2. Then, call the removeListeners(AsyncCallback) method, calling 
Window.Location.replace("") in OnSuccess() method.
3. If there was a request (listen_request), already sent by remote service and 
Window.Location.replace("") is called before the response is actually received 
back. The error occurred when response is received(it happens while unloading 
module process is running). 

What is the expected output? What do you see instead?

It would be great if server could determine that there is no longer need to 
send a response being processed when user called 
removeListeners() method. Probably, the simplest solution will be to send 
response immediately when "remove request" was processed or, perhaps, it will 
not solve the issue... Actually, have to say, that everything else works just 
fine and no new requests are sent from the client-side after removelistener was 
called.  

The following error is faced:

 - Client: RemoteEventConnector deactivated.
 - Client-Error: Error on processing event!
    com.google.gwt.user.client.rpc.StatusCodeException: 0 
    at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:192)
    at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287)
    at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:395)
    ...

    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
    at java.lang.Thread.run(Unknown Source

 -Unloading module blokus

What version of the product are you using? On what operating system?
 I'am using gwteventservice-1.1.1 and GWT 2.1 version

Please provide any additional information below.
 Here is a snapshot, demonstrating that response is received after RemoteEventConnector was deactivated.

Original issue reported on code.google.com by PeterTur...@gmail.com on 22 Nov 2010 at 10:54

Attachments:

GoogleCodeExporter commented 8 years ago
Hi,

I could imagine that the problem is already solved by the solution of issue 27 
(http://code.google.com/p/gwteventservice/issues/detail?id=27) which was 
committed today to the trunk version, because there are some optimizations with 
removing listeners. It would be great if you could try it again with the trunk 
version.

Thank you in advance.

Regards,

Sven S.

Original comment by sven.strohschein@googlemail.com on 29 Jan 2011 at 4:34

GoogleCodeExporter commented 8 years ago
This issue could now be reproduced with the description of Issue34. This 
problem should not have negative effects to the application but the exception 
should of course be avoided.

Original comment by sven.strohschein@googlemail.com on 3 Oct 2011 at 10:49

GoogleCodeExporter commented 8 years ago
Status code 0 is sent by some browsers when the browser/user navigates to 
another site/application and is actually not an error, but GWT inteprets this 
as a StatusCodeException. In the case of GWT applications it should be an 
unimportant status code because the GWT module is unloaded in that case.

Status code 0 is now handled correctly by GWTEventService and will no longer be 
logged as an error (fixed in the trunk version and in the upcoming 1.2 release 
candidate).

Original comment by sven.strohschein@googlemail.com on 3 Oct 2011 at 4:03

GoogleCodeExporter commented 8 years ago
Hi)
Thank you very much for your work.
I'm sorry for taking so long to reply, due to lack of time i haven't tried to 
run trunk version yet..sorry, i will)

Regards,

Peter.

Original comment by PeterTur...@gmail.com on 4 Oct 2011 at 1:45