Announcement

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

    how to debug the client before onModuleLoad()?

    SmartClient Version: v9.1p_2014-10-20/PowerEdition Deployment (built 2014-10-20)
    GWT 2.6.1
    IE-11

    I'm having difficulty debugging my app on the client when it goes through it's init process. With FF and Chrome, the app loads fine. With IE, the app seems to hang before onModuleLoad() is called in MainEntryPoint.java.

    The first line I have in onModuleLoad() is SC.showConsole(); which does not get called because IE seems to hang before it reaches onModuleLoad().

    Do you have any suggestions as to how to debug this issue on the client? I cannot even get the Developer's Console to appear?

    #2
    Perhaps you have already done so and just didn't mention it, but the first thing is always to look at the Developer Console and built-in browser tools for JS errors.

    You also need to clarify "hang". Blank page or something else? 100% CPU or totally idle?

    Finally, since this is something happening before our product even gets involved, you should try to see if you can in-wedge GWT, such as clearing the GWT unitcache, rerunning a GWT compile, restarting the IDE, re-installing GWT, etc.

    Comment


      #3
      Everything works good in my development environment. This is happening on a new test server I am building. Here are more details as to the steps I have followed:

      1. Upgraded to Java8 / Tomcat 8 on my local development environment in Idea. Everything works good - IE, Chrome and Firefox all work fine.
      2. The first statement in onModuleLoad() is a simply SC.Say("onModuleLoad()"); This is how I verify onModuleLoad() is called during the init phase after logging in.
      3. When I do a build and deploy to the new server with Java8 / Tomcat 8, I can run the App fine with Chrome and Firefox (both browsers I see the SC.Say() statement in step 2. However, with IE after I login, the app simply hangs and I do not see the SC.Say() call at all?

      With IE, I clear the IE browser's cache explicitly on a blank page by going in and viewing all files and deleting them manually before I hit the new server with IE.

      I've attached both log files, chrome-good.txt and ie-bad.txt. For some reason, with IE, onModuleLoad() is not being executed during the init phase after login?

      I tried to upload the log files to show you, but you have a 35k restriction for uploading files. Both logs are about 120k each? How can I get you these log files so you can see?
      Last edited by JLivermore; 10 Aug 2015, 09:40. Reason: providing more detail

      Comment


        #4
        If you find yourself trying to post something that exceeds the forums size limits, that's a hint you're doing something wrong.

        If these are client-side (Developer Console) logs, then in order for them to be so large, you must have enabled DEBUG-level logging pervasively or in some very chatty categories. Simply reset to defaults and upload the resulting logs.

        We made a few other suggestions and also asked some questions - please go back and try those suggestions and answer the questions.

        Comment


          #5
          Your suggestions:

          Originally posted by Isomorphic View Post
          Perhaps you have already done so and just didn't mention it, but the first thing is always to look at the Developer Console and built-in browser tools for JS errors.
          This is not happening in my development environment, this is happening on a new server, so the code/build in question is not development code, but a compiled and finished WAR file. So the Developer's Console does not apply here, which is why I instrumented the code with the SC.Say() call as the first statement in the onModuleLoad() method.

          Originally posted by Isomorphic View Post
          You also need to clarify "hang". Blank page or something else? 100% CPU or totally idle?
          It appears to be hanging in our bootstrap page
          Code:
          <%@page contentType="text/html" pageEncoding="UTF-8"%>
          <!DOCTYPE html>
          <html>
              <head>
                  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
          
                  <link type="text/css" rel="stylesheet" href="css/classic.css">
                  <link type="text/css" rel="stylesheet" href="css/loading.css">
                  <%--<script src="js/amchart.js"></script>--%>
                  <meta name='gwt:module' content='com.anstca.tz.Main=com.anstca.tz.Main'>
                  <title>TradeZoom</title>
              </head>
              <body>
                  <!--add loading indicator while the app is being loaded-->
                  <div id="loadingWrapper">
                      <div id="loading">
                          <div class="loadingIndicator">
                              <img src="images/loading.gif" width="32" height="32" style="margin-right:8px;float:left;vertical-align:top;"/>TradeZoom Application<br/>
                              <span id="loadingMsg">Loading styles and images...</span></div>
                      </div>
                  </div>
                  <script> var isomorphicDir = "com.anstca.tz.Main/sc/"; </script>
                  <script> window.isc_useSimpleNames = false </script>
                  
                  <script type="text/javascript">document.getElementById('loadingMsg').innerHTML = 'Loading Core API...';</script>
          	    <script src='com.anstca.tz.Main/sc/modules/ISC_Core.js?isc_version=9.1.js'></script>
                  <script src='com.anstca.tz.Main/sc/modules/ISC_Foundation.js?isc_version=9.1.js'></script>
          	    <script src='com.anstca.tz.Main/sc/modules/ISC_Containers.js?isc_version=9.1.js'></script>
          	    <script src='com.anstca.tz.Main/sc/modules/ISC_Grids.js?isc_version=9.1.js'></script>
          	    <script src='com.anstca.tz.Main/sc/modules/ISC_Forms.js?isc_version=9.1.js'></script>
          	    <script src='com.anstca.tz.Main/sc/modules/ISC_RichTextEditor.js?isc_version=9.1.js'></script>
                  <script src='com.anstca.tz.Main/sc/modules/ISC_DataBinding.js?isc_version=9.1.js'></script>
          	    <script src='com.anstca.tz.Main/sc/modules/ISC_Calendar.js?isc_version=9.1.js'></script>
                  
          
          
          
                  <script type="text/javascript">document.getElementById('loadingMsg').innerHTML = 'Loading DataSources...';</script>
          
                  <!--IMPORTANT - make sure is no white space in the Data Source definitions on the next line. -->
                  <script src="com.anstca.tz.Main/sc/DataSourceLoader?dataSource=post_trade_view_list,client_view,stock,direction,currency,portfolio_item,user_search,client_search,client_by_user,state,country,role,landing_page_list,subscription,dimension,data_operation,user_subscription_item,data_filter_item,distributor,client_by_distributor,client_item,client_subscription_item,client_user_item,relationship_manager,client_relationship_manager_item,admin_report_upload,report,pre_trade_view_list,pre_trade_cube,portfolio_open,pre_trade_flat_cube,post_trade_time_frame,post_trade_venue_data,post_trade_managers_reliability,post_trade_view_dimension_values,pre_trade_view_dimension_values,post_trade_benchmarks,client_custom_file,stock_view_grid_currency_composite,post_trade_time_frame_ms,algo_backtest_grid,group_measures,group_dimensions,group_dimension_member_item,group_dimension_members,group_dimension_member_items,group_measure_members,rf_scheduled_report,rf_dynamic_report,realtime_stocklenz_launch,realtime_view_list,pivot_table_time_frame,pivot_table_view_menu_button,pivot_table_report_launcher_list,report_pivot_table_view_list,pivot_table_single_time_frame,pivot_table_dimension_select_search,time_frame"></script>
                  <!-- /IMPORTANT -->
          
          
                  <script src="ds/postTradeCubeDataSource.jsp"></script>
                  <script src="ds/postTradeFlatCubeDataSource.jsp"></script>
                  <script src="ds/postTradeDrillDownDataSource.jsp"></script>
          
                  <script src="ds/postTradeCubeStockLenzSymbolList.jsp"></script>
          
                  <script src="ds/stockLenzDataSource.jsp?PostTradeStockLenzDataType=ManagerDay"></script>
                  <script src="ds/stockLenzDataSource.jsp?PostTradeStockLenzDataType=BrokerDay"></script>
                  <script src="ds/stockLenzDataSource.jsp?PostTradeStockLenzDataType=StockDay"></script>
                  <script src="ds/stockLenzDataSource.jsp?PostTradeStockLenzDataType=MultiDay"></script>
          
                  <script>
                      // use the text-based date item so we can clear it for filtering purposes
                      isc.DateItem.addProperties({
                         useTextField:true,
                         allowNullValue:true
                      });
          
                      var currentSkin = "anstca";
                  </script>
          
                  <script type="text/javascript">document.getElementById('loadingMsg').innerHTML = 'Loading skin...';</script>
                  <script type="text/javascript">
                      document.write("<"+"script src=com.anstca.tz.Main/sc/skins/" + currentSkin + "/load_skin.js?isc_version=9.1.js><"+"/script>");
                  </script>
          
                  <script type="text/javascript">document.getElementById('loadingMsg').innerHTML = 'Starting application<br>Please wait...';</script>
                  <script type="text/javascript" language="javascript" src="com.anstca.tz.Main/com.anstca.tz.Main.nocache.js"></script>
                  
                  <iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
              </body>
          </html>
          on the 4th line of code from the bottom:
          Code:
          <script type="text/javascript" language="javascript" src="com.anstca.tz.Main/com.anstca.tz.Main.nocache.js"></script>
          because all we see in the page is the 'Starting application<br>Please wait...', and the SC.Say() message does not appear in IE. To be clear and specific, Firefox and Chrome both work fine on this newly deployed WAR file, only IE hangs with that status message on the 5th line from the bottom of the home.jsp page listed above.

          Originally posted by Isomorphic View Post
          Finally, since this is something happening before our product even gets involved, you should try to see if you can in-wedge GWT, such as clearing the GWT unitcache, rerunning a GWT compile, restarting the IDE, re-installing GWT, etc.
          This is happening on a deployed WAR file, not in the IDE. I will try to cut out the startup log portion and have only the login portion of both log files.

          Comment


            #6
            I have cut out all of our debug and log statements, the only statements left are by your framework on the server side. Both log files are still well over 35k:

            good example (that works with Chrome) : 101k
            bad example (that hangs with IE) : 85k

            How can I get these log files to you? Your site has a restriction of 35k and i don't think it will take compressed files?

            Comment


              #7
              Hi JLivermore,

              perhaps it is not SmartGWT related at all. Did you test with emptied browser cache? Perhaps IE cached com.anstca.tz.Main/com.anstca.tz.Main.nocache.js and the old version links to a big cache-permutation that does no longer exist.
              With empty cache, do you see a HTTP 200 for the .nocache.js and one *.cache.js (using IE F12 tools)?

              Best regards
              Blama

              Comment


                #8
                Another idea:
                If it is not cache-related you could try to deploy under a different path and sub-path. Perhaps IE does not like the dots in the path?

                Best regards
                Blama

                Comment


                  #9
                  Originally posted by Blama View Post
                  Another idea:
                  If it is not cache-related you could try to deploy under a different path and sub-path. Perhaps IE does not like the dots in the path?

                  Best regards
                  Blama
                  I'm going to have a look at this, thank you for the suggestion.

                  Results - this had no affect. i changed the path to something very simply and still had the same behavior. Thanks for the idea though.
                  Last edited by JLivermore; 11 Aug 2015, 12:40.

                  Comment


                    #10
                    It doesn't matter whether this is a production or development deployment - the SmartGWT Developer Console should still be available, and the browser's built-in tools are definitely always available.

                    Again on the logs, the default log levels we ship with the product would not product such large logs. Whenever we ask for logs, we always just want logs with the default settings unless we specifically request something else.

                    If you're running with settings that produce such large logs, you should definitely restore the default settings that ship with the framework, for multiple reasons: performance, easier to read logs, easier to send to other people.

                    Comment


                      #11
                      We also never got an answer on the nature of the hang:

                      100% CPU or totally idle?

                      Comment


                        #12
                        Originally posted by Isomorphic View Post
                        It doesn't matter whether this is a production or development deployment - the SmartGWT Developer Console should still be available, and the browser's built-in tools are definitely always available.

                        Again on the logs, the default log levels we ship with the product would not product such large logs. Whenever we ask for logs, we always just want logs with the default settings unless we specifically request something else.

                        If you're running with settings that produce such large logs, you should definitely restore the default settings that ship with the framework, for multiple reasons: performance, easier to read logs, easier to send to other people.
                        No changes made to log4j.isc.comfig.xml
                        I removed all of our debug statements, the rest are the framework's which is prefixed with '==='.

                        Comment


                          #13
                          Originally posted by Isomorphic View Post
                          We also never got an answer on the nature of the hang:
                          the CPU is idle.

                          Comment


                            #14
                            Something sounds like something is odd with your log system. Try posting just a starting snippet of the server log.

                            Note that this whole server log thing is a bit of an aside - the suggestions re: JavaScript errors and fixing GWT/caching are much more likely to be where the problem is.

                            Comment


                              #15
                              Originally posted by Blama View Post
                              Hi JLivermore,

                              perhaps it is not SmartGWT related at all. Did you test with emptied browser cache? Perhaps IE cached com.anstca.tz.Main/com.anstca.tz.Main.nocache.js and the old version links to a big cache-permutation that does no longer exist.
                              With empty cache, do you see a HTTP 200 for the .nocache.js and one *.cache.js (using IE F12 tools)?

                              Best regards
                              Blama

                              Yes, in the DevTools for IE, I do see a 200 GET for com.anstca.tz.Main.nocache.js
                              That is where the client begins to hang in terms of resource requests and downloads. I see 4 more requests made with no responses...after *.Main.nocache.js is downloaded.
                              Last edited by JLivermore; 11 Aug 2015, 13:24.

                              Comment

                              Working...
                              X