Something other than a Java object was returned from JSNI method

984 views
Skip to first unread message

Ian Bambury

unread,
Dec 30, 2011, 5:20:31 PM12/30/11
to google-we...@googlegroups.com
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 :-) )


Thomas Broyer

unread,
Dec 30, 2011, 5:59:07 PM12/30/11
to google-we...@googlegroups.com

Ian Bambury

unread,
Dec 31, 2011, 5:39:52 PM12/31/11
to google-we...@googlegroups.com
Hi Thomas, thanks for the welcome back!

It appears that there are two issues for me, not one 
    - the one you kindly gave me the link to (I had actually looked at it, but didn't get any further than the first entry because the version was so old) 
    - and the other is the random history onValueChange with a blank token followed immediately by it firing with the current token (or what was current before the blank one was fired). I really can't see where that one is coming from. I only have one History.newItem call and that has issueEvent set to false, and I have no timers anywhere (apart from a couple of scheduleDeferred in order to redraw the screen or allow the UncaughtExceptionHandler to become active. So what is firing it?

I think I'm going to have to switch to Firefox for development and for general browsing as the lesser of a number of evils. I've used Chrome as my main browser since it came out because it was simple and uncluttered and refreshingly clean, but recent (and not so recent) changes mean it's not as good as it used to be for me. Just one example, I used to have a list of recently closed tabs right there on the new tab page, but now I have to use the 'Recently Closed' menu to get to them. Whose bright idea was that, and how did it get through any kind of sanity check? 'Look lads, I've got this great idea, we'll improve the user experience by hiding the closed tabs and making the user click more times than they used to have to.'

'Great idea, we'll put it in the next release!'

Sigh.

Anyway, Happy New Year to all who read this far :-)

Ian


On 30 December 2011 22:59, Thomas Broyer <t.br...@gmail.com> wrote:

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

Reply all
Reply to author
Forward
0 new messages