Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Run GWT mobile showcase sample code error.

    Be sure your post includes:

    1. I am trying to run smart GWT mobile with showcase forms/SwitchItems element. The browser displays it success at beginning. However, when I try to switch them, I get an error below. I am wondering if you can give me a hand or not. Thanks.

    Browser: Google Chrome Version 24.0.1312.57.
    GWT mobile version: smartgwt-mobile-1.0d_2013-02-07

    Error :
    20:24:15.936 [ERROR] [showcase] Uncaught exception escaped

    com.google.gwt.core.client.JavaScriptException: (TypeError) @com.google.gwt.core.client.impl.Impl::apply(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)([JavaScript object(7050), JavaScript object(13111), JavaScript object(14769)]): Illegal invocation
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
    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:242)
    at sun.reflect.GeneratedMethodAccessor68.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    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.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:299)
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
    at com.google.gwt.dom.client.DOMImplStandard.dispatchEvent(DOMImplStandard.java)
    at com.google.gwt.dom.client.Element$.dispatchEvent$(Element.java:143)
    at com.smartgwt.mobile.client.internal.EventHandler$1$2.run(EventHandler.java:207)
    at com.google.gwt.user.client.Timer.fire(Timer.java:149)
    at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    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.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
    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:242)
    at sun.reflect.GeneratedMethodAccessor68.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    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:293)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
    at java.lang.Thread.run(Thread.java:722)

    #2
    it works in Firefox 18.

    It is quite strange. I try to execute it on Firefox 18, and it works. However, I still don't know why same sample codes can not be executed in Google Chrome.

    I am wondering if someone can answer me.

    Comment


      #3
      Thanks for catching this - it was a regression only affecting desktop browsers. It's fixed for tomorrow's nightly build.

      Comment


        #4
        I got the same problem with smartgwt-mobile build 2013-05-23, gwt 2.5.1, chrome 28.0.1500.20


        com.google.gwt.core.client.JavaScriptException: (TypeError) @com.google.gwt.core.client.impl.Impl::apply(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)([JavaScript object(674), JavaScript object(318), JavaScript object(1576)]): Illegal invocation
        at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249)
        at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
        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:242)
        at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        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.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
        at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
        at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:299)
        at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
        at com.google.gwt.dom.client.DOMImplStandard.dispatchEvent(DOMImplStandard.java)
        at com.google.gwt.dom.client.Element$.dispatchEvent$(Element.java:134)
        at com.smartgwt.mobile.client.internal.EventHandler$1$2.run(EventHandler.java:207)
        at com.google.gwt.user.client.Timer.fire(Timer.java:149)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        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.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
        at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
        at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
        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:242)
        at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        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:293)
        at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
        at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
        at java.lang.Thread.run(Thread.java:722)

        Comment


          #5
          Please provide steps to reproduce this problem - the steps above don't reproduce the problem anymore.

          Comment


            #6
            The code looks like this:

            public class MainContent extends NavStack<NavigationButton> {
            public MainContent() {
            super("main", IconResources.INSTANCE.files());

            ScrollablePanel overview = new ScrollablePanel("main", IconResources.INSTANCE.home());

            DynamicForm form = new DynamicForm();
            SwitchItem onlyMine = new SwitchItem("mine", "only mine");
            form.setItems(onlyMine);

            overview.addMember( form);
            push(overview);
            }
            }

            When I click the switch item, the exception is thrown.
            BTW: After I compiled it, the page works fine.

            Comment


              #7
              I debugged the exception, found it was thrown by the method
              @com.smartgwt.mobile.internal.gwt.dom.client.WindowAnimationTiming::requestAnimationFrame(Lcom/smartgwt/mobile/internal/gwt/dom/client/WindowAnimationTiming$FrameRequestCallback;)

              So I think it should be the problem of the animation. I check the
              SwithItem's implements, there are two: SwitchItemImplDefault and SwitchItemImplRAF. I found when the user agent is safari,
              it will use SwitchItemImplRAF. So I changed my chrome's User Agent to "Firefox 14 Android Mobile", then it works fine.

              Comment


                #8
                We need code we can actually run to reproduce the problem.

                Comment


                  #9
                  I posted code in this thread before, there is a simple way to reproduce it, just replace the About.java in the showcase project:
                  Code:
                  package com.smartgwt.mobile.showcase.client.overview;
                  
                  import com.smartgwt.mobile.client.widgets.NavigationButton;
                  import com.smartgwt.mobile.client.widgets.ScrollablePanel;
                  import com.smartgwt.mobile.client.widgets.form.DynamicForm;
                  import com.smartgwt.mobile.client.widgets.form.fields.SwitchItem;
                  import com.smartgwt.mobile.client.widgets.icons.IconResources;
                  import com.smartgwt.mobile.client.widgets.layout.NavStack;
                  
                  public class About extends NavStack<NavigationButton> {
                  
                      public About() {
                          super("About", IconResources.INSTANCE.info());
                          ScrollablePanel overview = new ScrollablePanel("main", IconResources.INSTANCE.home());
                  
                          DynamicForm form = new DynamicForm();
                          SwitchItem onlyMine = new SwitchItem("mine", "only mine");
                          form.setItems(onlyMine);
                  
                          overview.addMember( form);
                          push(overview);
                      }
                  }
                  When I click the switch item, the exception is thrown.
                  BTW: After I compiled it, the page works fine.

                  Comment


                    #10
                    This has been tracked to what appears to be a bug in GWT Dev Mode and fixed for tomorrow's build.

                    Comment


                      #11
                      i tried to run the hello world program from smart GWT mobile and i got this error

                      [ERROR] [smartmobi] - Errors in 'com/smartgwt/mobile/client/SmartGwtMobileEntryPoint.java'
                      [ERROR] [smartmobi] - Line 111: Referencing method 'com.google.gwt.user.client.DOM.getEventListener(Lcom/google/gwt/user/client/Element;)': unable to resolve method
                      [ERROR] [smartmobi] - Unable to find type 'com.smartgwt.mobile.client.SmartGwtMobileEntryPoint'
                      [ERROR] [smartmobi] - Hint: Previous compiler errors may have made this type unavailable
                      [ERROR] [smartmobi] - Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly
                      [ERROR] [smartmobi] - Errors in 'com/smartgwt/mobile/client/widgets/Canvas.java'
                      [ERROR] [smartmobi] - Line 109: Referencing field 'com.google.gwt.user.client.impl.DOMImplStandard.dispatchCapturedEvent': unable to resolve field
                      [ERROR] [smartmobi] - Line 111: Referencing field 'com.google.gwt.user.client.impl.DOMImplStandard.dispatchCapturedEvent': unable to resolve field
                      [ERROR] [smartmobi] - Unable to find type 'com.smobi.client.SmartMobi'
                      [ERROR] [smartmobi] - Hint: Previous compiler errors may have made this type unavailable
                      [ERROR] [smartmobi] - Hint: Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly
                      [ERROR] [smartmobi] - Failed to load module 'smartmobi' from user agent 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36' at 127.0.0.1:64259

                      Comment


                        #12
                        This compilation error results from changes in GWT 2.6, and is fixed for tomorrow's build.

                        Comment

                        Working...
                        X