1

I am currently working on a project with GWT and im still kinda new to it. I was testing my code when i noticed that only in the Edge browser the display was not correct. When looking in the logs i saw a lot of these errors:

com.google.gwt.event.shared.UmbrellaException: Exception caught: For input string: "176px"

So I googled a bit and noticed this post: What does <meta http-equiv="X-UA-Compatible" content="IE=edge"> do?

So i tried to add that to my code but that doesnt fix my problem. I am still getting the umbrellaExceptions and the UI is still displayed incorrectly in Edge.

Part of my html file:

<!doctype html>

<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">


<link type="text/css" rel="stylesheet/less" href="xxxxx.less"/>
<!--[if IE 9]>
<link type="text/css" rel="stylesheet/less" href="ie9.less">
<![endif]-->


<title>xxx</title>

<!-- Translations -->
<script type="text/javascript" src="translations/languages.js"></script>

<script type="text/javascript" src="js/less-1.7.5.min.js"></script>

<script type="text/javascript" src="xxxWebApp/xxxWebApp.nocache.js">
</script>
<script type="text/javascript" src="jquery/jquery.min.js"></script>
<script type="text/javascript" src="jquery/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/application.js"></script>
</head>

so i tried adding <meta http-equiv="X-UA-Compatible" content="IE=edge"> under the other meta tag. But that doesnt seem to work. I believe i dont added that tag correctly. But i tried different variants like:

<meta http-equiv="X-UA-Compatible" content="text/html; charset=UTF-8; IE=edge">

But still no result. Could somebody how to add that tag correctly or what could cause that UmbrelllaException only in the Edge browser.

UPDATE: Here is an example of a full stacktrace:

com.google.gwt.event.shared.UmbrellaException: Exception caught: For input string: "176px"
    at sun.reflect.GeneratedConstructorAccessor24.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.instantiate(ServerSerializationStreamReader.java:1110)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserialize(ServerSerializationStreamReader.java:682)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.readObject(ServerSerializationStreamReader.java:592)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader$ValueReader$8.readValue(ServerSerializationStreamReader.java:149)
    at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamReader.deserializeValue(ServerSerializationStreamReader.java:434)
    at com.google.gwt.user.server.rpc.RPC.decodeRequest(RPC.java:312)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:296)
    at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:373)
    at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1634)
    at com.nedap.retail.rheas.modules.systemconfig.GWTCacheControlFilter.doFilter(GWTCacheControlFilter.java:35)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1613)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:541)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1592)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1239)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:481)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1561)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1141)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
    at com.nedap.retail.rheas.core.webserver.WebServerManager$WebServerHandler.handle(WebServerManager.java:137)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
    at org.eclipse.jetty.server.Server.handle(Server.java:564)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
    at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:672)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:590)
    at java.lang.Thread.run(Unknown Source)

Thanks in advance.

2 Answers2

0

I can't comment on why the error is ONLY on Edge; my impression is that you should be getting it everywhere (or perhaps Edge is less lenient on what seems to be bad input).

However, regarding the error itself:

  • Looks like it is caused by the fact that you specify a value in the form "176px" when it should be just "176"; This value can be a width of an element, or a height of an element, or something else; you might get lucky and a simple text search in your project might point to the right place (search by the value "176")
  • If the above doesn't work, then you need a better view of the problem; start your dev mode with -style PRETTY, and (perhaps recursively) print somewhere the stacktrace of the UmbrellaException, and the stack trace of its causes (perhaps using the suggestions from here), using the causes returned by UmbrellaException#getCauses.
Andrei
  • 1,510
  • 2
  • 15
  • 33
  • Thank you for awnsering. I really think it has something to do with Edge. Because 176px is just another way of representing a distance? Because i have lots of different errors (all with a different px). And also this is accepedt by all other browsers. I do already have the full stacktrace. I will update my original post. – Rowan Klein Gunnewiek May 24 '17 at 11:11
  • Two things: You should really go through `UmbrellaException#getCauses` and print stacktraces; UmbrellaException is too general, and with few exceptions, the "real" cause lies in `#getCauses()`. Second, the error seems to happen server side. Looks like some error was thrown when GWT attempted to instantiate your RPC service. – Andrei May 24 '17 at 11:15
  • Made a mistake; the error seems to be when your RPC request is deserialized, and proper server-side objects get instantiated. If you have any RPC classes that process/parse stuff in constructor, that's probably where the problem is. As I've said above, there is a good chance that `#getCauses` shows more info. – Andrei May 24 '17 at 11:18
  • Oke. Will try that. Thank you – Rowan Klein Gunnewiek May 24 '17 at 11:20
  • No worries; my best bet right now is that Edge gives you a value in the form "176px", when other browsers gives it to you in the form "176". You're running a `parseInt` or similar somewhere on the server, in a RPC object, where you expect that value to be a number; therefore you get that error. – Andrei May 24 '17 at 11:25
  • I got to say i cant find that parser on the server side yet. But when i try to get the cause of the exception i get a cause that is null. When i run public void logClientError(final Throwable exception) { if(exception.getCause() == null) { LOG.error("cause is null"); } LOG.error("UI error occurred, cause: {}", exception.getCause()); } – Rowan Klein Gunnewiek May 24 '17 at 11:48
  • It's not `getCause` it's `getCauses` (specific to `UmbrellaException`). Which GWT version are you using? I have 2.8.0 and 2.8.1 but perhaps if older, `UmbrellaException` looks different than what I have. – Andrei May 24 '17 at 11:50
  • Also, the code lines referenced by your stacktrace (assuming GWT 2.8.1; but could be good for older versions - RPC hasn't changed that much in a while) are `parameterValues[i] = streamReader.deserializeValue(parameterTypes[i]` So chances are that you find the problem by looking at the parameter types of the last RPC call you make before the exception occurs. methodParameterTypes[i], resolvedTypes); – Andrei May 24 '17 at 11:54
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/145023/discussion-between-rowan-klein-gunnewiek-and-andrei). – Rowan Klein Gunnewiek May 24 '17 at 12:22
0

Ok, I dont really know what caused the problem, but updating GWT from version 2.8.0 to 2.8.1 solved to problem.

Hope i save some troubles for somone else with this awnser.