Skip to content
This repository has been archived by the owner on Apr 24, 2021. It is now read-only.

Cannot do RPC calls in GWT Gadget RPC sample project (exception: $stats is not defined) #220

Closed
GoogleCodeExporter opened this issue Sep 10, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

Found in Release:  gwt-gadgets: 1.0.1 (GWT: 1.5.3)
OS: linux (ubuntu intrepid)

Detailed description:
When I try to run the Gadget RPC sample in hosted mode the exception below
is thrown when the gadget is about making the RPC call. Result is that the
call is not executed.

Workaround if you have one:
-

Links to the relevant GWT Developer Forum posts:
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/1e75f8a9d
8bc3d38/591c2df5005ae625#591c2df5005ae625

Exception:

[ERROR] Uncaught exception escaped
com.google.gwt.core.client.JavaScriptException: (ReferenceError): $stats is
not defined
 fileName:
jar:file:/home/rintcius/dev/lib/gwt/gwt-linux-1.5.3/gwt-user.jar!/com/google/gwt
/user/client/rpc/impl/RemoteServiceProxy.java
 lineNumber: 56
 stack:
()@jar:file:/home/rintcius/dev/lib/gwt/gwt-linux-1.5.3/gwt-user.jar!/com/google/
gwt/user/client/rpc/impl/RemoteServiceProxy.java:
56
static void com.google.gwt.user.client.DOM.dispatchEvent
(com.google.gwt.user.client.Event,com.google.gwt.user.client.Element,com.google.
gwt.user.client.EventListener)
([object Event],[object HTMLButtonElement],[object
gwt_nativewrapper_class])@:0
([object Event])@jar:file:/home/rintcius/dev/lib/gwt/gwt-linux-1.5.3/
gwt-user.jar!/com/google/gwt/user/client/impl/DOMImplStandard.java:197
@:0

        at
com.google.gwt.user.client.rpc.impl.RemoteServiceProxy.isStatsAvailable
(Native Method)
        at
com.google.gwt.gadgets.sample.gadgetrpc.client.GadgetService_Proxy.getServerInfo
(transient source for
com.google.gwt.gadgets.sample.gadgetrpc.client.GadgetService_Proxy:23)
        at com.google.gwt.gadgets.sample.gadgetrpc.client.GadgetRPC$2.onClick
(GadgetRPC.java:104)
        at com.google.gwt.user.client.ui.ClickListenerCollection.fireClick
(ClickListenerCollection.java:34)
        at com.google.gwt.user.client.ui.FocusWidget.onBrowserEvent
(FocusWidget.java:102)
        at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1308)
        at com.google.gwt.user.client.DOM.dispatchEventAndCatch(DOM.java:
1287)
        at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1255) 

Original issue reported on code.google.com by rintc...@gmail.com on 4 Dec 2008 at 8:46

@GoogleCodeExporter
Copy link
Author

This problem is similar to issue 213 in that they are both caused by the 
GadgetLinker
template not including a full blown hosted.html for hosted mode.

Original comment by galgwt.reviews@gmail.com on 4 Dec 2008 at 11:44

  • Changed state: Accepted
  • Added labels: API-Gadgets

@GoogleCodeExporter
Copy link
Author

Fix is in patch to GadgetLinker.js:
  http://galgwt-reviews.appspot.com/2402/diff/1/2

Original comment by galgwt.reviews@gmail.com on 8 Jan 2009 at 4:33

  • Changed state: ReviewPending

@GoogleCodeExporter
Copy link
Author

Committed as r1161
released in gwt-gadgets 1.0.2

Original comment by galgwt.reviews@gmail.com on 20 Feb 2009 at 1:45

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Still having it with GWT 1.7 and gwt-gadgets-1.0.3.

The same exact exception under Windows XP.

I wrote a simple workaround this way:

    static {
        disableStats();
    }

    private static native void disableStats() /*-{
        $wnd.$stats = null;
    }-*/;

but I would like to know if I did something bad or if there are still issues 
about 
RPC under GWT and Google Gadgets.

Original comment by luca.mas...@gmail.com on 24 Aug 2009 at 10:51

@GoogleCodeExporter
Copy link
Author

Updating account names

Original comment by zundel@google.com on 21 Dec 2009 at 2:00

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant