Getting com.google.gwt.user.client.rpc.StatusCodeException: 0 in GWT

前端 未结 4 592
清酒与你
清酒与你 2021-02-14 21:29

I sometimes/often get this Exception in GWT but don\'t know why:

SEVERE: com.google.gwt.user.client.rpc.StatusCodeException: 0 
java.lang.RuntimeException: com.g         


        
4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-14 21:51

    Since there is no HTTP status code 0, this appears not to be from the server - it could be worthwhile to test using Firebug or something, just to make sure that there isn't a bad response like this coming back.

    Instead, this is almost certainly from the browser itself, either the connection timed out or was dropped by the server, or the browser couldn't reach the server (bad dns, bad gateway, lost wifi, server not available).

    Treat this like any unexpected server failure - perhaps back off and try again, display a message to the user, log an error and send that when the connections are working again.

    The fact that it is happening in all browsers points to a network or server issue - it is extremely unlikely that all browsers are failing in unpredictable ways together. This fact also makes it easier to debug - you can use your favorite browser's debug tools.

提交回复
热议问题