Announcement

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

    Problem in hosted mode when loading page: $wnd.isc is undefined

    I'm having problems with a JavaScript error that happens directly when I try to load the page in hosted mode. The weird part is that it used to work perfectly and I'm only using the Calendar widget from Smart GWT on a page, and I haven't changed anything with regards to Smart GWT in quite a long time. This error just started happening.

    I've tried both 2.4 and the latest nightly build 2.5.

    I've tried to access the Developer Console but it just won't load. When I try to access the page CPU goes up to 100% and then I get the error after several seconds of loading.

    I have the following inherits in my .gwt.xml and if I comment them out everything works perfectly.

    <inherits name="com.smartgwt.SmartGwtNoTheme"/>
    <inherits name="com.smartgwt.tools.SmartGwtTools"/>
    <inherits name="com.smartclient.theme.enterpriseblue.EnterpriseBlue"/>
    <inherits name="com.smartclient.theme.enterpriseblue.EnterpriseBlueResources"/>

    [ERROR] [connect] Unable to load module entry point class com.smartgwt.client.SmartGwtEntryPoint (see associated exception for details)

    com.google.gwt.core.client.JavaScriptException: (TypeError): $wnd.isc is undefined
    fileName: http://127.0.0.1:8888
    lineNumber: 8
    stack: ()@http://127.0.0.1:8888:8
    ((void 0),&quot;connect&quot;,&quot;http://127.0.0.1:8888/connect/&quot;,0)@h...ml?connect:281
    B()@http://127.0.0.1:8888/connect/connect.nocache.js:2
    (-1)@http://127.0.0.1:8888/connect/connect.nocache.js:15

    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:237)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:129)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:289)
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
    at com.smartgwt.client.SmartGwtEntryPoint.init(SmartGwtEntryPoint.java)
    at com.smartgwt.client.SmartGwtEntryPoint.onModuleLoad(SmartGwtEntryPoint.java:221)
    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.ModuleSpace.onLoad(ModuleSpace.java:396)
    at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:183)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:510)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
    at java.lang.Thread.run(Thread.java:662)

    I've Googled for this and seen people having this problem when inheriting SmartGwtNoScript. I don't however, and it still doesn't work when I only inherit <inherits name="com.smartgwt.SmartGwt"/> instead of the themes. What's weird is that sometimes I don't get this error, and I can't really find any connection to why it happens.

    Anyone have any idea?
    Last edited by Jon54; 17 May 2011, 08:56.

    #2
    I have an update regarding this problem.

    On my work laptop I get this error when loading the app in development mode. If I hit refresh in the browser I get it again, then on the third load it goes away and the app loads fine. This happens _every_ time, always on the third load it's fine.

    What's even more weird is at home when I checkout the exact same project with the same source code I don't get any problems whatsoever. It must be some setting I have screwed up on my work laptop, maybe something in Eclipse?

    Does anyone have any idea? This is getting really annoying!

    Thanks!

    Comment


      #3
      1. Try another browser to see if its happening only in one browser.
      2. Disable browser cache (during development)
      3. Use Firebug / Chrome Inspector to see if the latest versions of the files are loading correctly. Compare the http traffic of the working refresh with the one that does not work

      Comment


        #4
        This seems to be related to the cache somehow. I've inspected the error using Firebug and all files load ok.

        Here's a screenshot from the javascript exception with Firebug open. I get "200 OK" on GET ISC_Core.js and "304 Not Modified" on the rest.

        http://imageshack.us/f/651/jception.png/

        When I reload the page while holding down SHIFT everything works, but everytime I restart the server in hosted mode I get the error when loading without holding down SHIFT. This happens in Firefox and Chrome.

        Can't I use the browser cache with smartgwt?

        Comment

        Working...
        X