Friday, December 30, 2011

Something other than a Java object was returned from JSNI method

I keep getting errors like this (assert errors), seemingly at random.

I haven't done a lot of testing, but it seems to be only in Chrome (latest version) when running in OOPHM. There are different versions (e.g. go an int when expecting void etc).

I don't *think* it's me because I can leave the app overnight and get 20-ish of them turn up when all it is doing is sitting there. The line that throws the assertion error is always the same (or sometimes the assertion above - here's the trace

java.lang.IllegalArgumentException: invoke arguments: JS value of type boolean, expected java.lang.String
    at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:178)
    at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:65)
    at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
    at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:337)
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:218)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
    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:213)
    at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    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:172)
    at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:292)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:546)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
    at java.lang.Thread.run(Unknown Source)

There's a comment there ( com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:178))

    // Just don't know what do to with this.

What appears to kick it off is an onValueChange event which just turns up for no reason with a blank token (when there is one there in the address bar)

I've done a bit of searching but can't find anything helpful or even anyone else reporting the same problem (apart from back when Chrome was back in the days of version 10 (I'm on v16.something).

Doesn't seem to happen live or in IE (haven't tried anything else).

Is this a known problem that I've failed to find references to, or does GWT/Chrome just hate me?

There's nothing very special about my app, it's about three days old and just logs people in or out and has history support and can page.

Any ideas?

Thanks

Ian

(Back again after a bit of a gap :-) )


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment