Reputation: 2068
I have recently updated the GWT SDK from 1.5.3 to 2.0.0 on a project. I managed to fix all issues but one.
I can't use the development mode with chrome. The login page of my application loads perfectly but when I try to log in (i.e. make an RPC) I get the following error:
com.google.gwt.core.client.JavaScriptException: (Error): Error calling method on NPObject!
stack: Error: Error calling method on NPObject!
at eval at eval (native v8natives.js:132:1)
at unknown source
at __gwt_jsInvoke (http://grapple:8087/hosted.html:70:35)
at Array.0 (eval at eval (native v8natives.js:132:1))
at Object. (unknown source)
at __gwt_jsInvoke (http://grapple:8087/hosted.html:70:35)
at Array.1 (eval at eval (native v8natives.js:132:1))
at Object. (unknown source)
at __gwt_jsInvoke (http://grapple:8087/hosted.html:70:35)
at Array.1 (eval at eval (native v8natives.js:132:1))
__gwt_ObjectId: 2835
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:195)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:284)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
at com.google.gwt.user.client.rpc.impl.SerializerBase$MethodMap$.deserialize$(SerializerBase.java)
at com.google.gwt.user.client.rpc.impl.SerializerBase.deserialize(SerializerBase.java:124)
at com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.deserialize(ClientSerializationStreamReader.java:116)
at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:61)
at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter$ResponseReader$8.read(RequestCallbackAdapter.java:104)
at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:197)
at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287)
at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:396)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
at com.google.gwt.dev.shell.BrowserChannel.reactToMessagesWhileWaitingForReturn(BrowserChannel.java:1713)
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:165)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:188)
at sun.reflect.GeneratedMethodAccessor231.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
at com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1668)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
at java.lang.Thread.run(Thread.java:619)
I am using Chrome 4.0.295.0 and Developer plugin 1.0.7263.
The Development mode works fine on FF and IE.
Do you have any idea of what is going on?
Thank you.
Upvotes: 6
Views: 3194
Reputation:
I'm not sure that it's a bug in the developer plugin - it might be a limitation of the browser.
As your application grows more complex, the browser's stack size limit will eventually be reached. Some browsers have higher limits than others (see http://tests.novemberborn.net/javascript/callstack-size.html in various browsers). Safari has the highest as far as I know, and there's an official GWT developer plugin for it - at least on the Mac platform.
The plugin (on all platforms) adds considerable overhead to the stack (which is why this problem usually appears to go away in production) so if you wish to continue to develop your application in debug mode the best advice is probably to restructure your code. It's likely that you're trying to handle too much data on the client side at once.
Upvotes: 7
Reputation: 69997
It seems the Chrome plugin has issues with deeply nested and serialized objects in devmode. In my app, I send down a deep tree and it fails in Chrome but succeeds in Firefox.
Upvotes: 0